1833785 Members
2997 Online
110063 Solutions
New Discussion

sendmail

 
SOLVED
Go to solution
Linda Lux
Regular Advisor

sendmail

My network person is telling me my HP server is showing as an open relay - so my sendmail is being refused. How can I change my server to only sendmail from itself and not acted as an open relay for any server on our network to use.
If it isn't one thing, it's another
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: sendmail

If all you want to do is send mail then sendmail does not have to run as a daemon. Sendmail only needs to run as a daemon if you need it to receive mail.
If it ain't broke, I can fix that.
Linda Lux
Regular Advisor

Re: sendmail

I am new at this, so explain this further:

If it isn't one thing, it's another
Uday_S_Ankolekar
Honored Contributor

Re: sendmail

stop sendmail process on your hpux server.
You don't have to run this all the time if your server is not meant for receive mails
/sbin/init.d/sendmail stop.

-USA..
Good Luck..
A. Clay Stephenson
Acclaimed Contributor

Re: sendmail

1) Execute /sbin/init.d/sendmail stop
2) Edit /etc/rc.config.d/mailservs and set SENDMAIL_SERVER=0 and save the file.

You should then be able to send mail (internally and externally) just as you always have but no external email will be received.
If it ain't broke, I can fix that.
Linda Lux
Regular Advisor

Re: sendmail

So if a user on the HPUX sends a confirmation from our application to user@whater.com it will go out to them?
If it isn't one thing, it's another
A. Clay Stephenson
Acclaimed Contributor

Re: sendmail

Now that's an entirely different question. The answer is "yes" is you have sendmail properly configured and "no" otherwise. A very common way to deal with your situation is to designate a smart relay so that all external email processing is haned off to another mail server. Look in the file /etc/mail/sendmail.cf and look for "Smart". The comments will tell you how to set the DS macro.

The difference between running in daemonm mode and what I'll call vanillas mode is that in daemon mode, sendmail is rinning all the time listening for requests from external mail processes. In "vanilla" mode, a new instance of sendmail is spawned with every mail request (from mail, mailx, elm, et al); the new sendmail instance performs its task and then terminates.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: sendmail

Now that's an entirely different question. The answer is "yes" is you have sendmail properly configured and "no" otherwise. A very common way to deal with your situation is to designate a smart relay so that all external email processing is haned off to another mail server. Look in the file /etc/mail/sendmail.cf and look for "Smart". The comments will tell you how to set the DS macro.

The difference between running in daemonm mode and what I'll call vanilla mode is that in daemon mode, sendmail is rinning all the time listening for requests from external mail processes. In "vanilla" mode, a new instance of sendmail is spawned with every mail request (from mail, mailx, elm, et al); the new sendmail instance performs its task and then terminates.
If it ain't broke, I can fix that.
Linda Lux
Regular Advisor

Re: sendmail

Which would you recommend doing?
Set the server to 0? and shut sendmail off?
all of the requests to send mail are from users on the HP server.

Linda
If it isn't one thing, it's another
A. Clay Stephenson
Acclaimed Contributor

Re: sendmail

Do it just as I said earlier and in this order:

1) Execute /sbin/init.d/sendmail stop
2) Edit /etc/rc.config.d/mailservs and set SENDMAIL_SERVER=0 and save the file.

Unless SENDMAIL_SERVER=1 initially the /sbin/init.d/sendmail stop will do nothing so leave it at 1 until the sendmail daemon is terminated THEN edit the config file and set it to 0 so that subsequent reboots will not start the daemon.

After doing these steps, do a test such as
echo "This is test mail." | mail user@somewhere.com.
If it ain't broke, I can fix that.
Sam McKnight
Frequent Advisor

Re: sendmail

You might want to look at the O'Reilly books 'Sendmail' and 'Sendmail 8.13 Companion.' They have good explanations of the features of sendmail.