Sendmail service in Solaris 10
Posted: Mon Feb 06, 2012 8:00 pm
Last Friday (02/03/2012), I compiled sendmail 8.12.5 and the global zone works fine while non-global zones had issues initially.
Then, I created empty access file in /etc/mail and created dbm files that started one NGZ but the other still behaved strangely. I didn't have much time last Friday to really look into the root cause so I picked up again today.
The problematic NGZ does not log anything in /var/log/syslog. It was working before until 11/02/2011 (according to the timestamp on the log file). I restarted sysglogd several times last Friday and that didn't make any difference. I knew it is not syslogd's issue then. All logs are getting entries except for this specific NGZ. That led me to the sendmail issue.
Sendmail on this NGZ (badmingtonequipments.com) can send email but could not accept incoming traffic.
"/usr/lib/sendmail -Ac -q15m" was at presence but "/usr/lib/sendmail -bd -q15m" was missing.
I went to /var/adm/messages and found it was complaining about a syntax in local.cf:
I did a comparison with sendmail.cf and found sendmail.cf has
while local.cf has:
Since the local.cf was from 8.13.8 (long time ago), I couldn't tell any more so I just copied sendmail.cf into a new local.cf and it started up fine. The only difference this NGZ has is it has an extra option after "/usr/lib/sendmail -bd -q15m":
This makes me very curious. Why does sendmail require a local.cf to start? I renamed local.cf to a temp name and tried restarting it. For sure, it did not come up and /var/adm/messages has the following error:
That means it is looking for local.cf to start sendmail daemon.
Strange thing is, none of the configuration files has this specified in them. I know Solaris 10's svc has some config/methods that might provide me some clues so I went to /lib/svc/method/smtp-sendmail and check how it handles the startup process. Here is the only local.cf I found:
This file is identical with global zone and another NGZ. That means the service property of sendmail must be different. I then ran the following command on all zones and results are different:
badmintonequipments.com
Another command shows the difference as well:
badmintonequipments.com
Why are they showing differently? I totally have no clue. All NGZs are cloned from a template and should have identical config. I don't know why.
In sendmail's man page, the section of "Enabling Access to Remote Clients", it addresses:
After I ran the two commands, I had to restart sendmail to get rid of the -C /etc/mail/local.cf.
At least, they are consistent now but it still does not resolve syslog issue. It is still not logging mail activities.....
Then, I created empty access file in /etc/mail and created dbm files that started one NGZ but the other still behaved strangely. I didn't have much time last Friday to really look into the root cause so I picked up again today.
The problematic NGZ does not log anything in /var/log/syslog. It was working before until 11/02/2011 (according to the timestamp on the log file). I restarted sysglogd several times last Friday and that didn't make any difference. I knew it is not syslogd's issue then. All logs are getting entries except for this specific NGZ. That led me to the sendmail issue.
Sendmail on this NGZ (badmingtonequipments.com) can send email but could not accept incoming traffic.
"/usr/lib/sendmail -Ac -q15m" was at presence but "/usr/lib/sendmail -bd -q15m" was missing.
I went to /var/adm/messages and found it was complaining about a syntax in local.cf:
Code: Select all
Feb 6 10:15:52 badmintonequipments sendmail[23073]: [ID 801593 mail.crit] NOQUE
UE: SYSERR(root): /etc/mail/local.cf: line 61: invalid V line vendor code: "Sun"
Code: Select all
V10/Berkeley
Code: Select all
V10/Sun
Code: Select all
/usr/lib/sendmail -bd -q15m -C /etc/mail/local.cf
Code: Select all
Feb 6 11:10:22 badmintonequipments sendmail[23524]: [ID 801593 mail.crit] NOQUEUE: SYSERR(root): /etc/mail/local.cf: line 0: cannot open: No such file or directory
Strange thing is, none of the configuration files has this specified in them. I know Solaris 10's svc has some config/methods that might provide me some clues so I went to /lib/svc/method/smtp-sendmail and check how it handles the startup process. Here is the only local.cf I found:
Code: Select all
local=`/usr/bin/svcprop -p config/local_only $SMF_FMRI 2>/dev/null`
if [ $? = 0 -a "$local" = "true" ]; then
OPTIONS="$OPTIONS -C /etc/mail/local.cf"
fi
Code: Select all
/usr/bin/svcprop -p config/local_only svc:/network/smtp:sendmail ; echo $?
false
0
Code: Select all
/usr/bin/svcprop -p config/local_only svc:/network/smtp:sendmail ; >
true
0
Code: Select all
% svcprop sendmail | m
config/local_only boolean false
Code: Select all
% svcprop sendmail | m
config/local_only boolean true
In sendmail's man page, the section of "Enabling Access to Remote Clients", it addresses:
It looks like I can manually turn it off by the above command and restart it.Enabling Access to Remote Clients
On an unmodified system, access to sendmail by remote
clients is enabled and disabled through the service manage-
ment facility (see smf(5)). In particular, remote access is
determined by the value of the local_only SMF property:
svc:/network/smtp:sendmail/config/local_only = true
A setting of true, as above, disallows remote access; false
allows remote access. The default value is true.
The following example shows the sequence of SMF commands
used to enable sendmail to allow access to remote systems:
# svccfg -s svc:/network/smtp:sendmail setprop config/local_only = false
# svcadm refresh svc:/network/smtp:sendmail
See svcadm(1M) and svccfg(1M).
Note, however, on a system where any of the sendmail(4)
files have been customized, setting this property might not
have the intended effect. See sendmail(4) for details.
After I ran the two commands, I had to restart sendmail to get rid of the -C /etc/mail/local.cf.
At least, they are consistent now but it still does not resolve syslog issue. It is still not logging mail activities.....