Моя проблема в том, что (на почтовом сервере, который называется mail-test
) Я могу это сделать:
echo "test!" | sendmail ethan@localhost
но я не могу:
echo "test!" | sendmail ethan@mail-test.[REDACTED DOMAIN]
Эти сообщения отскакивают - вот две строки журнала, показывающие, что:
Apr 10 23:35:41 mail-test postfix/qmgr[26638]: DA423600A6B: from=<root@mail-test.[REDACTED DOMAIN]>, size=300, nrcpt=1 (queue active)
Apr 10 23:35:41 mail-test postfix/smtp[26644]: DA423600A6B: to=<ethan@mail-test.[REDACTED DOMAIN]>, relay=none, delay=0.95, delays=0.95/0/0/0, dsn=5.4.6, status=bounced (mail for localhost loops back to myself)
Полное доменное имя находится в mydestination
в main.cf
и это то же самое поведение, если параметры для Amavis присутствуют в файле конфигурации или нет. Что я могу сделать, чтобы это исправить? Спасибо!
main.cf:
soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail-test.[REDACTED DOMAIN]
mydomain = [REDACTED DOMAIN]
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8, [REDACTED]
transport_maps = hash:/etc/postfix/transport
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +
mailbox_command = /usr/lib/dovecot/deliver -d "$USER" -f "$SENDER"
smtpd_banner = $myhostname ESMTP $mail_name (GNU/Linux)
default_destination_concurrency_limit = 60
default_extra_recipient_limit = 20
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = no
inet_protocols = all
smtpd_use_tls = yes
smtpd_tls_key_file = /etc/postfix/ssl/key
smtpd_tls_cert_file = /etc/postfix/ssl/cert
smtpd_tls_CAfile = /etc/postfix/ssl/ca
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtp_tls_security_level = may
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_helo_hostname
strict_rfc821_envelopes = yes
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client zen.spamhaus.org, reject_unauth_pipelining
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining,
check_sender_access hash:/etc/postfix/sender_access
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_recipient_restrictions = reject_invalid_hostname, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access hash:/etc/postfix/recipient_access, check_client_access hash:/etc/postfix/client_access
amavis_destination_concurrency_limit = 50
default_process_limit = 70
smtp_mx_session_limit = 100
smtp_destination_concurrency_limit = 100
authorized_submit_users = ![REDACTED], static:all
master.cf:
smtp inet n - y - - smtpd
-o content_filter=amavisfeed:[127.0.0.1]:10024
submission inet n - y - - smtpd
-o content_filter=amavisfeed:[127.0.0.1]:10024
smtps inet n - y - - smtpd
pickup unix n - y 60 1 pickup
-o content_filter=
-o receive_override_options=no_header_body_checks
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
amavisfeed unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restrictions_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
-o local_header_rewrite_clients=
Конфигурация Amavis - это все настройки по умолчанию. Я использую Ubuntu 18.04 LTS.