我从Ubuntu Desktop安装了Postfix包及其依赖项.
echo "This is the body of the email" | mail -s "This is the subject line" myemail@gmail.com
然后,如果来自ZoneMinder的警报发送电子邮件,我会得到以下信息
Apr 16 17:05:18 ubuntu postfix/local[11541]: warning: hash:/etc/aliases is unavailable. open database /etc/aliases.db: No such file or directory
如果我运行postqueue -q我得到排队的电子邮件(别名数据库不可用)
A09B4A40C16 422 Thu Apr 16 16:59:37 destination@email.net (alias database unavailable) root@nameofthehost.net
我尝试按照以下其他帖子的建议将pownership设置为postfix
sudo chown postfix:postfix -R /var/lib/postfix
并重新启动后缀,但没有帮助.
main.cf具有以下内容
smtpd_banner = $myhostname ESMTP $mail_name(Ubuntu)
biff =没有
# appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = ubuntu alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = meridianozero.net,localhost,localhost.localdomain,localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailBox_command = procmail -a "$EXTENSION" mailBox_size_limit = 0 recipient_delimiter = + inet_interfaces = all
我应该检查什么?