Bug 1259414 - Sendmail Won't Start on Fresh Install
Sendmail Won't Start on Fresh Install
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sendmail (Show other bugs)
7.1
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Jaroslav Škarvada
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-02 10:26 EDT by Scott Weigand
Modified: 2015-09-14 08:05 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-14 08:05:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
My sendmail.mc file as of September 2, 2015 (7.17 KB, text/plain)
2015-09-02 10:26 EDT, Scott Weigand
no flags Details
journalctl -b -u sendmail output (3.37 KB, text/plain)
2015-09-02 10:42 EDT, Scott Weigand
no flags Details
/var/log/maillog (5.38 KB, text/plain)
2015-09-02 10:47 EDT, Scott Weigand
no flags Details

  None (edit)
Description Scott Weigand 2015-09-02 10:26:57 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

How reproducible:

In theory, doing a fresh install should reproduce it.

Steps to Reproduce:
1. yum install sendmail sendmail-cf m4
2. systemctl start sendmail
3. fail

Actual results:

# 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[1]: sendmail.service operation timed out. Terminating.
Sep 02 10:20:45 DMILiveWestWeb1 systemd[1]: Failed to start Sendmail Mail Transport Agent.
Sep 02 10:20:45 DMILiveWestWeb1 systemd[1]: Unit sendmail.service entered failed state.

Expected results:

Sendmail starts.

Additional info:

Let me know if you need any additional items.
Comment 1 Jaroslav Škarvada 2015-09-02 10:32:38 EDT
Is there anything related in:
# journalctl -b -u sendmail

and
/var/log/maillog
?
Comment 3 Scott Weigand 2015-09-02 10:42:09 EDT
Created attachment 1069456 [details]
journalctl -b -u sendmail output
Comment 4 Scott Weigand 2015-09-02 10:47:17 EDT
Created attachment 1069458 [details]
/var/log/maillog
Comment 5 Jaroslav Škarvada 2015-09-04 12:06:56 EDT
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)
   CGroup: /system.slice/sendmail.service
           └─13183 sendmail: accepting connections

zář 04 12:02:41 * systemd[1]: Starting Sendmail Mail Transport Agent...
zář 04 12:02:41 * sendmail[13183]: starting daemon (8.14.7): SMTP+queueing@01:00:00
zář 04 12:02:41 * systemd[1]: PID file /run/sendmail.pid not readable (yet?) after start.
zář 04 12:02:41 * systemd[1]: Started Sendmail Mail Transport Agent.
Comment 6 Jaroslav Škarvada 2015-09-04 12:07:41 EDT
sendmail-8.14.7-4.el7.x86_64
Comment 7 Scott Weigand 2015-09-05 12:04:15 EDT
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.
Comment 8 Jaroslav Škarvada 2015-09-14 08:05:10 EDT
(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.

Note You need to log in before you can comment on or make changes to this bug.