[Dovecot] LDA sieve plugin [patch]

Uldis Pakuls neko at it4u.lv
Fri Apr 13 02:28:26 EEST 2007

Hi all.

I spent some time testing Dovecot's LDA sieve plugin and found problem
with "notify" method.
In fact it always returns "generic sieve error"... and thus produces
bounce messages like this:

Your message was automatically rejected by Dovecot Mail Delivery Agent.

The following reason was given:
Unknown error
Deliver logs error: "generic sieve error", but otherwise server reports "notify" method as supported.

The problem is: original code was taken from curys sieve and requires "notifyd", as sieve runs 'chrooted'
and can't access external binaries like "sendmail". communications with notifyd is done via socket. 

Thus I wrote pacth, which ads "notify" functionality to dovecot's sieve plugin, at less "notify:mailto" method.

cyrus originally contains null, log and zephyr methods.
null and log is useless with dovecot, zephur is cyrus specific...

RFC docs says there is 3 available methods SMS, XMPP and MAILTO:
method can be an SMS URI [SMS-URI <http://ietfreport.isoc.org/idref/draft-ietf-sieve-notify/#ref-SMS-URI>] containing a phone number, or an 
XMPP [XMPP <http://ietfreport.isoc.org/idref/draft-ietf-sieve-notify/#ref-XMPP>] URI containing an XMPP identifier [XMPP-URI <http://ietfreport.isoc.org/idref/draft-ietf-sieve-notify/#ref-XMPP-URI>] 
The supported URI values will be site-specific, but support for the 
[MailTo <http://ietfreport.isoc.org/idref/draft-ietf-sieve-notify/#ref-MailTo>] method is REQUIRED in order to insure interoperability. If 
a URI schema is specified that the implementation does not support, 
the notification MUST cause an error condition. Sieve scripts can 
check the supported methods using the "valid_notify_method" test to 
be sure that they only use supported ones, to avoid such error 
as SMS-URI and XMPP methods are not included in cyrus sieve version, they are not available in dovecots plugin too.
[any ideas, sample code how to implement them?]

All this will not work if you have "mail_chroot" setting enabled in dovecot.conf; chrooted process can't access required external binaries.

Actualy it is not sieve plugin problem only - its LDA problem... it can't send bonce messages, do forwards etc.

Question to Timo: 
Do You have ideas how to fix it? My be disable chroting for LDA at all? or do it "cyrus way" - move all calls to external binaries to sepreate, non chrooted process?
For delivery agent it is requred to be able send bounces and notifications... do forwards.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: notify_patch.diff
Type: text/x-patch
Size: 2556 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20070413/496d04d1/attachment-0001.bin 

More information about the dovecot mailing list