dovecot-postfix-sasl-squirrelmail问题

时间:2015-06-17 08:22:35

标签: postfix-mta sasl dovecot squirrelmail

我只是设置这个网络服务器以获得乐趣和学习,所以如果没有人知道我的问题是什么就可以了。

我已经搜索了stackoverflow / google并且没有找到任何解决方案。

我可以登录我用松鼠邮件发送的测试用户,但无法发送/接收电子邮件。

错误日志中的

Jun 17 03:52:34 vps46420 postfix/smtpd[2490]: connect from localhost[127.0.0.1]
Jun 17 03:52:34 vps46420 postfix/smtpd[2490]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: No such file or directory
Jun 17 03:52:34 vps46420 postfix/smtpd[2490]: fatal: no SASL authentication mechanisms
Jun 17 03:52:35 vps46420 postfix/master[2441]: warning: process /usr/lib/postfix/smtpd pid 2490 exit status 1
Jun 17 03:52:35 vps46420 postfix/master[2441]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

dovecot -n:

/var/spool/postfix$ dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-042stab106.4 x86_64 Debian 7.8 ext4
mail_location = maildir:/home/john/Maildir/%d/%n
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = " imap pop3"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}

postconf -n:

/var/spool/postfix$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = vps46420.vps.ovh.ca, localhost.vps.ovh.ca, , localhost
myhostname = vps46420.vps.ovh.ca
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = /var/spool/postfix/private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_mailbox_domains = hash:/etc/postfix/virtual_mailbox_domains
virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_users

如有必要,我可以发布其他详细信息。

1 个答案:

答案 0 :(得分:0)

显然,进程smtpd无法启动,因为Dovecot不会创建Unix套接字文件auth。通过运行确认:

$ sudo ls -l /var/spool/postfix/private/auth

应该输出“没有这样的文件或目录”。

尝试将此行auth_mechanisms = plain login附加到dovecot.conf然后重新启动Dovecot,然后再次检查套接字。

$ sudo service dovecot restart

你还需要在Debian 8上确认Dovecot正在运行:

$ sudo tail /var/log/syslog

或通过以下方式检查端口143和/或993是否已打开:

$ sudo netstat -plnt

如果端口不存在,请将以下行添加到dovecot.conf

service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
  }
}

我建议您阅读setup a simple and secure mail server的博文。