The custom sieve prefilter does work now (Version 2022-12b).
But if you have configured Vacation in SOGo previously, with a value of 1 for “Days between responses”. The custom sieve prefilter starts to work 24 hours after the last E-Mail sent to that mailbox! (I am using the module vacation-seconds). So there seems to be a bug somewhere, that the prefilter temporarily isn’t applied in this case.
Next Problem
Using following custom sieve prefilter to send vacation response and redirect mails:
require ["vacation-seconds","date","relational","variables"];
redirect "me@new-domain.com";
if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", "list-owner", "list-post", "list-archive", "list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*", currentdate :is "weekday" ["0", "1", "2", "3", "4", "5", "6"] ) { if header :matches "Subject" "*" { set "subject" "${1}"; } vacation :seconds 1 :subject "Auto-Reply: ${subject}" :addresses ["info@old-domain.com"] text:
This E-Mail-Address is not in use anymore, please use info@new-domain.com
.
;
discard;
}
Sending an E-Mail from me@new-domain.com or buddy@new-domain.com to info@old-domain.com results in the expected vacation response and me@new-domain.com
getting a copy of the E-Mail.
But when sending an E-Mail from any other domain, eg. gmail.com the sender does get a vacation response but me@new-domain.com
doesn’t receive a copy of the mail.
Dovecot returning following error:
lmtp(info@old-domain.com)<239295><+EMgNXE6xWO/pgMAOJDGrw>: Error: sieve: Execution of script dict:proxy::sieve_before;user=info@old-domain.com;name=active failed, but implicit keep was successful
Postfix saying:
93983EA6BD: milter-reject: END-OF-MESSAGE from mailcowdockerized-dovecot-mailcow-1.mailcowdockerized_mailcow-network[172.22.1.250]: 5.7.1 This message does not meet our delivery requirements; from=<info@old-domain.com> to=<me@new-domain.com> proto=ESMTP helo=<ef5456fb0659>
While in /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/sieve/info@old-domain.com.sieve.log
there is no error at all.