postfix RCPT TO 临时查找失败 451 && 邮件传输不可用

postfix RCPT TO 临时查找失败 451 && 邮件传输不可用

我配置后缀鸽舍Fedora 20我的问题是当设置回执单把我送回去

451 4.3.0 <[email protected]>: Temporary lookup failure

我的 postfix 配置

主配置文件

# postfix config file

# uncomment for debugging if needed
soft_bounce=yes

# postfix main
mail_owner = postfix
setgid_group = postdrop
delay_warning_time = 4

# postfix paths
html_directory = no
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
queue_directory = /var/spool/postfix
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix/samples
readme_directory = /usr/share/doc/postfix/README_FILES
#header_checks = regexp:/etc/postfix/header_checks
#body_checks = regexp:/etc/postfix/body_checks


# network settings
#inet_interfaces = virtual.host.tld
mydomain = sepidarcms.ir
myhostname = mail.sepidarcms.ir
mynetworks = 127.0.0.0/8,192.187.96.246/30
mydestination = $myhostname,localhost.$mydomain,localhost,www.$mydomain,ftp.$mydomain
#.$mydomain, localhost
relay_domains = mysql:/etc/zpanel/configs/postfix/mysql-relay_domains_maps.cf
#relay_domains = *
# mail delivery
recipient_delimiter = +
myorigin = $relay_domains
relayhost = [mail.$mydomain]
# mappings
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#transport_maps = hash:/etc/postfix/transport
#local_recipient_maps =
inet_interfaces= mail.sepidarcms.ir localhost
#$relay_domains
# virtual setup
virtual_alias_maps = mysql:/etc/zpanel/configs/postfix/mysql-virtual_alias_maps.cf
#,
                     #regexp:/etc/zpanel/configs/postfix/virtual_regexp
virtual_mailbox_base = /home/zpanel/vmail
virtual_mailbox_domains = mysql:/etc/zpanel/configs/postfix/mysql-virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/zpanel/configs/postfix/mysql-virtual_mailbox_maps.cf
#virtual_mailbox_limit_maps = mysql:/etc/zpanel/configs/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_minimum_uid = 101
virtual_uid_maps = static:101
virtual_gid_maps = static:12
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
local_transport = virtual
local_recipient_maps = $virtual_mailbox_maps
# debugging
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5

# authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

# tls config
smtp_use_tls = no
smtpd_use_tls = no
#smtp_tls_note_starttls_offer = yes
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
#tls_random_source = dev:/dev/urandom
#smtp_tls_session_cache_database = btree:$data_directory/smtp_tls_session_cache
# Change mail.example.com.* to your host name
#smtpd_tls_key_file = /etc/pki/tls/private/mail.example.com.key
#smtpd_tls_cert_file = /etc/pki/tls/certs/mail.example.com.crt
# smtpd_tls_CAfile = /etc/pki/tls/root.crt

# rules restrictions
smtpd_client_restrictions =permit
smtpd_helo_restrictions =permit
smtpd_sender_restrictions = permit
smtpd_recipient_restrictions = permit_sasl_authenticated,
        permit_mynetworks,permit
        #reject_unauth_destination,
        #reject_non_fqdn_sender,
        #reject_non_fqdn_recipient,
        #reject_unknown_recipient_domain,permit
# uncomment for realtime black list checks
# ,reject_rbl_client zen.spamhaus.org
# ,reject_rbl_client bl.spamcop.net
# ,reject_rbl_client dnsbl.sorbs.net

smtpd_helo_required = yes
#unknown_local_recipient_reject_code = 550
disable_vrfy_command = no
smtpd_data_restrictions =permit,reject_unauth_pipelining
smtpd_banner = $myhostname ESMTP

message_size_limit = 20480000
inet_protocols = ipv4

主配置文件

# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ***** Unused items removed *****
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
# -o content_filter=smtp-amavis:127.0.0.1:10024
# -o receive_override_options=no_address_mappings
pickup fifo n - n 60 1 pickup
  -o content_filter=
  -o receive_override_options=no_header_body_checks
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
        -o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# ====================================================================
maildrop unix - n n - - pipe
  flags=DRhu user=vmail argv=/usr/local/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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
# spam/virus section
#
smtp-amavis unix - - y - 2 smtp
  -o smtp_data_done_timeout=1200
  -o disable_dns_lookups=yes
  -o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - y - - smtpd
  -o content_filter=
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,permit
  -o mynetworks=127.0.0.0/8,192.187.96.246/30
  -o smtpd_error_sleep_time=0
  -o smtpd_soft_error_limit=1001
  -o smtpd_hard_error_limit=1000
  -o receive_override_options=no_header_body_checks
#  -o smtpd_bind_address=127.0.0.1
  -o smtpd_helo_required=yes
  -o smtpd_client_restrictions=
  -o smtpd_restriction_classes=
  -o disable_vrfy_command=yes
  -o strict_rfc821_envelopes=yes
#
# Dovecot LDA
dovecot unix - n n - - pipe
  flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -d ${recipient}
#
# Vacation mail
vacation unix - n n - - pipe
  flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient}
retry     unix  -       -       n       -       -       error
proxywrite unix -       -       n       -       1       proxymap
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy

别名

#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.
#
#   >>>>>>>>>>  The program "newaliases" must be run after
#   >> NOTE >>  this file is updated for any changes to
#   >>>>>>>>>>  show through to sendmail.
#

# Basic system aliases -- these MUST be present.
mailer-daemon:  postmaster
postmaster: root

# General redirections for pseudo accounts.
bin:        root
daemon:     root
adm:        root
lp:     root
sync:       root
shutdown:   root
halt:       root
mail:       root
news:       root
uucp:       root
operator:   root
games:      root
gopher:     root
ftp:        root
nobody:     root
radiusd:    root
nut:        root
dbus:       root
vcsa:       root
canna:      root
wnn:        root
rpm:        root
nscd:       root
pcap:       root
apache:     root
webalizer:  root
dovecot:    root
fax:        root
quagga:     root
radvd:      root
pvm:        root
amandabackup:       root
privoxy:    root
ident:      root
named:      root
xfs:        root
gdm:        root
mailnull:   root
postgres:   root
sshd:       root
smmsp:      root
postfix:    root
netdump:    root
ldap:       root
squid:      root
ntp:        root
mysql:      root
desktop:    root
rpcuser:    root
rpc:        root
nfsnobody:  root

ingres:     root
system:     root
toor:       root
manager:    root
dumper:     root
abuse:      root

newsadm:    news
newsadmin:  news
usenet:     news
ftpadm:     ftp
ftpadmin:   ftp
ftp-adm:    ftp
ftp-admin:  ftp
www:        webmaster
webmaster:  root
noc:        root
security:   root
hostmaster: root
#info:      postmaster
marketing:  postmaster
sales:      postmaster
support:    postmaster


# trap decode to catch security attacks
decode:     root

# Person who should get root's mail
#root:      marc

这是在线 smtp 测试的输出测试https://pingability.com/smtptest.jsp

输入信息

SMTP 服务器邮箱:mail.sepidar.org

来自电子邮件[电子邮件保护]

SMTP 用户名[电子邮件保护]

SMTP 密码: zxcvASDFqwer!@#$

220 mail.sepidarcms.ir ESMTP
DEBUG SMTP: connected to host "mail.sepidar.org", port: 25

EHLO localhost
250-mail.sepidarcms.ir
250-PIPELINING
250-SIZE 20480000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg "20480000"
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
DEBUG SMTP: Found extension "AUTH=PLAIN", arg "LOGIN"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 
AUTH LOGIN
334 VXNlcm5hbWU6
aW5mb0BzZXBpZGFyLm9yZw==
334 UGFzc3dvcmQ6
enhjdkFTREZxd2VyIUAjJA==
235 2.7.0 Authentication successful
DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 2.1.0 Ok
RCPT TO:<[email protected]>
451 4.3.0 <[email protected]>: Temporary lookup failure
DEBUG SMTP: Valid Unsent Addresses
DEBUG SMTP:   [email protected]
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Ok
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
    com.sun.mail.smtp.SMTPAddressFailedException: 451 4.3.0 <[email protected]>: Temporary lookup failure

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1812)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1075)
    at com.rimuhosting.util.email.EmailDetails.sendEmail(EmailDetails.java:581)
    at com.rimuhosting.util.email.EmailDetails.sendEmail(EmailDetails.java:398)
    at org.apache.jsp.smtptest_jsp._jspService(smtptest_jsp.java:203)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at     org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at     org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.rimuhosting.util.webrequest.DoNothingFilter.doFilter(DoNothingFilter.java:90)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:193)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 451 4.3.0 <[email protected]>:     Temporary lookup failure

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1677)
    ... 36 more
QUIT
221 2.0.0 Bye

我通过以下方式测试 mysql 查询的输出后图-q输出正确

编辑:

这是我从 MYSQL 进行的测试

中继域

postmap -q sepidar.org mysql:/etc/zpanel/configs/postfix/mysql-relay_domains_maps.cf

结果:

sepidar.org

虚拟别名映射

postmap -q [email protected] mysql:/etc/zpanel/configs/postfix/mysql-virtual_alias_maps.cf

结果:

[email protected]

虚拟邮箱域名

postmap -q sepidar.org mysql:/etc/zpanel/configs/postfix/mysql-virtual_domains_maps.cf

结果:

sepidar.org

虚拟邮箱映射

postmap -q [email protected] mysql:/etc/zpanel/configs/postfix/mysql-virtual_mailbox_maps.cf

结果:

sepidar.org/info/

虚拟邮箱限制映射

postmap -q [email protected] mysql:/etc/zpanel/configs/postfix/mysql-virtual_mailbox_limit_maps.cf

结果:

200

编辑2:

经过一番搜索,我解决了最后一个问题,但现在我在发送电子邮件时遇到了问题,错误是: 邮件传输不可用

我的新 postfix 配置

主配置文件

    # basic server settings
myhostname = mail.sepidarcms.ir
mydomain = sepidarcms.ir
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = all
#127.0.0.0/8
inet_interfaces = all
smtpd_banner = $myhostname ESMTP $mail_name: You can put your own message here.
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
parent_domain_matches_subdomains = no
# Remember to run "newaliases" when you change this file
alias_maps = hash:/etc/aliases
relay_domains = mysql:/etc/zpanel/configs/postfix/mysql-relay_domains_maps.cf
virtual_mailbox_base = /home/zpanel/vmail
# Configuration for Postfix/SQL interation
# This allows Postfix to know which domains it should be handling
virtual_mailbox_domains = mysql:/etc/zpanel/configs/postfix/mysql-virtual_domains_maps.cf
# This tells Postfix which virtual users are present
virtual_mailbox_maps = mysql:/etc/zpanel/configs/postfix/mysql-virtual_mailbox_maps.cf
# Additional alias maps (SQL) for Postfix
virtual_alias_maps = mysql:/etc/zpanel/configs/postfix/mysql-virtual_alias_maps.cf

# Enables dovecot local delivery agent (lda). When mail is sent to this server,
# it is passed onto Dovecot for delivery into the user's mbox
dovecot_destination_recipient_limit = 1
virtual_transport = lmtp:unix:private/dovecot-lmtp
#lmtp:unix:private/auth
#dovecot
relayhost = [mail.$mydomain]
# SASL authentication via dovecot.
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
#/var/run/dovecot/auth-client
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes

# Reject unknown local users with error code to prevent backscatter spam
# Mail to unknown virtual users is also automatically deflected with a 550
unknown_local_recipient_reject_code = 550

# Disallow non fully qualified domain names & relay if user isn't authenticated
# Stops spammers from using the mail server
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain

# Do not discard messages at HELO until RCPT TO command is given
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject, reject_non_fqdn_helo_hostname, reject_invalid_hostname
smtp_bind_address = all
# TLS config
smtpd_tls_security_level = may
# You need to create these keys manually - look online for more info
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
#/etc/pki/tls/private/server-ssl.key
smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
#/etc/pki/tls/certs/server-ssl.cert
# Send session info to log
smtpd_tls_loglevel = 1
# Don't renegotiate new TLS sessions with the same client for an hour
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
tls_random_source = dev:/dev/urandom
# Enable me to force TLS connections
#smtpd_tls_auth_only = yes

# Spam filtering - relays to amavisd
#content_filter = smtp:[127.0.0.1]:10024
# Limit how fast we can accept mail so that is is processed correctly
default_process_limit = 20

# Some standard defaults
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/libexec/postfix
queue_directory = /var/spool/postfix
mail_owner = postfix

# Max message size of ~20MB
message_size_limit = 20480000
mailbox_command = /usr/libexec/dovecot/deliver

主配置文件

smtp      inet  n       -       n       -       -       smtpd 
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
submission inet n       -       n       -       -       smtpd 
smtps     inet  n       -       n       -       -       smtpd 
#628       inet  n       -       n       -       -       qmqpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
maildrop unix - n n - - pipe
  flags=DRhu user=vmail argv=/usr/local/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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
# Dovecot LDA
dovecot unix - n n - - pipe
  flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -d ${recipient}
#
# Vacation mail
vacation unix - n n - - pipe
  flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient}
smtp-amavis unix - - y - 2 smtp
  -o smtp_data_done_timeout=1200
  -o disable_dns_lookups=yes
  -o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - y - - smtpd
  -o content_filter=
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -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 receive_override_options=no_header_body_checks
  -o smtpd_bind_address=127.0.0.1
  -o smtpd_helo_required=no
  -o smtpd_client_restrictions=
  -o smtpd_restriction_classes=
  -o disable_vrfy_command=no
  -o strict_rfc821_envelopes=yes

我的新 Dovecot 配置

dovecot配置文件

# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.15.10-201.fc20.x86_64 x86_64 Fedora release 20 (Heisenbug) ext4
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot-debug.log
dict {
  quotadict = mysql:/etc/zpanel/configs/dovecot2/dovecot-dict-quota.conf
}
disable_plaintext_auth = no
first_valid_gid = 12
first_valid_uid = 101
info_log_path = /var/log/dovecot-info.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
lmtp_save_to_detail_mailbox = yes
log_path = /var/log/dovecot.log
mail_debug = yes
#ssl = yes
mail_location = maildir:/home/zpanel/vmail/%d/%n
passdb {
  args = /etc/zpanel/configs/dovecot2/dovecot-mysql.conf
  driver = sql
}
plugin {
  acl = vfile:/etc/dovecot/acls
  quota = maildir:User quota
  sieve = ~/dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /home/zpanel/sieve/
  sieve_global_path = /home/zpanel/sieve/globalfilter.sieve
  sieve_max_script_size = 1M
  trash = /etc/zpanel/configs/dovecot2/dovecot-trash.conf
}
protocols = imap pop3 lmtp 
#sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    group = mail
    mode = 0666
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = mail
    mode = 0666
    user = vmail
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service imap {
  vsz_limit = 256 M
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  process_min_avail = 0
  service_count = 1
  vsz_limit = 64 M
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_cipher_list = ALL:!LOW:!SSLv2
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/zpanel/configs/dovecot2/dovecot-mysql.conf
  driver = sql
}
protocol lda {
  mail_plugins = quota sieve
  postmaster_address = [email protected]
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_plugins = quota imap_quota trash
}
protocol lmtp {
  mail_plugins = quota sieve
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
service lmtp {
 unix_listener /var/spool/postfix/private/dovecot-lmtp {
   mode = 0600
   user = postfix
   group = postfix
  }
  # Create inet listener only if you can't use the above UNIX socket
  #inet_listener lmtp {
    # Avoid making LMTP visible for the entire internet
    #address =
    #port =
  #}
}

答案1

您的 MySQL 服务器未运行、拒绝查询或未配置为与 Postfix 的虚拟域正常工作。请仔细检查。

相关内容