我的邮件被卡在队列中,根据日志显示问题出在 amavisd-new。端口 10024 和 10026 没有运行,我不确定这是否与 spamassassin 有关。我安装了 spamassassin,但如果问题确实出在 spamassassin 上,我想禁用它,尽管我已经运行了此命令。
update-rc.d -f spamassassin 删除
amavisd-新状态
root@mail:/var/log# systemctl status amavisd-new.service
● amavis.service - LSB: Starts amavisd-new mailfilter
Loaded: loaded (/etc/init.d/amavis; generated)
Active: active (exited) since Sat 2020-06-27 12:30:24 EAT; 1h 10min ago
Docs: man:systemd-sysv-generator(8)
Process: 29156 ExecStop=/etc/init.d/amavis stop (code=exited, status=0/SUCCESS)
Process: 29162 ExecStart=/etc/init.d/amavis start (code=exited, status=0/SUCCESS)
Jun 27 12:30:24 mail.domain.tld amavis[29342]: No decoder for .jar
Jun 27 12:30:24 mail.domain.tld amavis[29342]: No decoder for .lha
Jun 27 12:30:24 mail.domain.tld amavis[29342]: No decoder for .lrz
Jun 27 12:30:24 mail.domain.tld amavis[29342]: No decoder for .lz4
Jun 27 12:30:24 mail.domain.tld amavis[29342]: No decoder for .rar
Jun 27 12:30:24 mail.domain.tld amavis[29342]: No decoder for .swf
Jun 27 12:30:24 mail.domain.tld amavis[29342]: Using primary internal av scanner code for ClamAV-clamd
Jun 27 12:30:24 mail.domain.tld amavis[29342]: Found secondary av scanner ClamAV-clamscan at /usr/local/bin/clamscan
Jun 27 12:30:30 mail.domain.tld amavis[29342]: (!!)TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
Jun 27 12:30:30 mail.domain.tld amavis[29342]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
网络状态监测
root@mail:/var/log# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 20868/master
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 28799/mysqld
tcp 0 0 127.0.0.1:10027 0.0.0.0:* LISTEN 20868/master
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 20868/master
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 29367/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 29367/dovecot
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1450/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23784/apache2
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 20868/master
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 1448/systemd-resolv
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1659/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 20868/master
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 29367/dovecot
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 1556/nrpe
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 29367/dovecot
tcp6 0 0 :::587 :::* LISTEN 20868/master
tcp6 0 0 :::110 :::* LISTEN 29367/dovecot
tcp6 0 0 :::143 :::* LISTEN 29367/dovecot
tcp6 0 0 :::111 :::* LISTEN 1450/rpcbind
tcp6 0 0 :::465 :::* LISTEN 20868/master
tcp6 0 0 :::22 :::* LISTEN 1659/sshd
tcp6 0 0 :::25 :::* LISTEN 20868/master
tcp6 0 0 :::993 :::* LISTEN 29367/dovecot
tcp6 0 0 :::5666 :::* LISTEN 1556/nrpe
tcp6 0 0 :::995 :::* LISTEN 29367/dovecot
Postconf -n
root@mail:/var/log# postconf -n
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
append_dot_mydomain = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
content_filter = amavis:[127.0.0.1]:10024
dovecot_destination_recipient_limit = 1
greylisting = check_policy_service inet:127.0.0.1:10023
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
mailman_destination_recipient_limit = 1
message_size_limit = 0
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = mail.domain.tld, localhost, localhost.localdomain
myhostname = mail.domain.tld
mynetworks = 127.0.0.0/8 x.x.x.x/32 x.x.x.x/32 x.x.x.x/32 [::1]/128
myorigin = /etc/mailname
nested_header_checks = regexp:/etc/postfix/nested_header_checks
owner_request_special = no
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
relayhost =
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
smtp_sasl_auth_enable = no
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_tls_exclude_ciphers = RC4, aNULL
smtp_tls_protocols = !SSLv2,!SSLv3
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_message_rate_limit = 100
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
smtpd_restriction_classes = greylisting
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re , permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains =
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_maps = hash:/var/lib/mailman/data/virtual-mailman
virtual_transport = dovecot
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uids.cf
主配置文件
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o smtp_bind_address=
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
127.0.0.1:10027 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtp_send_xforward_command=yes
-o milter_default_action=accept
-o milter_macro_daemon_name=ORIGINATING
-o disable_dns_lookups=yes
非常感谢您的帮助。
答案1
我重新启用了 spamassassin,重新启动了服务并运行 sa-update -D -v,它启动了 amavisd-new。我不知道为什么这次它成功了,我已经尝试了同样的事情两天了。