On 19/05/2012 9:21 AM, mouss wrote:
Le 19/05/2012 04:01, john a écrit :
I recently "upgraded" my server to Debian 6.
One of the things that seems to have been changed in the Postfix-Dovecot
setup is the configuration of the "mailbox_command".

In my old setup the command was

mailbox_command = /usr/lib/dovecot/dovecot-lda -f ${sender} *-d
${recipient}* -m ${extension}

in the new setup the command is

mailbox_command = /usr/lib/dovecot/dovecot-lda -f ${sender} *-d
${user}@${nexthop}* -m ${extension}

Similarly master.cf has also changed

dovecot   unix  -       n       n       -       -       pipe
     flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f
${sender} *-d ${recipient}* -m ${extension}

new setup

dovecot   unix  -       n       n       -       -       pipe
     flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f
${sender} *-d ${user}@${nexthop}* -m ${extension}


Which is better and why?



For precise infos on the meaning and expansion of these variables, see
        http://www.postfix.org/pipe.8.html

it really depends on your LDA and on what you want to achieve, but in
general, I'd say the order of pref is:

1- ${user}@${domain}  (but this is only available for postfix>= 2.5)
2- ${user}@${nexthop}
3- ${recipient}

to see why, think about delivering an address with an extension:
joe+extensi...@example.com (assuming recipient_delimiter = +).

you generally want mail for this address to be delivered to the mailbox
of j...@example.com (possibly in a "extension1" folder).

of course, if your LDA can "parse" addresses, then this handling may be
delegated to the LDA. but since postfix functionality comes for free...

Thanks for the pointer to pipe document, I had Googled, but I got a mass of not very useful hits.

OK, so if I got this right, were to continue using ${recipient} then I am passing /joe+extens...@example.com/ to the LDA which may not be good.

I assume that ${domain} is extracted from the recipient address and therefor might possible be blank (null), but in the case above should result in /example.com/. Therefore ${user}@${domain} could give me /joe /(assuming an address of just/jo/e) or /j...@example.com/ (assuming the example above).

Whereas, it appears that ${nexthop} is either equals${domain} if the address is as above or ${mydomain} again assuming the the recipient address is just /joe,/ right?/

/If I am right, big if, then it would appear to be better to use ${domain} rather than ${nexthop}. However, rereading the Dovecot LDA docs I might be better using ${recipient} as it appears that Dovecot parse the arguments anyway.

Oh well, back to the docs.

Thanks for the help, but I think I am going to do a lot more reading!

JohnA

Reply via email to