如果我从我的客户端发送电子邮件给其他人,下面我发现与systemctl status -l postfix :
postfix[20012]: Starting Postfix Mail Transport Agent: postfix. postfix/master[20119]: daemon started -- version 2.11.3, configuration /etc/postfix postfix/qmgr[20121]: 6A07F80F0DF9: from=<...>, size=1812, nrcpt=1 (queue active) postfix/qmgr[20121]: warning: connect to transport private/myhostname: No such file or directory postfix/error[20124]: 6A07F80F0DF9: to=<...>, relay=none, delay=100971, delays=100971/0.01/0/0.1, dsn=4.3.0, status=deferred (mail transport unavailable)
有没有人知道这意味着什么?
这里是postconf -n的输出:
address_verify_map = btree:/var/spool/postfix/data/verify alias_maps = hash:/etc/aliases config_directory = /etc/postfix default_destination_concurrency_limit = 20 default_destination_rate_delay = 60s default_destination_recipient_limit = 10 inet_interfaces = all mail_owner = postfix mydestination = $myhostname, localhost myhostname = ... mynetworks = 127.0.0.0/8 [::1]/128 ip1.xxx.xxx.xxx ip2.xxx.xxx.xxx myorigin = $myhostname sender_dependent_default_transport_maps = regexp:/etc/postfix/transport/sender_dependent_default_transport_maps.regexp smtp_sasl_security_options = noanonymous, noplaintext smtp_tls_cert_file = /etc/ssl/certs/... smtp_tls_key_file = /etc/ssl/private/... smtp_tls_mandatory_ciphers = high smtp_tls_mandatory_protocols = !SSLv2, !SSLv3 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, check_policy_service inet:127.0.0.1:12525, check_policy_service inet:127.0.0.1:10023, reject_unverified_recipient, reject_unauth_destination, permit smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/... smtpd_tls_key_file = /etc/ssl/private/... smtpd_tls_mandatory_ciphers = high smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_received_header = no smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_mailbox_base = /var/spool/vmail/ virtual_mailbox_domains = proxy:hash:/etc/postfix/virtual/mailbox_domains virtual_mailbox_maps = proxy:hash:/etc/postfix/virtual/mailbox_maps virtual_transport = lmtp:unix:private/dovecot-lmtp
而postconf -M的输出postconf -M :
submission inet n - - - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_reject_unlisted_recipient=no -o smtpd_recipient_restrictions= -o smtpd_relay_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING pickup fifo n - - 60 1 pickup -o content_filter=smtp:[localhost]:10024 cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - n - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap relay unix - - - - - smtp showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - nn - - local virtual unix - nn - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache maildrop unix - nn - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} uucp unix - nn - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - nn - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - nn - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - nn - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - nn - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} localhost:10025 inet n - n - - smtpd -v -o content_filter= -o smtpd_proxy_filter= -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= -o mynetworks=127.0.0.0/8 -o receive_override_options=no_unknown_recipient_checks ip1.xxx.xxx.xxx:smtp inet n - - - - smtpd -v -o content_filter= -o smtpd_proxy_filter=localhost:10024 -o myhostname=myhostname
文件/etc/postfix/transport/sender_dependent_default_transport_maps.regexp的内容:
/@domain\.de$/ myhostname:
这里是/etc/postfix/virtual/mailbox_maps :
[email protected] domain.de/[email protected]/ [email protected] domain.de/[email protected]/ ....
这是我的多域configuration解决scheme。
这是我的main.cf为后缀:
address_verify_map = btree:/var/spool/postfix/data/verify alias_maps = hash:/etc/aliases config_directory = /etc/postfix default_destination_concurrency_limit = 20 default_destination_rate_delay = 60s default_destination_recipient_limit = 10 inet_interfaces = all mail_owner = postfix mydestination = $myhostname, localhost myhostname = xyz mynetworks = 127.0.0.0/8 [::1]/128 ip1.xxx.xxx.xxx ip2.xxx.xxx.xxx myorigin = $myhostname sender_dependent_default_transport_maps = regexp:/etc/postfix/transport/sender_dependent_default_transport_maps.regexp smtp_sasl_security_options = noanonymous, noplaintext smtp_tls_cert_file = /etc/ssl/certs/... smtp_tls_key_file = /etc/ssl/private/... smtp_tls_mandatory_ciphers = high smtp_tls_mandatory_protocols = !SSLv2, !SSLv3 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, check_policy_service inet:127.0.0.1:12525, check_policy_service inet:127.0.0.1:10023, reject_unverified_recipient, reject_unauth_destination, permit smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/... smtpd_tls_key_file = /etc/ssl/private/... smtpd_tls_mandatory_ciphers = high smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_received_header = no smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_mailbox_base = /var/spool/vmail/ virtual_mailbox_domains = proxy:hash:/etc/postfix/virtual/mailbox_domains virtual_mailbox_maps = proxy:hash:/etc/postfix/virtual/mailbox_maps virtual_transport = lmtp:unix:private/dovecot-lmtp
在这里,我的master.cf :
submission inet n - - - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_reject_unlisted_recipient=no -o smtpd_recipient_restrictions= -o smtpd_relay_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING pickup fifo n - - 60 1 pickup -o content_filter=smtp:[localhost]:10024 cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - n - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap relay unix - - - - - smtp showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - nn - - local virtual unix - nn - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache maildrop unix - nn - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} uucp unix - nn - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - nn - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - nn - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - nn - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - nn - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} localhost:10025 inet n - n - - smtpd -v -o content_filter= -o smtpd_proxy_filter= -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= -o mynetworks=127.0.0.0/8 -o receive_override_options=no_unknown_recipient_checks myhostname1:smtp inet n - - - - smtpd -v -o content_filter= -o smtpd_proxy_filter=localhost:10024 -o myhostname=myhostname1 myhostname1 unix - - n - - smtp -o smtp_bind_address=ip1.xxx.xxx.xxx -o smtp_helo_name=myhostname1 -o syslog_name=postfix_myhostname1 myhostname2:smtp inet n - - - - smtpd -v -o content_filter= -o smtpd_proxy_filter=localhost:10024 -o myhostname=myhostname2 myhostname2 unix - - n - - smtp -o smtp_bind_address=ip2.xxx.xxx.xxx -o smtp_helo_name=myhostname2 -o syslog_name=postfix_myhostname2
文件/etc/postfix/transport/sender_dependent_default_transport_maps.regexp的内容是:
/@domain1\.de$/ myhostname1: /@domain2\.de$/ myhostname2:
这里是文件/etc/postfix/virtual/mailbox_maps :
[email protected] domain.de/[email protected]/ [email protected] domain.de/[email protected]/ ....
我希望这对其他人有帮助。