Operating System - HP-UX
1833876 Members
1836 Online
110063 Solutions
New Discussion

redirect/aliase a domain in sendmail.

 
someone_4
Honored Contributor

redirect/aliase a domain in sendmail.

Hi everyone.
I am having a sendmail issue here. I have 2 mail servers both running 8.8.6 (working on upgrading to 8.11 soon.) They are both conected to the internet and send and receive mail though an external ip address. They are also both set up on the internal network. When I send email to trough the internet of course they are going to use the external ip address.

I would like somehow to set up a rule or aliases a whole domain.

For example if a mail is going from
user@domaina.com to userb@domainb.net

force sendmail to send anything going to domianb.net to go to lvapp13 (wich is the servername on the internal side) so like this mail can use the ineternal network instead of going all the way out to the internet and come back. I tried to set this up in aliases but it didnt know.
Any one have any ideas?

Richard
6 REPLIES 6
Kevin Wright
Honored Contributor

Re: redirect/aliase a domain in sendmail.

Setup the MX record for the domain in question to use the internal server. I think this is what you are talking about.
someone_4
Honored Contributor

Re: redirect/aliase a domain in sendmail.

Hi Kevin
Yes an Mx record would do that. But My dns server is a public dns server. I cant edit the mx record on the dns server to forward everything to the local host name. I only want to do it for this server. I am looking now to see if there is a way to set up a local MX record.

~ Richard
Sanjay_6
Honored Contributor

Re: redirect/aliase a domain in sendmail.

Hi Richard,

Why don't you submit all your mails to lvapp13 and let lvapp13 send mails to the internet if required and route it to an internal server if the email address is internal. This will also reduce your exposure to external servers.

Hope this helps.

Regds
someone_4
Honored Contributor

Re: redirect/aliase a domain in sendmail.

Sanjay,
one server gets hit pretty hard it has about 7000 users on it.Also this server is for one customer. And we dont want to mess with it.

My original idea was to have one server for incomming and one server for outgoing.But that idea got turned down. :(
Got to work with what I have you know?

~ Richard
Kevin Wright
Honored Contributor

Re: redirect/aliase a domain in sendmail.

I could be wrong, but I don't think you can do this via aliases, like the virtusertables and stuff. The only ways I know to specify where email is forwared to is DNS or the SmartHost variable. If you find a way, let us know.
Christopher Caldwell
Honored Contributor

Re: redirect/aliase a domain in sendmail.

To get host BLAH to recieve mail for a given domain (say a.com), add a.com to /etc/mail/sendmail.cw.

To make host BLAH relay all of the mail it recieved for a.com to host FRED, uncomment the mailertable rulesets in sendmail.cf and add a rule that says

a.com smtp:fred

BTW, in general, I always use fully qualified domain names (even for internal hosts via internal/split DNS). Your mileage may vary.