[OpenIndiana-discuss] Sendmail logging

Jonathan Adams t12nslookup at gmail.com
Tue Jul 21 13:50:15 UTC 2015


additionally, our main.mc looks mostly like this:

root at mailgate2:/etc/mail/cf/cf# grep '^[^#]' main.mc
divert(-1)
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
FEATURE(`access_db')
FEATURE(use_cw_file)
FEATURE(`nocanonify')
FEATURE(`dnsbl', `xbl.spamhaus.org')
FEATURE(`dnsbl', `sbl.spamhaus.org')
FEATURE(`dnsbl', `bl.spamcop.net', `"Spam blocked see:
http://spamcop.net/bl.shtml?"$&{client_addr}')dnl
define(`confLDAP_DEFAULT_SPEC', `-h ldap-server -b
ou=Aliases,dc=domain,dc=com -w 3')dnl
define(`confLDAP_CLUSTER', `domain.com')dnl
define(`ALIAS_FILE', `/etc/mail/aliases,ldap: -k
(&(objectClass=nisMailAlias)(cn=%0)) -v rfc822mailmember')dnl
FEATURE(`virtusertable', `ldap:-b ou=Mail,dc=domain,dc=com -1 -k
"(&(objectClass=sendmailMTAMapObject)(sendmailMTAMapName=virtuser)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAKey=%0))"
-v sendmailMTAMapValue')
define(`confPRIVACY_FLAGS', `restrictqrun,noreceipts,noetrn,goaway')dnl
define(`confDONT_PRUNE_ROUTES', `True')dnl
define(`confCOPY_ERRORS_TO', `postmaster')dnl
define(`confSEPARATE_PROC', `True')dnl
define(`confQUEUE_SORT_ORDER', `time')dnl
define(`confDELIVERY_MODE', `queue all mail')dnl
define(`confDOMAIN_NAME', `mailgate2.domain.com')
define(`SMART_HOST', `[smart-host]')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*    $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3


On 21 July 2015 at 14:46, Jonathan Adams <t12nslookup at gmail.com> wrote:

> The original was a Solaris 10 box, the new one is Illumos, they use
> essentially the same mc file, the "syslog.conf"s are duplicates.
>
> I see sendmail logging when I run /usr/lib/sendmail -oQ<directory>, but I
> don't see it when it's running as a daemon.
>
> syslog appears to be working fine, MailScanner is writing to it, as are
> SpamAssassin and Clam AV (on both localhost, and via the external address)
>
> I've turned off ipfilter in case that was the issue as well, and it
> doesn't appear to have changed anything.
>
> When I truss the sendmail daemon, there is nothing in the output that
> seems to mention "log" ...
>
> I am running it in an exclusive-ip zone, I'm not sure if that should make
> a difference ...
>
> root at mailgate2:~# grep -i mail /etc/syslog.conf
> *.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages
> mail.info                       ifdef(`LOGHOST', /var/log/syslog,
> @loghost)
> #mail.debug                     ifdef(`LOGHOST', /var/log/syslog, @loghost)
>
> root at mailgate2:~# svccfg -s smtp:sendmail listprop | grep -i local
> config/local_only                    boolean  false
> config-file/entities                 fmri     file://localhost/etc/mail/
> sendmail.cf
> nsswitch/entities                    fmri
> file://localhost/etc/nsswitch.conf
>
> root at mailgate2:~# ps -ef | grep -i [s]endmail
>     root 25118 19018   0 14:42:11 ?           0:00 /usr/lib/sendmail -bd
>    smmsp 17784  9100   0 13:02:06 ?           0:00 /usr/lib/sendmail -Ac
> -q15m
>     root 19018  9100   0 13:21:43 ?           0:00 /usr/lib/sendmail -bd
>     root 25120 19018   0 14:42:13 ?           0:00 /usr/lib/sendmail -bd
>
> root at mailgate2:~# grep loghost /etc/hosts
> 127.0.0.1       localhost loghost
> ::1     localhost loghost
>
> root at mailgate2:~# svcs -a | egrep "sendmail|system-log"
> online         13:02:05 svc:/network/sendmail-client:default
> online         13:21:43 svc:/network/smtp:sendmail
> online         14:03:19 svc:/system/system-log:default
>
> I was wondering if it was due to permissions for it's uid:
>
> root at mailgate2:~# truss -f -p 19018
> 19018:      *** SGID: rgid/egid/sgid = 0 / 25 / 25  ***
> 19018:  pollsys(0x08045090, 3, 0x08045148, 0x00000000) (sleeping...)
> 19018:  pollsys(0x08045090, 3, 0x08045148, 0x00000000)  = 0
> 19018:  lwp_sigmask(SIG_SETMASK, 0x00002000, 0x00000000, 0x00000000,
> 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
>
> ...
> ^C
> root at mailgate2:~# grep 25 /etc/passwd
> smmsp:x:25:25:SendMail Message Submission Program:/:
>
> I'd prefer not to compile my own sendmail to check if it was a compile
> option, but I will if you think it'd help.
>
> Jon
>
> On 21 July 2015 at 13:52, Gary Mills <gary_mills at fastmail.fm> wrote:
>
>> On Tue, Jul 21, 2015 at 09:07:06AM +0100, Jonathan Adams wrote:
>> >
>> > They are all logging to syslog, but on the original servers I get the
>> > "from=" headers and the "to=" headers logged in syslog, and on the new
>> > server I only get "to=" logged to syslog, and then only when the email
>> is
>> > being forwarded to the smart-host, not on receipt.
>>
>> Can you determine what has changed between the original server and the
>> new one?  Is /etc/syslog.conf the same, particularly the line that
>> redirects to /var/log/syslog?  The selector should be `mail.debug',
>> which handles all log messages with the `mail' facility.  You might
>> need to disable svc:/system/system-log:default temporarily and start
>> syslogd in debug mode instead.  This will show you all of the log
>> messages sent to syslogd.
>>
>> If it's not syslog that's changed, you should look at how logging is
>> specified in the sendmail configuration.
>>
>> --
>> -Gary Mills-            -refurb-                -Winnipeg, Manitoba,
>> Canada-
>>
>> _______________________________________________
>> openindiana-discuss mailing list
>> openindiana-discuss at openindiana.org
>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>
>
>


More information about the openindiana-discuss mailing list