Timo Sirainen wrote:
On Tue, 2007-07-03 at 21:13 +0300, Uldis Pakuls wrote:
http://article.gmane.org/gmane.mail.imap.dovecot/20813/match
Thanks,
I wrote this patch about 6 moth ago. As far, as I tested it, it works as expected. Other users reports only success with this path too. Timo: My be it's good idea to include this patch in CVS version? Anyway original code only reports "generic error" as "notify" method is unimplemented, and produces bounce messages.
Yes .. Although I have another version by Petr Smotek <psm@volny.cz> as well. I haven't looked closely either of your patches, so want to tell me which one would be better? :) Attached the other one.
I have "looked closely" at both and here is result - new patch:)
Peter removed sieve action report from notify message... this my be confusing as actions are not only "keep". notify my be sent for forward, reject etc. actions, so I left this list at end of message as is.
Peter's patch tries to mark sent messages with duplicate_mark() but never used any check... Actually I dot see any reason for such marking, as notify message are not stored anywhere in mail storage - it is sent directly to external "sendmail_bin" and discarded from memory.
new things added:
- headers "Auto-Submitted: Precedence:" for better handing by auto-responders.
- check for 8bit characters in message.
and most important things: think it is wrong; if no scripts are executed or it is aborted for some
- notify now always reports SIEVE_OK as notify failure is not delivery failure. all notify failures are reported in log. Also "SIEVE_ERROR" aborts script execution, but there is no reason to abort on notify error.
- sieve plugin returns "-1" if script failed load or on any error. i
reason - it is not fatal delivery error; this just means "nothing is done" by script. so i changed plugin always return "0" on errors.
but one problem still remains... if script is executed and mail is delivered to mailbox, but next action failed (e.g. notify, vocation, etc.) deliver incorrectly sends bounce messages while mail is successfully delivered.
sample script: { keep; notify :method...[...]; <- failed action }
result is:
- message is delivered
- bounce message sent...
to fix this I wrote small patch for deliver too... my be you find this "useful"...:)
Uldis