I used freebsd-update to update from 8.2-RELEASE to 8.4-RELEASE. Then I noticed the daily and weekly digest Emails I used to get, giving system and security information, were no longer coming to me. How do I turn them back on?
root@kg-vm2# mailq
/var/spool/mqueue (4 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
s9H56qlX035068 1979 Fri Oct 17 07:06 MAILER-DAEMON
(Deferred: Connection refused by kg-vm2.kg4.no.)
<root@kg-vm2.kg4.no>
s9H56qlY035068 4339 Fri Oct 17 07:06 MAILER-DAEMON
(Deferred: Connection refused by kg-vm2.kg4.no.)
<root@kg-vm2.kg4.no>
s9H114OY034602 290 Fri Oct 17 03:01 <root@kg-vm2.kg4.no>
(Deferred: Connection refused by kg-vm2.kg4.no.)
<root@kg-vm2.kg4.no>
s9H114lW034637 2653 Fri Oct 17 03:01 <root@kg-vm2.kg4.no>
(Deferred: Connection refused by kg-vm2.kg4.no.)
<root@kg-vm2.kg4.no>
Total requests: 4
root@kg-vm2# uname -a
FreeBSD kg-vm2.kg4.no 8.4-STABLE FreeBSD 8.4-STABLE #0 r270837: Sat Aug 30 13:25:23 CEST 2014
root@kg-vm2:/usr/obj/usr/src/sys/GENERIC amd64
newaliases has been run:root@kg-vm2# ls -l /etc/mail/ali*
-rw-r--r-- 1 root wheel 1688 Aug 30 17:22 /etc/mail/aliases
-rw-r----- 1 root wheel 65536 Sep 2 10:03 /etc/mail/aliases.db
root@kg-vm2# pgrep -lf sendm
517 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue
514 sendmail: accepting connections
Check /var/log/cron and see if the scripts are actually being executed. Then have a look in /var/log/maillog to see if the emails are perhaps stuck and not being sent to the correct user.
I've noticed after some upgrades you need to run newaliases(1) or things will stop working.
Oct 17 15:11:06 secure sm-mta[10313]: s9D818ZK062306: to=myname@mydomain.com, ctladdr=<root@secure.mydomain.com> (0/0), delay=4+12:09:58, xdelay=00:00:00, mailer=esmtp, pri=20372552, relay=mailgateway.mydomain.com., dsn=4.0.0, stat=Deferred: Name server: mailgateway.mydomain.com.: host name lookup failure
root@kg-vm2# sendmail -q -v
Running /var/spool/mqueue/s9J56qDc040763 (sequence 1 of 4)
<root@kg-vm2.kg4.no>... Connecting to local...
220 kg-vm2.kg4.no LMTP ready
>>> LHLO kg-vm2.kg4.no
250-kg-vm2.kg4.no
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 PIPELINING
>>> MAIL From:<>
250 2.5.0 Ok
>>> RCPT To:<root>
>>> DATA
250 2.1.5 Ok
354 Go ahead
>>> .
250 2.1.5 root Ok
<root@kg-vm2.kg4.no>... Sent
Running /var/spool/mqueue/s9J56qDd040763 (sequence 2 of 4)
>>> RSET
250 2.0.0 Ok
<root@kg-vm2.kg4.no>... Using cached LMTP connection for local...
>>> MAIL From:<>
250 2.5.0 Ok
>>> RCPT To:<root>
>>> DATA
250 2.1.5 Ok
354 Go ahead
>>> .
250 2.1.5 root Ok
<root@kg-vm2.kg4.no>... Sent
Running /var/spool/mqueue/s9J114Oq040297 (sequence 3 of 4)
>>> RSET
250 2.0.0 Ok
<root@kg-vm2.kg4.no>... Using cached LMTP connection for local...
>>> MAIL From:<root@kg-vm2.kg4.no>
250 2.5.0 Ok
>>> RCPT To:<root>
>>> DATA
250 2.1.5 Ok
354 Go ahead
>>> .
250 2.1.5 root Ok
<root@kg-vm2.kg4.no>... Sent
Running /var/spool/mqueue/s9J114Db040332 (sequence 4 of 4)
>>> RSET
250 2.0.0 Ok
<root@kg-vm2.kg4.no>... Using cached LMTP connection for local...
>>> MAIL From:<root@kg-vm2.kg4.no>
250 2.5.0 Ok
>>> RCPT To:<root>
>>> DATA
250 2.1.5 Ok
354 Go ahead
>>> .
250 2.1.5 root Ok
<root@kg-vm2.kg4.no>... Sent
Closing connection to local
>>> QUIT
221 2.0.0 Bye
you have mail
For some reason, sendmail on your machine seems to think that mailgateway... is a name server. You should figure out why.
secure# cat resolv.conf
domain mydomain.com
nameserver 192.168.14.4
nameserver 127.0.0.1
secure#
secure#
secure# cat nsswitch.conf
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: release/8.4.0/etc/nsswitch.conf 158266 2006-05-03 15:14:47Z ume $
#
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files
secure#
That is a yes to question 1; yes.
What happens if you donslookup mailgatewayon the machine (the machine where the problematic sendmail is running)? And do anslookup dcas well.
secure# nslookup mailgateway
Server: 192.168.14.4
Address: 192.168.14.4#53
Name: mailgateway.mydomain.com
Address: 192.168.14.70
secure#
secure# nslookup dc
Server: 192.168.14.4
Address: 192.168.14.4#53
Name: dc.mydomain.com
Address: 192.168.14.4
secure#
secure# nslookup -query=mx mydomain.com
Server: 192.168.14.4
Address: 192.168.14.4#53
mydomain.com mail exchanger = 10 mailgateway.mydomain.com.
secure#