I have configure my sendmail for multiple domains by creating username like

sales@domain1.com
sales@domain2.com
sales@domain3.com

in passwd file

Now I added entry in file /etc/mail/virtusetable like

sales@domain1.com   sales\@domain1.com #escape to count as user not email
sales@domain2.com   sales\@domain2.com
sales@domain3.com   sales\@domain3.com

So when configuring the email client you provide your username as sales@domain1.com,sales@domain2.com etc. I tested with webmail and outlook it works.

Is this the best way to do it ?.Do i need to put the entry in any other file like genericstable.

link|improve this question
From the description that you are giving it is not clear if this setup is working for you or not. – adamo Nov 15 '11 at 9:57
feedback

migrated from stackoverflow.com Nov 12 '11 at 18:31

This question came from our site for professional and enthusiast programmers.

1 Answer

Best way? Probably not.

Though it may work, it is to have a user@hostname in your passwd file. The better way to do it would be to have a sales1, sales2 and sales3 users in your passwd file. Use the name field if you want to identify a full email address in the password file.

The virtuser table would then look like sales@domain1.com sales1 sales@domain2.com sales2 sales@domain3.com sales3

If you have sendmail configured to receive mail at domain1 domain2 and doman3, it should work fine.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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