[Dovecot] LDA and postfix with recipient delimiter: documentation
Just a comment about the documentation for postfix integration when using receipient delimiter and delivery of user+foo@domain.ext to user@domain:
http://wiki.dovecot.org/LDA/Postfix
I had some issues to get this working, so thought I'd share my experience. Dovecot version 1.2.rc3. Postfix version postfix-2.7-20090511.
I have no local (unix) mailboxes, everything is delivered to dovecot, so in postfix I have set mailbox_transport = dovecot. In this case the following syntax taken from the docs does not work:
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
whereas the following does work:
dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain}
I think that ${domain} is always what is wanted and only when ${nexthop} happens to have the same value as ${domain}
- for example when using a transport table entry like this:
/etc/postfix/transport domain.ext dovecot:
will the ${user}@${nexthop} form be deliverable. Can anyone see a reason for not using always ${user}@${domain} instead of ${user}@${nexthop}?
John
John Fawcett schrieb:
Just a comment about the documentation for postfix integration when using receipient delimiter and delivery of user+foo@domain.ext to user@domain:
http://wiki.dovecot.org/LDA/Postfix
I had some issues to get this working, so thought I'd share my experience. Dovecot version 1.2.rc3. Postfix version postfix-2.7-20090511.
I have no local (unix) mailboxes, everything is delivered to dovecot, so in postfix I have set mailbox_transport = dovecot. In this case the following syntax taken from the docs does not work:
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
whereas the following does work:
dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain}
I think that ${domain} is always what is wanted and only when ${nexthop} happens to have the same value as ${domain}
- for example when using a transport table entry like this:
/etc/postfix/transport domain.ext dovecot:
will the ${user}@${nexthop} form be deliverable. Can anyone see a reason for not using always ${user}@${domain} instead of ${user}@${nexthop}?
John
Hi John, just for info, in my test server i use
dovecot_destination_recipient_limit = 1 virtual_transport = dovecot
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
without any problems with users full domain layout but without local users and postfix 2.5.5
currently testing this ( but havent looked about unwanted sideeffects yet)
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -e /usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
evantually i will use mailbox_command = procmail -a "$EXTENSION" vor having an archive with local users later
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
John Fawcett schrieb:
Just a comment about the documentation for postfix integration when using receipient delimiter and delivery of user+foo@domain.ext to user@domain:
Hi John, just for info, in my test server i use
dovecot_destination_recipient_limit = 1 virtual_transport = dovecot
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
Hi Robert thanks for your reply. Ar you saying that this handles + addresses correctly (i.e. user+foo@domain.ext delivered to user@domain.ext)? thanks, John
john.ml@erba.tv schrieb:
John Fawcett schrieb:
Just a comment about the documentation for postfix integration when using receipient delimiter and delivery of user+foo@domain.ext to user@domain:
Hi John, just for info, in my test server i use
dovecot_destination_recipient_limit = 1 virtual_transport = dovecot
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
Hi Robert thanks for your reply. Ar you saying that this handles + addresses correctly (i.e. user+foo@domain.ext delivered to user@domain.ext)? thanks, John
Hi John, no i didnt wrote that, i only have user@domain.ext layout in use currently in my test servers
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On May 18, 2009, at 3:56 AM, John Fawcett wrote:
Can anyone see a reason for not using always ${user}@${domain} instead of ${user}@${nexthop}?
${domain} is a somewhat recent addition to Postfix. I guess the docs
could say to use ${domain} instead of ${nexthop} if Postfix is newer
than X (should look up what version added that).
${domain} is a somewhat recent addition to Postfix. I guess the docs could say to use ${domain} instead of ${nexthop} if Postfix is newer than X (should look up what version added that).
${domain} parameter has been added starting with Postfix 2.5, which means that people using "enterprise" linux distros that usually ship with old versions of software won't be able to use it.
Anyway, I'm guessing that the real problem here lies in the fact that John used "mailbox_transport = dovecot" to instruct Postfix how to deliver e-mails, instead of using virtual_transport Postfix parameter as instructed in the Dovecot's wiki. Parameter mailbox_transport is used to set optional message delivery transport that Postfix's *local* delivery agent should use for delivery and since it's actually a local delivery, nexthop is by default set to $myhostname (using local_transport parameter), instead of the actual virtual domain.
-- Best Regards, Marko Njezic - mr.maX @ MAX Interactive corp. Personal: http://www.markonjezic.com/ MAX's Empire: http://www.maxempire.com/ MAX's HTML Beauty++ 2004: http://www.htmlbeauty.com/
${domain} is a somewhat recent addition to Postfix. I guess the docs could say to use ${domain} instead of ${nexthop} if Postfix is newer than X (should look up what version added that).
${domain} parameter has been added starting with Postfix 2.5, which means that people using "enterprise" linux distros that usually ship with old versions of software won't be able to use it.
Anyway, I'm guessing that the real problem here lies in the fact that John used "mailbox_transport = dovecot" to instruct Postfix how to deliver e-mails, instead of using virtual_transport Postfix parameter as instructed in the Dovecot's wiki. Parameter mailbox_transport is used to set optional message delivery transport that Postfix's *local* delivery agent should use for delivery and since it's actually a local delivery, nexthop is by default set to $myhostname (using local_transport parameter), instead of the actual virtual domain. Hi Marko
mr.maX wrote: thanks for that clarification. That clears up why next_hop was not evaluating to the domain. I don't have a mixture of local and virtual mailboxes so for me using postfix local delivery via mailbox transport (what I used to do with cyrus and with dbmail) was fine too and also evaluates the local aliases file, though I could rewrite that to virtual_alias_maps...
However, it means the wiki documentation doesn't need changing: the next_hop parameter is consistent with the rest of the instructions. It's my setup that was different. If someone choses to do it the way I have done, they can see the solution in the list archives.
thanks everyone. John
participants (5)
-
John Fawcett
-
john.ml@erba.tv
-
mr.maX
-
Robert Schetterer
-
Timo Sirainen