purelymail-issues icon indicating copy to clipboard operation
purelymail-issues copied to clipboard

Sieve extension: "vacation-seconds"

Open temocj opened this issue 2 years ago • 1 comments

I humbly request addition of the "vacation-seconds" extension, RFC 6131

This would enable me to add an "echo" or "ping" auto-reply to help troubleshoot deliverability/routing.

For example:

if address :localpart :is ["to", "cc", "bcc"] ["echo", "ping"] {
    if envelope :all :matches "to" "*" {
        vacation
            :subject "Message landed in ${1}"
            :seconds 0
            "PONG";
        discard;
    }
}

There does not seem to be another way to accomplish this. I explored using the :handle parameter, but failed because the special logic of "Previous Response Tracking" allows you to use the :handle parameter to coalesce otherwise distinct auto-replies, but not the other way around (reply to the same sender within the time period if the handles are distinct). At least that's my understanding after spending quite some time reading these RFCs and running a few tests.

Admittedly, this is more of an "academic exercise" than a serious use case, and I realize that you may not want to facilitate excessive automation on Purelymail (at this time during beta no less). Though I promise that I don't send more than a couple dozen test emails per day. (Probably more than the number of people who would use this extension! 😆)

temocj avatar Jan 09 '23 23:01 temocj

Actually I think this is a bug- the handle/identifier actually isn't used in the code to distinguish between different vacation actions for the resend window, but it should be. I can also add the vacation-seconds extension but I'll probably put it at a minimum of 60 seconds, since otherwise you could get into nasty loops with particularly dumb autoresponders.

ScottPeterJohnson avatar Apr 05 '23 10:04 ScottPeterJohnson