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


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.

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

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

  • 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

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.

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.