Gmail users can get virtually unlimited email addresses by using $name+$suffix@gmail.com ("plus addressing").

I'd like to have that for my own mail server, which is running Postfix. The mailbox and alias data are stored in a MySQL database.

I suspect that the alias configuration needs to be modified, so that user+foo@example.org gets mapped to the user@example.org mailbox, but I fail to find out how.

So, is it possible? How?


Apart from setting

recipient_delimiter = +

I also had to modify master.cf, so that maildrop gets not only the recipient passed, but the real user:

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=Debian-exim argv=/usr/bin/maildrop -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}

Blog post: http://cweiske.de/tagebuch/postfix-plus-addressing.htm

  • You asked about postfix, yet this mentions exim, which is different SMTP server. BTW, note that if you have real IMAP server (not just mailbox), using LMTP is much faster than maildrop. And if you use LMTP with Cyrus, you will not need this. – mvp Apr 25 '13 at 10:44
  • 1
    the user is debian-exim, but it's still postfix. – cweiske Apr 25 '13 at 10:49
  • Saved my day with {nexthop}. I didn't even knew that existed. Thank you. – TCB13 Jan 2 '16 at 23:46
  • Thanks for the answered. It helped me a lot. I am using postfix + procmail + dovecot in a virtualmin server. I just added the "recipient_delimiter = +" line and the plus addressing looks to be working fine. Should I do anything additional for procmail or dovecot? Also, is it possible to restrict this domain-wise? So that I can enable this plus addressing only for some domains on my server? Thanks. – Vishnu Jan 5 '19 at 16:06

You did not say what mail server is storing your emails. These days, it should be one of the IMAP servers - like Cyrus, Dovecot, Courier, ...

I personally like Cyrus IMAP. It supports this with relative ease:

Plus addressing - allows direct delivery to a particular mailbox (other than an INBOX). This is done via an address of the form: username+mailfolder@domain, which will deliver to the user's INBOX.mailfolder folder (or altnamespace equivalent). This submailbox must allow the posting user the 'p' right.

Adding 'p' right is important step - otherwise all mail (using + or not) will be delivered to username INBOX.

Note that you should use LMTP (local mail transport protocol) to deliver your mail from postfix to IMAP server and also need to configure postfix recipient_delimiter (or recipient_delimiters) as described here:

recipient_delimiter = +
  • as long as the mails do not reach the user/maildrop because the mail address is not recognized by the receiving server, IMAP server support does not matter. – cweiske Apr 25 '13 at 10:10
  • thanks for giving the hint about "plus adressing". with that name, I found the solution. – cweiske Apr 25 '13 at 10:30

The master.cf line for Dovecot:

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

With Postfix 2.4 and earlier, use ${nexthop} instead of ${domain}


  • Thanks. Ideed, The postfix solution alone is not enough if you use Dovecot. You'll need this extra config for Dovecot. – David Verdin Apr 6 '17 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.