1

我只是为了好玩和学习而设置这个网络服务器,所以如果没有人知道我的问题是什么,那没关系。

我已经搜索了 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

鸽舍-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
}

后置信-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

如有必要,我可以发布更多详细信息。

4

1 回答 1

1

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

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

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

尝试将此行附加auth_mechanisms = plain logindovecot.confThen Restart Dovecot 中,然后再次检查套接字。

$ sudo service dovecot restart

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

$ 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
  }
}

我建议阅读我的博客文章以设置简单且安全的邮件服务器

于 2015-06-20T16:22:11.937 回答