歡迎您光臨本站 註冊首頁

postfix+dovecot+mysql 不能收發信,什麼問題啊

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

postfix+dovecot+mysql 不能收發信,什麼問題啊

tail -f /var/log/maillog
Sep 25 12:29:09 example1 postfix/qmgr: 2CB4317E0860B: from=<xiexintao@example.com>, size=367, nrcpt=1 (queue active)
Sep 25 12:29:09 example1 postfix/pipe: fatal: missing user= command-line attribute
Sep 25 12:29:09 example1 postfix/pipe: fatal: missing user= command-line attribute
Sep 25 12:29:10 example1 postfix/qmgr: warning: premature end-of-input on private/dovecot socket while reading input attribute name
Sep 25 12:29:10 example1 postfix/qmgr: warning: private/dovecot socket: malformed response
Sep 25 12:29:10 example1 postfix/qmgr: warning: transport dovecot failure -- see a previous warning/fatal/panic logfile record for the problem description
Sep 25 12:29:10 example1 postfix/master: warning: process /usr/libexec/postfix/pipe pid 6972 exit status 1
Sep 25 12:29:10 example1 postfix/master: warning: /usr/libexec/postfix/pipe: bad command startup -- throttling
Sep 25 12:29:10 example1 postfix/master: warning: process /usr/libexec/postfix/pipe pid 6973 exit status 1
Sep 25 12:29:10 example1 postfix/qmgr: 4B36317E0860A: to=<test@example.com>, relay=none, delay=17635, delays=17634/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)
Sep 25 12:29:10 example1 postfix/qmgr: warning: premature end-of-input on private/dovecot socket while reading input attribute name
Sep 25 12:29:10 example1 postfix/qmgr: warning: private/dovecot socket: malformed response
Sep 25 12:29:10 example1 postfix/qmgr: warning: transport dovecot failure -- see a previous warning/fatal/panic logfile record for the problem description
Sep 25 12:29:10 example1 postfix/qmgr: 2CB4317E0860B: to=<test@example.com>, relay=none, delay=17347, delays=17346/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)




tail -f /var/log/dovecot-info.log
dovecot: 2011-09-25 12 12 44 Info: auth-worker(default): sql(test@example.com,::ffff:117.79.233.176): SELECT concat('/var/vmta/',maildir) AS home,5000 AS uid,5000 AS gid FROM mailbox WHERE username = 'test@example.com'
dovecot: 2011-09-25 12 12 44 Info: auth(default): master out: USER     example@spriteapp.com       home=/var/vmta/test@example.com/      uid=500gid=5000
dovecot: 2011-09-25 12 12 44 Info: imap-login: Login: user=<test@example.com>, method=PLAIN, rip=::ffff:117.79.233.176, lip=::ffff:211.157.109.241
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): Loading modules from directory: /usr/lib/dovecot/imap
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): Module loaded: /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): Effective uid=5000, gid=5000, home=/var/vmta/test@spriteapp.com/
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): maildir: data=/var/vmta/test@example.com
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): maildir: root=/var/vmta/test@example.com, index=/var/vmta/test@example.com, control=, inbox=
dovecot: 2011-09-25 12 12 44 Info: IMAP(test@example.com): Disconnected in IDLE

postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = no
inet_interfaces = localhost
mail_name = sendmail
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 0.0.0.0/0
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = ESMTP $mail_name
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = mysql:/etc/postfix/mysql_virtual_sender_maps.cf
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmta
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

/etc/postfix/master.cf添加了2條內容
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmta:vmta argv=/usr/libexec/dovecot/deliver -d ${recipient}



dovecot -n
# 1.0.7: /etc/dovecot.conf
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot-info.log
log_timestamp: %Y-%m-%d %H %M %S
verbose_ssl: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
first_valid_uid: 5000
mail_location: maildir:/var/vmta/%u
mail_debug: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
  mechanisms: plain login
  default_realm: example.com
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
    driver: pam
  passdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  userdb:
    driver: passwd
  userdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  userdb:
    driver: prefetch
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: vmta
      group: vmta
plugin:
  quota: maildir

vi /etc/dovecot-mysql.conf

driver=mysql
connect = host=localhost dbname=postfix user=postfix password=postfixmysql
default_pass_scheme = MD5
password_query = SELECT password, concat('/var/vmta/',maildir) AS home,5000 AS uid,5000 AS gid FROM mailbox WHERE username = '%u'
user_query = SELECT concat('/var/vmta/',maildir) AS home,5000 AS uid,5000 AS gid FROM mailbox WHERE username = '%u'
《解決方案》

配置有沒錯誤??????
《解決方案》

我的dovecot的LDA也有類似的錯誤啊

[火星人 ] postfix+dovecot+mysql 不能收發信,什麼問題啊已經有750次圍觀

http://coctec.com/docs/service/show-post-13790.html