有些人遇到过类似的问题,但没有解决我的问题;我的日志文件
# tail -f /var/log/unattended-upgrades/unattended-upgrades.log
2018-02-18 13:25:37,656 DEBUG No conffiles in deb
'/var/cache/apt/archives/libgfortran3_4.9.2-10+deb8u1_amd64.deb' (There
is no member named 'conffiles')
2018-02-18 13:25:37,657 DEBUG blacklist: []
2018-02-18 13:25:37,658 DEBUG whitelist: []
2018-02-18 13:25:37,658 DEBUG InstCount=23 DelCount=0 BrokenCount=0
2018-02-18 13:25:37,660 INFO Packages that will be upgraded: cpp-4.9
g++-4.9 gcc-4.9 gcc-4.9-base gcc-4.9-base:i386 libasan1 libatomic1
libcilkrts5 libgcc-4.9-dev libgcc1 libgcc1:i386 libgfortran3 libgomp1
libitm1 liblsan0 libobjc-4.9-dev libobjc4 libquadmath0 libstdc++-4.9-dev
libstdc++6 libstdc++6:i386 libtsan0 libubsan0
2018-02-18 13:25:37,662 INFO Writing dpkg log to '/var/log/unattended-
upgrades/unattended-upgrades-dpkg.log'
2018-02-18 13:27:02,483 INFO All upgrades installed
2018-02-18 13:27:02,485 DEBUG Extracting content from
'/var/log/unattended-upgrades/unattended-upgrades-dpkg.log' since '2018-
02-18 13:25:37.661632'
2018-02-18 13:27:02,511 DEBUG Sending mail to '[email protected]'
2018-02-18 13:27:02,713 DEBUG mail returned: 0
# cat /etc/apt/listchanges.conf
[apt]
frontend=pager
[email protected]
confirm=0
save_seen=/var/lib/apt/listchanges.db
which=news
但是消息没有发送到我的电子邮件地址。当然,mailx 可以完成这项工作:
$ echo "Just testing mailx" | mail -s "Yooo woot" [email protected]
我收到了我的消息...我在我的 .mailrc 文件中使用 smtp 配置
那么我能做什么呢?感谢您的帮助
您是否为异地邮件传递配置了系统范围的 MTA?无人值守升级不会以您的名义运行,因此它不会读取您的
~/.mailrc
. 如果您使用 Debian 默认运行,您可能已经安装了 Exim(检查apt-cache policy exim4
)。运行dpkg-reconfigure exim4-config
以通过智能主机或直接 MX 配置远程交付,具体取决于您的连接(基本上,从您的 传输设置~/.mailrc
)。这也将使您的个人 SMTP 设置变得不必要。/var/log/exim4/mainlog*
如果它仍然不起作用,请检查线索。