Red Hat Bugzilla – Bug 1259414
Sendmail Won't Start on Fresh Install
Last modified: 2015-09-14 08:05:10 EDT
Created attachment 1069455 [details]
My sendmail.mc file as of September 2, 2015
Description of problem:
After a fresh install of Sendmail, Sendmail will not start.
Version-Release number of selected component (if applicable):
Sendmail is version 8.14.7-4
In theory, doing a fresh install should reproduce it.
Steps to Reproduce:
1. yum install sendmail sendmail-cf m4
2. systemctl start sendmail
# systemctl status sendmail
sendmail.service - Sendmail Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/sendmail.service; disabled)
Active: failed (Result: timeout) since Wed 2015-09-02 10:20:45 EDT; 25s ago
Process: 39893 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=killed, signal=TERM)
Process: 39887 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
Process: 39885 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
Sep 02 10:20:45 DMILiveWestWeb1 systemd: sendmail.service operation timed out. Terminating.
Sep 02 10:20:45 DMILiveWestWeb1 systemd: Failed to start Sendmail Mail Transport Agent.
Sep 02 10:20:45 DMILiveWestWeb1 systemd: Unit sendmail.service entered failed state.
Let me know if you need any additional items.
Is there anything related in:
# journalctl -b -u sendmail
Created attachment 1069456 [details]
journalctl -b -u sendmail output
Created attachment 1069458 [details]
I am unable to reproduce the problem. Cleanly provisioned RHEL-7 machine:
# yum install sendmail-cf
Copied your sendmail.mc to /etc/mail.
# systemctl stop sendmail
# systemctl start sendmail
Checked that the sendmail.cf was regenerated.
# systemctl status sendmail
● sendmail.service - Sendmail Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor preset: disabled)
Active: active (running) since Pá 2015-09-04 12:02:41 EDT; 9s ago
Process: 13182 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=0/SUCCESS)
Process: 13174 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
Process: 13156 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
Main PID: 13183 (sendmail)
└─13183 sendmail: accepting connections
zář 04 12:02:41 * systemd: Starting Sendmail Mail Transport Agent...
zář 04 12:02:41 * sendmail: starting daemon (8.14.7): SMTP+queueing@01:00:00
zář 04 12:02:41 * systemd: PID file /run/sendmail.pid not readable (yet?) after start.
zář 04 12:02:41 * systemd: Started Sendmail Mail Transport Agent.
Okay, this was a fun one. I can't clearly explain, so I'll just lay out the solutions.
* Cutting to the chase, the solution consisted of A. Adding the hostname to the /etc/hosts file or B. Adding a "namesearch hostname or host ip". The former was actually listed a need-to-do, I put in the wrong hostname.
* From what I can tell, the above step is new as I never ever did that on RHEL5 or RHEL6. I have to production RHEL6 machines running Sendmail, never touched the hosts file.
Let me know if you'd like to know any additional parameters or factors.
Thank you for all that you guys do! You're my last line of defense and always hate bugging you with this crap!
Consider this Closed/Resolved.
(In reply to Scott Weigand from comment #7)
> * Cutting to the chase, the solution consisted of A. Adding the hostname to
> the /etc/hosts file or B.
Sendmail is a bit pedantic on this. It tries to forward resolve your hostname and reverse resolve your IP and checks whether the results match. The above mentioned problem mostly occur if your reverse DNS doesn't work correctly. The workaround is simple, just adding hostname into /etc/hosts. It works this way at least since I am sendmail maintainer (5+ years).
Closing per comment 7.