On Fri, Jul 3, 2009 at 5:47 PM, Luigi Rosa lists@luigirosa.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Given a Linux mail server with Postfix+Dovecot using MySQL as userbase, a single Linux user for file system access, two mail domains configured (acme1.com acme2.com) and a maildir structure as follows
\var\spool\mail\acme1.com- \user1 \user2 \user3 \var\spool\mail\acme2.com- \user1 \user2 \user3
I want that the mail of user1@acme1.com and user1@acme2.com goes in \var\spool\mail\acme1.com\user1
That's the job for your MTA. Simply make acme2.com and alias to acme1.com
Note that there could be some users not equal between two domains.
You mean that there can be userX@acme2.com but no userX@acme1.com? Well, in the case of aliasing, or address rewriting (BTW, I only know how to use Exim so I am talking about the conceptualization here), if acme2.com is an alias of acme1.com, then users only need to exist on acme1.com. Suppose there is johndoe@acme2.com and no account exists for johndoe@acme1.com then in the case of aliasing the mail to johndoe will fail!
What is the best practice?
- Alias at Postfix level
I was going to say yes, but please note my explanation above.
- The same maildir path specified in MySQL record
Not really. Doesn't sound good. Deliver mail based on the existence/validity of e-mail account.
- ln -s between \var\spool\mail\acme1.com\user1 and \var\spool\mail
acme2.com\user1
Forget this.
- Else? (Dovecot virtual mailbox)
I haven't tried this at all.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
"If you have nothing good to say about someone, just shut up!." -- Lucky Dube