- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sendmail
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2008 12:52 PM
11-17-2008 12:52 PM
I'm running HP-UX 11.11. I'm working on system security, and one of the recommendations from a recent security audit is to shutdown sendmail, if possible. I recently installed the 8.13.3 version of sendmail on our test server and configured the /etc/mail/submit.cf file to send mail out to our email server for delivery of mail. The sendmail daemon is not running. Delivery of outgoing mail works fine. However, local mail to root and other mail that should stay local does not get delivered to root on the local host.
I have created the smmsp user and group, and have tried several changes to the submit.cf file, but still cannot deliver local mail to the local host. All mail seems to get sent to our mail server instead. Mail for systems administrators should be sent to our mail server for delivery.
Does anyone know how to send local mail (like root mail) to the local and send other mail (eg. someuser@ourdomain.com) to our mail server?
Thanks,
Ray Harris.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 04:52 AM
11-18-2008 04:52 AM
Re: Sendmail
So deactivating sendmail is not always the best way of securing things.
You should modify the listening port in /etc/mail/sendmail.cf to listen only on 127.0.0.1 like
O ClientPortOptions=Family=inet, Address=127.0.0.1
With this setup everything should work fine again. From the security point of view you now have an open port 25 listening on localhost. But this does not matter because those users should be able to send mail anyway.
My 2 cents,
Armin
PS: Assign points if you find answers useful!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 05:01 AM
11-18-2008 05:01 AM
Re: Sendmail
To answer your question, I'd need to at least see the DS directive in sendmail.cf
Take a look at /var/adm/mail.log to see whats going on with this mail.
Further it would be helpful to see the commands or cron job entries that are sending the mail to get some contest.
Normally, even if you relay all mail with a DS directive, local mail gets delivered.
However without sendmail running, it may be getting auto rejected.
Additional information required to give good help.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 05:04 AM
11-18-2008 05:04 AM
Re: Sendmail
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 08:11 AM
11-18-2008 08:11 AM
Re: Sendmail
As for settings, I have:
O DaemonPortOptions=Family=inet, Address=127.0.0.1
and DS is:
DSlocalhost
Thanks,
Ray Harris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 08:12 AM
11-18-2008 08:12 AM
Re: Sendmail
As for settings, I have:
O DaemonPortOptions=Family=inet, Address=127.0.0.1
and DS is:
DSlocalhost
The last entry in the mail log is:
Nov 18 08:44:46 newpc sendmail[9213]: mAIDifNc009213: to=root, ctladdr=reharris (259/20), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=30129, relay=gwiaout.crhc.org. [198.212.6.44], dsn=2.0.0, stat=Sent (Ok)
Thanks,
Ray Harris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 09:10 AM
11-18-2008 09:10 AM
Re: Sendmail
Now the configuration is splitted into 2 processes configured with sendmail.cf and submit.cf.
The sendmail.cf is responsible for receiving mail, submit.cf for sending mail. Local delivery is part of receiving, therefore you need a receiving configuration.
You need to modify DaemonPortOptions in sendmail.cf, not in submit.cf!
I don't see any reason why DSlocalhost makes any sense because it's implicitly localhost if not set.
The syslog entry looks OK. But it looks like DS is set to gwiaout.crhc.org or [198.212.6.44] in submit.cf.
For some reason your address is not recognized as local. Did you configure anything else?
From my point of view I'd start over from the beginning, and just change DaemonPortOptions and DS.
My 2 cents,
Armin
PS: Assign points if you find answers useful!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2008 09:56 AM
11-18-2008 09:56 AM
Re: Sendmail
In the submit.cf file, DS is:
DS
and the D{MTAHost} entry is:
D{MTAHost}[gwiaout.crhc.org]
Thanks,
Ray Harris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 02:01 AM
11-19-2008 02:01 AM
Re: Sendmail
"All messages will be forwarded to the ${MTAHost}."
This seems to work exactly as described.
There is still a DS available in 8.13.
Quick guess: Unset MTAHost and set the smart relay DS again.
My 2 cents,
Armin
PS: Assign points if you find answers useful!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 02:05 AM
11-19-2008 02:05 AM
Re: Sendmail
I want you to kindly remind you to follow the rules of this forum.
It might happen that you won't get any answers in the future if you ignore the efforts of those who answer your questions!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 02:24 AM
11-19-2008 02:24 AM
Re: Sendmail
http://forums13.itrc.hp.com/service/forums/helptips.do?#28
Keep on foruming,
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 06:47 AM
11-19-2008 06:47 AM
Re: Sendmail
I have tried all the suggestions. None work. Seems all mail (remote and local) gets sent to the mail server.
It's also interesting to note that only the 'mailx' command will now send mail. The regular mail command fails to send mail.
Thanks,
Ray Harris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 10:39 AM
11-19-2008 10:39 AM
Re: Sendmail
What changes did you make to the default configuration? Did you set DH, DR? Anything else? Did you set MTAHost back to the default [127.0.0.1]?
Check /usr/newconfig/etc/mail for differences from default config files!
Did local delivery work in the default setup?
From my point of view your setup needs only 2 modifications from the default setup:
1. DaemonPortOptions in sendmail.cf
2. DS in submit.cf
You can always try test mode like:
sendmail -Csubmit.cf -bt
> /try smtp root
This should write *LOCAL* some lines later for local addresses.
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 11:20 AM
11-19-2008 11:20 AM
Re: Sendmail
I renamed the submit.cf file. After doing so, I was still able to send out-bound mail, and the mail command now functions again.
I just tried a mail -d root command to send local mail, and that worked fine. Without the -d option, it fails to send local mail.
Here are the errors showing up in the mail.log file for local mail sent without the -d option (eg. mail root):
Nov 19 13:11:45 newpc sendmail[26215]: mAJGtKHq022966: to=root@localhost, ctladdr=root (0/3), delay=01:16:25, xdelay=00:03:19, mailer=local, pri=300010, dsn=4.0.0, stat=Deferred: local mailer (/usr/bin/rmail) exited with EX_TEMPFAIL
Nov 19 13:11:54 newpc sendmail[26369]: mAJI9st8026367: timeout waiting for input from local during Draining Input
Nov 19 13:13:13 newpc sendmail[26369]: mAJI9st8026367: to=root, ctladdr=root (0/3), delay=00:03:19, xdelay=00:03:19, mailer=local, pri=120010, dsn=4.0.0, stat=Deferred: local mailer (/usr/bin/rmail) exited with EX_TEMPFAIL
Thanks,
Ray Harris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 11:31 AM
11-19-2008 11:31 AM
Re: Sendmail
After any changes to sendmail.cf you need to restart the sendmail daemon to have any effect.
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
As for settings, I have:
O DaemonPortOptions=Family=inet, Address=127.0.0.1
and DS is:
DSlocalhost
The DS directive and deamon options only permit inbound mail from localhost, that is good.
The DSlocalhost option tries to use the local system to relay mail. That is bad. Your relay server needs to be a system set up to get your mail to its final destination.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 01:24 PM
11-19-2008 01:24 PM
Solution/usr/include/sysexits.h lists EX_TEMPFAIL as:
EX_TEMPFAIL -- temporary failure, indicating something that is not really an error. In sendmail, this means that a mailer (e.g.) could not create a connection, and the request should be reattempted later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 10:12 AM
11-20-2008 10:12 AM
Re: Sendmail
Thanks,
Ray Harris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 04:32 AM
11-24-2008 04:32 AM
Re: Sendmail
It's always a good idea to place any server into DNS.
What are the permissions of /var/mail?
/var/mail should be 775 owned by root:mail.
Do the mail files have the right permissions?
The mailfiles have to be 660 owned by
My 2 cents,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 05:43 AM
11-24-2008 05:43 AM
Re: Sendmail
Nov 24 08:28:44 hptest sendmail[19910]: mAODShRG019910: to=root, ctladdr=root (0/3), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=3001
7, relay=gwiaout.crhc.org. [198.212.6.44], dsn=2.0.0, stat=Sent (Ok)
It seems that since the MTA is set to the mail server, it wants to send all mail there. If the mail server doesn't know what to do with it, it'll toss it into the bit bucket.
I'm thinking we're gonna set up a folder on the mail server to catch all that mail, and configure the submit.cf and sendmail.cf files for send_only mode.
Thanks,
Ray Harris.