Operating System - HP-UX
1832965 Members
2478 Online
110048 Solutions
New Discussion

How do I configure sendmail to allow relaying ?

 
Luis Toro
Regular Advisor

How do I configure sendmail to allow relaying ?

I have a desktop application that sends emails to an exchange relay host. The Exchange group wants to limit the hosts allowed to relay through their server so they're recommending that the desktop app send the emails to their HPUX server, which would in turn forward the emails to the exchange relay host. Currently all I do in sendmail.cf is update the DS line to reflect the relay host. What do I need to do to receive the emails from the various desktops, and forward them on to the exchange relay host ? The emails would be destined to someone@mydomain.com.

Thank you
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: How do I configure sendmail to allow relaying ?

You can receive emails from any desktop on your network so long as the /etc/mail/access file contains a relay allower.

ip_address RELAY

Tab delimited.

If the machine is exposed to the Internet, you chould explicitly authorize each relay.

sendmail by default denies relay to stop spammers.

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

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
Geoff Wild
Honored Contributor

Re: How do I configure sendmail to allow relaying ?

Add to the access map:

mydomain.com relay

makemap hash /etc/mail/access
You might want to also set the DM macro in sendmail.cf

DMmydomain.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.
Karthik S S
Honored Contributor

Re: How do I configure sendmail to allow relaying ?

Check this link,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=14711

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Luis Toro
Regular Advisor

Re: How do I configure sendmail to allow relaying ?

Thanks for the replies.
I followed Geoff's advice since I do not know the desktop IP, but the user is still getting "Relaying denied".
Here is some more specific info:

HPUX server is zeus.mydomain.com (not exposed to the internet)
Exchange relay host is: exch.mydomain.com
Desktops are DHCP and have following names:
user.pcnet.mydomain.com

In sendmail.cf I have:
DMmydomain.com
DSexch.mydomain.com

In /etc/mail/access
mydomain.com
pcnet.mydomain.com
Geoff Wild
Honored Contributor

Re: How do I configure sendmail to allow relaying ?

Sorry - by default, HP's sendmail.cf does not include access db.

You will have to create a new sendmail.cf
Easiest way is to download the sendmail source from sendmail.org

Add:

FEATURE(`access_db')dnl

to the sendmail.mc file. (it should be in cf/cf dir of source tree - just copy one of the ones there)

Then you bulid it:

./Build sendmail.cf

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.
Luis Toro
Regular Advisor

Re: How do I configure sendmail to allow relaying ?

Thanks Geoff.

I had some issues trying to get sendmail to work after downloading a copy from sendmail.org. Turns out the HP version does allow you to "turn on" the access file.
Found a doc:
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062903020
which details how to configure HPs sendmail to relay.

thanks again