Sendmail host multiple domains

fullauto2012

Active Member

Thanks: 25
Messages: 168

#1
I just had a friend of mine as if I can host a couple of email addresses for him. I have a domain already with sendmail working and properly masqueraded. But I'm unsure how to host multiple domains. Do I simply add the domain to the access, relay-domains, and local-host-names files and run make?
 

drhowarddrfine

Son of Beastie

Thanks: 871
Messages: 2,720

#2
obsigna No, he cannot use postfix to help with this. I'm going to bed and intend to have a lousy weekend. If I have the chance, I'll post how we do it unless, hopefully, someone else does.
 

nforced

Member

Thanks: 8
Messages: 87

#3
I agree Postfix should be used over Sendmail for a large number of reasons, mainly configuration. Do whatever's needed to migrate.
 

drhowarddrfine

Son of Beastie

Thanks: 871
Messages: 2,720

#4
I'm having a lousy weekend and it will continue into this week so I hope I post this correctly.

1) edit /etc/mail/local-host-names to include the other domain names. Simple, example.com will do.
2) Assuming the mail is just being forwarded to something like gmail, add the from/to addresses to /etc/mail/virtusertable. Example:
Code:
joe@yourdomain.com joe@gmail.com

bob@hisdomain.com  bob@gmail.com
3) do makemap hash virtusertable < virtusertable to create that database for the new users.

4) Restart sendmail service sendmail onerestart and send a test email.

I have not included information on how to handle MX records on your nameserver.
 

ShelLuser

Son of Beastie

Thanks: 1,415
Messages: 3,073

#5
Well, Drhoward beat me to it. One small addition though: it might be easier to simply issue # make maps to activate virtusertable. This will do the same thing but uses an (IMO) easier to remember command.

I also would like to share my strong disagreements about Postfix over Sendmail. While it is true that Sendmail has a bit of a learning curve where its configuration goes, fact of the matter is that once you grasp its basics (which... really isn't all that difficult) then you may well end up with an MTA which is far more flexible and tunable than Postfix is.

There are situations in which you'd have to rely on another delivery agent (procmail comes to mind) while Sendmail has out of the box support for them, msp being one of them.

Just for the record: I use both Sendmail and Postfix and it's that experience which I base my opinion on.
 
OP
OP
fullauto2012

fullauto2012

Active Member

Thanks: 25
Messages: 168

#6
So, essentially you just tell sendmail you will accept mail for the new domain (edit local-host-names), add the domain to the friendly list (access), create a virtual user (edit virtual user table), and send map the address to a local account?

Am I getting all the right?
 
Top