[Dovecot] deliver+sieve: Destination address (-a) parsing changes
When I upgraded my old, long running dovecot 1.1 to newer dovecot-1.2.4 + doevecot-sieve- 0.1.12 I observed a change in destination address (-a) parsing.
Old behaviour: When Timo introduced this feature (http://www.dovecot.org/list/dovecot/2007-September/025813.html) it was possible to hand over only the detail part. In my sendmail configuration I used "-a +$h", where $h contains the detail part and may be empty. By default sendmail can call the delivery agent with the following information: $u: The recipient user (always set) $h: Detail part, may be empty $g: The sender address (relative to the recipient).
New behaviour: The current sieve version needs a complete address with local- and domain-part. Otherwise we get a warning like deliver(user): sieve: envelope recipient address 'user' is unparseable.
The problem is, that the domain part is not always available, e.g. for local delivered emails. This is the main problem, although the setup could be simplified if deliver would accept the old syntax. I'm going to make modifications to sendmail to be able to have all address information available, but this will not solve the problem with missing domain.
Now comes my question: Is it better to enhance the address parsing in sieve plugin or should I use a wrapper around deliver? The latter is not very difficult, but introduces an additional process (that may fail).
Regards, Frank
-- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available.
On Tue, 2009-10-20 at 21:13 +0200, Frank Behrens wrote:
When Timo introduced this feature (http://www.dovecot.org/list/dovecot/2007-September/025813.html) it was possible to hand over only the detail part. In my sendmail configuration I used "-a +$h", where $h contains the detail part and may be empty.
Well, I can say I never intended for it to work that way..
Timo Sirainen <dovecot@dovecot.org> wrote on 20 Oct 2009 18:53:
On Tue, 2009-10-20 at 21:13 +0200, Frank Behrens wrote:
When Timo introduced this feature (http://www.dovecot.org/list/dovecot/2007-September/025813.html) it was possible to hand over only the detail part. In my sendmail configuration I used "-a +$h", where $h contains the detail part and may be empty.
Well, I can say I never intended for it to work that way..
Yes, I believe that, it looks ugly. But that way it was easily to setup with sendmail.
It seems that sendmail's LDA interface does not exactly match deliver's expectations. Hm, do we must support sendmail? No, but it is one of the most used mailservers. So what?
- modify sendmail
- modify deliver
- insert a wrapper
- ???
Now I tend to 3, but 2. would have the advantage to make dovecot more robust, also in collaboration with other MTAs.
-- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available.
"Frank Behrens" <frank@ilse.behrens.de> wrote:
When I upgraded my old, long running dovecot 1.1 to newer dovecot-1.2.4 + doevecot-sieve- 0.1.12 I observed a change in destination address (-a) parsing.
Old behaviour: When Timo introduced this feature (http://www.dovecot.org/list/dovecot/2007-September/025813.html) it was possible to hand over only the detail part. In my sendmail configuration I used "-a +$h", where $h contains the detail part and may be empty. By default sendmail can call the delivery agent with the following information: $u: The recipient user (always set) $h: Detail part, may be empty $g: The sender address (relative to the recipient).
New behaviour: The current sieve version needs a complete address with local- and domain-part. Otherwise we get a warning like deliver(user): sieve: envelope recipient address 'user' is unparseable.
The problem is, that the domain part is not always available, e.g. for local delivered emails. This is the main problem, although the setup could be simplified if deliver would accept the old syntax. I'm going to make modifications to sendmail to be able to have all address information available, but this will not solve the problem with missing domain.
Now comes my question: Is it better to enhance the address parsing in sieve plugin or should I use a wrapper around deliver? The latter is not very difficult, but introduces an additional process (that may fail).
It is possible to "significantly" twist sendmail.cf use $h to select dovecot's mailbox and $u to pass user+detail@domain (one *or many*). [ BTW the way I think about will make sendmail support "alises with domains" instead of current "aliases after domain stripping"]
It is not a big deal if:
- all dovecot's mailboxes are owned by single non root OS account
- sendmail is supposed to start dovecot-deliver with root privileges
P.S. I have written a few sendmail.cf recipients intended to support more than "one and the only" local mailer.
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu CF&C stole it, fair and square. -- Tim Hahn
Andrzej Adam Filip <anfi@onet.eu> wrote on 21 Oct 2009 9:21:
It is possible to "significantly" twist sendmail.cf use $h to select dovecot's mailbox and $u to pass user+detail@domain (one *or many*). [ BTW the way I think about will make sendmail support "alises with domains" instead of current "aliases after domain stripping"]
It is not a big deal if:
- all dovecot's mailboxes are owned by single non root OS account
- sendmail is supposed to start dovecot-deliver with root privileges
P.S. I have written a few sendmail.cf recipients intended to support more than "one and the only" local mailer.
Fine, it sounds promising. So I will see, what I can do with a modified rule set. May be it's a good idea to have a special dovecot local mailer with matching envelope rewriting rules.
Thanks! Frank
-- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available.
"Frank Behrens" <frank@ilse.behrens.de> wrote:
Andrzej Adam Filip <anfi@onet.eu> wrote on 21 Oct 2009 9:21:
It is possible to "significantly" twist sendmail.cf use $h to select dovecot's mailbox and $u to pass user+detail@domain (one *or many*). [ BTW the way I think about will make sendmail support "aliases with domains" instead of current "aliases after domain stripping"]
It is not a big deal if:
- all dovecot's mailboxes are owned by single non root OS account
- sendmail is supposed to start dovecot-deliver with root privileges
P.S. I have written a few sendmail.cf recipients intended to support more than "one and the only" local mailer.
Fine, it sounds promising. So I will see, what I can do with a modified rule set. May be it's a good idea to have a special dovecot local mailer with matching envelope rewriting rules.
[ I will continue sendmail related discussion in news:comp.mail.sendmail ]
Dovecot's design issues to consider are as follows: a) making dovecot support hash/btree/dbm maps for passwd/userdb [AFAIR Timo stated it is too complicated to be "cost effective" from his perspective] b) making dovecot support sendmail's "socket map" protocol for checking mailbox existence The simple protocol is described in semdmail's doc/op/op.me file http://www.sendmail.org/doc/sendmail-current/doc/op/op.pdf c) making dovecot support LMTP protocol via unix socket
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu Prototype designs always work. -- Don Vonada
Andrzej Adam Filip <anfi@onet.eu> wrote on 21 Oct 2009 20:02:
Dovecot's design issues to consider are as follows: a) making dovecot support hash/btree/dbm maps for passwd/userdb [AFAIR Timo stated it is too complicated to be "cost effective" from his perspective] b) making dovecot support sendmail's "socket map" protocol for checking mailbox existence The simple protocol is described in semdmail's doc/op/op.me file http://www.sendmail.org/doc/sendmail-current/doc/op/op.pdf c) making dovecot support LMTP protocol via unix socket
If I understand you right, this is a wish for virtual mailboxes, isn't it? Regular systems users work without problems. What I want is only the additional envelope receiver address available in dovecot-sieve. I see see no problems in mailbox selection in sendmail and dovecot.
-- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available.
"Frank Behrens" <frank@ilse.behrens.de> wrote:
Andrzej Adam Filip <anfi@onet.eu> wrote on 21 Oct 2009 20:02:
Dovecot's design issues to consider are as follows: a) making dovecot support hash/btree/dbm maps for passwd/userdb [AFAIR Timo stated it is too complicated to be "cost effective" from his perspective] b) making dovecot support sendmail's "socket map" protocol for checking mailbox existence The simple protocol is described in semdmail's doc/op/op.me file http://www.sendmail.org/doc/sendmail-current/doc/op/op.pdf c) making dovecot support LMTP protocol via unix socket
If I understand you right, this is a wish for virtual mailboxes, isn't it? Regular systems users work without problems. What I want is only the additional envelope receiver address available in dovecot-sieve. I see see no problems in mailbox selection in sendmail and dovecot.
From your perspective "socket map" support in dovecot may give a way to reject messages to "over quota" recipients in reply to "RCPT TO:".
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu You can't have everything. Where would you put it? -- Steven Wright
participants (3)
-
Andrzej Adam Filip
-
Frank Behrens
-
Timo Sirainen