Operating System - HP-UX
1819803 Members
3212 Online
109607 Solutions
New Discussion юеВ

Sendmail: Is it possible to relay to mail to different mail serv's?

 
Declan Mc Kay
Occasional Advisor

Sendmail: Is it possible to relay to mail to different mail serv's?

Is it possible to configure sendmail to relay emails addressed for a particular domain to their smtp server directly as well as sending all other domain emails out to our ISP for delivery. Current setup is I have one DS entry in my sendmail.cf file which defines my ISP's mail server for relaying, however, I need to configure sendmail so that if there is mail for one particular domain then this goes to their SMTP server directly & not via the relay to our ISP. I have a VPN setup between my servers and this othre domain server so idea is that mail for/from them travels via the VPN but all other mail still relays via our ISP. I think this may be possible...? Anyone any ideas..?
2 REPLIES 2
Geoff Wild
Honored Contributor

Re: Sendmail: Is it possible to relay to mail to different mail serv's?

Don't think you can do it directly, but using the access map, you can relay for another domain and as long as DNS MX records are setup, then you will forward to them.

theirdoamin.com relay



MX records:

theirdoamin.com mail exchanger = 0 mail.theirdoamin.com.

yourdomain.com mail exchanger = 10 mail.yourdoamin.com.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: Sendmail: Is it possible to relay to mail to different mail serv's?

The way to fully handle this situation is this:

1) Configure the doamins for incoming and outgoing mail in the following files:

/etc/mail/virtusertable
/etc/mail/genericstable

These two files are tab delimited reverers for each other. One handles getting the right domain on outbound mail, the other inbound.

the gen_cf script that ships with HP-UX handles creating the necessary hash databases to handle the domain.

If you need individual accounts for individual users in the domains, you'll need entries in /etc/mail/aliases to alias the full domain name someone@your.net: localusername

Bounce sendmail and your're done.

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Examples available.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com