1 (edited by drakino 2010-05-25 03:17:42)

Topic: recipient_delimiter not working, dovecot rejecting it

I am setting up a new install using iRedMail 0.5.1 with the MySQL backend on Centos 5.4, and most everything looks good in my initial testing.  However, one problem I had was getting recipient_delimiter to work.  This is the setting that allows users to make their own e-mail address by doing username+whatever@domain.com

I've tried setting recipient_delimiter in /etc/postfix/main.cf to both + and _ (_ is what I need to migrate), and in both cases, I see the following in my logs:

postfix/smtpd[2790]: connect from mail.domain.com[]
postfix/smtpd[2790]: 721BF4287: client=mail.domain.com[], sasl_method=LOGIN, sasl_username=drakino@domain.com
postfix/cleanup[2794]: 721BF4287: message-id=<4a761236d0adce03e3169a218e34f445@>
postfix/qmgr[2783]: 721BF4287: from=<drakino@domain.com>, size=549, nrcpt=1 (queue active)
roundcube: [24-May-2010 13:26:00 -0500]: User drakino@domain.com []; Message for <drakino_test3@domain.com>; 250: 2.0.0 Ok: queued as 721BF4287
postfix/smtpd[2790]: disconnect from mail.domain.com[]
postfix/smtpd[2800]: connect from mail.domain.com[]
postfix/smtpd[2800]: BD7324288: client=mail.domain.com[]
postfix/cleanup[2794]: BD7324288: message-id=<4a761236d0adce03e3169a218e34f445@>
postfix/qmgr[2783]: BD7324288: from=<drakino@domain.com>, size=1479, nrcpt=1 (queue active)
postfix/smtpd[2800]: disconnect from mail.domain.com[]
amavis[2232]: (02232-02) Passed CLEAN, MYNETS LOCAL [] [] <drakino@domain.com> -> <drakino_test3@domain.com>, Message-ID: <4a761236d0adce03e3169a218e34f445@>, mail_id: KpGBXrnbLg5P, Hits: -10, size: 549, queued_as: BD7324288, 292 ms
postfix/smtp[2797]: 721BF4287: to=<drakino_test3@domain.com>, relay=[]:10024, delay=0.35, delays=0.03/0.02/0/0.29, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=02232-02, from MTA([]:10025): 250 2.0.0 Ok: queued as BD7324288)
postfix/qmgr[2783]: 721BF4287: removed
postfix/pipe[2801]: BD7324288: to=<drakino_test3@domain.com>, relay=dovecot, delay=0.08, delays=0.02/0.03/0/0.03, dsn=5.1.1, status=bounced (user unknown)

I'm interpreting this as postfix receives the message fine from roundcube (721BF4287), throws it to amavis, gets it back as a new message (BD7324288), then sends that into dovecot where it gets bounced with the user unknown error.

Digging into the issue, I believe I found a fix for my setup, but I still wanted to post here in case there is a better way, or to help others that may be attempting to do similar.

In /etc/postfix/master.conf, the following lines exist, this is where postfix is delivering mail to dovecot:

dovecot unix    -       n       n       -       -      pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient} -f ${sender}

I changed the -d to ${user}@${domain}, instead of ${recipient).  This causes postfix to send over drakino@domain.com, instead of drakino_test3@domain.com to dovecot.


Re: recipient_delimiter not working, dovecot rejecting it

Did you test '-f ${sender} -d ${user}@${nexthop} -n -m ${extension}'?


Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee