Operating System - HP-UX
1833059 Members
2579 Online
110049 Solutions
New Discussion

sendmail relay on one internal NIC, not on outside port?

 
SOLVED
Go to solution
A. Daniel King_1
Super Advisor

sendmail relay on one internal NIC, not on outside port?

Hi, folks.

1) How does one set up sendmail to listen on only one port in a multi-NIC system?

2) The default configuration in HP-UX 11.0 and above does not appear to allow relaying. How does one set up relaying for a subnet, say 10.56.11.* - which is internal - for outgoing mail only?

The idea is NOT to have port 25 open to the world, but to have it relaying to the world for internal addresses.

Thanks.
Command-Line Junkie
4 REPLIES 4
Stuart Abramson_2
Honored Contributor
Solution

Re: sendmail relay on one internal NIC, not on outside port?

 
Steven E. Protter
Exalted Contributor

Re: sendmail relay on one internal NIC, not on outside port?

DAEMON_OPTIONS(`Port=smtp,Addr=66.92.143.100, Name=MTA')

in sendmail.mc

Attaching an untested but probably usable hp-ux script for building the hash databases and using the option.

Use a real IP address.

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
A. Daniel King_1
Super Advisor

Re: sendmail relay on one internal NIC, not on outside port?

Thanks, Stuart.

I've done something similar for the time being.

Steven ... very good. I will try this soon and assign points accordingly.
Command-Line Junkie
Christopher Caldwell
Honored Contributor

Re: sendmail relay on one internal NIC, not on outside port?

In sendmail.cf [search for DaemonPortOptions]:

O DaemonPortOptions=Addr=A.B.C.D

where A.B.C.D is an address on the NIC card you want to listen on.

To relay from internal hosts, activate the access db (uncomment the rules marked access in sendmail.cf)

Edit the file access. Add a line as follows:
10.56.11 RELAY

Build the access file
#makemap dbm /etc/mail/access < /etc/mail/access

Restart sendmail (because you changed sendmail.cf -- additional entries can be made in access without restarting sendmail).