Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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 = +
share|improve this answer
    
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
add comment
up vote 1 down vote accepted

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}
share|improve this answer
    
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
    
the user is debian-exim, but it's still postfix. –  cweiske Apr 25 '13 at 10:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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