[Dovecot] dovecot sieve notify mailto
Uldis Pakuls
neko at it4u.lv
Fri Jul 6 20:25:37 EEST 2007
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 at 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:)
1. 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.
2. 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:
1. headers "Auto-Submitted: Precedence:" for better handing by
auto-responders.
2. check for 8bit characters in message.
and most important things:
1. 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.
2. sieve plugin returns "-1" if script failed load or on any error. i
think it is wrong; if no scripts are executed or it is aborted for some
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:
1. message is delivered
2. bounce message sent...
to fix this I wrote small patch for deliver too... my be you find this
"useful"...:)
Uldis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deliver-plugin-patch01.diff
Type: text/x-patch
Size: 1738 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20070706/0fe7465d/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sieve-notify-patch02.diff
Type: text/x-patch
Size: 5080 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20070706/0fe7465d/attachment-0003.bin
More information about the dovecot
mailing list