我试图设置我的VPS,所以我可以使用Thunderbird IMAP来pipe理我的邮件。 首先,我安装了postfix并按照本指南创build了一个SSL证书。 然后,我安装了sasl2-bin和courier-imap-ssl并find了这个(德文)指南来设置SASL。 即使是德国人,你仍然可以看到我所做的显示的命令。
在Courier安装之后,Thunderbird终于接受了我的configuration,问我是否会信任我接受的证书。 *但是无法login。只要查看/var/log/mail.info ,每当Thunderbird尝试进行身份validation时,都会logging下面可以find的内容,“admin”是我的用户名。
Nov 19 22:55:19 vps imapd-ssl: chdir Maildir: No such file or directory Nov 19 22:55:19 vps imapd-ssl: admin: No such file or directory
不过,我可以validationPAMvalidation是否有效。
admin@vps:~$ sudo testsaslauthd -f /var/run/saslauthd/mux -u admin -p 'mypassword' 0: OK "Success."
任何线索高度赞赏。
*信使已经创build了自己的证书,所以我甚至不确定手动生成的证书是否真的在某个地方使用。 它仍然被configuration为在/etc/postfix/main.cf使用。
编辑 :我意外地混淆了赛勒斯与信使。 我实际上已经安装了快递。 Per @masegaloeh的请求,你可以find下面的configuration。
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_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 mydestination = mail.niklasrosenstein.com niklasrosenstein.com myhostname = mail.niklasrosenstein.com 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_local_domain = smtpd_sasl_security_options = noanonymous smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem smtpd_tls_auth_only = no smtpd_tls_cert_file = /etc/ssl/certs/mail.niklasrosenstein.com.crt smtpd_tls_key_file = /etc/ssl/private/mail.niklasrosenstein.com.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes tls_random_source = dev:/dev/urandom
/etc/courier/authdaemonrc
##VERSION: $Id: authdaemonrc.in,v 1.13 2005/10/05 00:07:32 mrsam Exp $ # # Copyright 2000-2005 Double Precision, Inc. See COPYING for # distribution information. # # authdaemonrc created from authdaemonrc.dist by sysconftool # # Do not alter lines that begin with ##, they are used when upgrading # this configuration. # # This file configures authdaemond, the resident authentication daemon. # # Comments in this file are ignored. Although this file is intended to # be sourced as a shell script, authdaemond parses it manually, so # the acceptable syntax is a bit limited. Multiline variable contents, # with the \ continuation character, are not allowed. Everything must # fit on one line. Do not use any additional whitespace for indentation, # or anything else. ##NAME: authmodulelist:2 # # The authentication modules that are linked into authdaemond. The # default list is installed. You may selectively disable modules simply # by removing them from the following list. The available modules you # can use are: authuserdb authpam authpgsql authldap authmysql authcustom authpipe authmodulelist="authpam" ##NAME: authmodulelistorig:3 # # This setting is used by Courier's webadmin module, and should be left # alone authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe" ##NAME: daemons:0 # # The number of daemon processes that are started. authdaemon is typically # installed where authentication modules are relatively expensive: such # as authldap, or authmysql, so it's better to have a number of them running. # PLEASE NOTE: Some platforms may experience a problem if there's more than # one daemon. Specifically, SystemV derived platforms that use TLI with # socket emulation. I'm suspicious of TLI's ability to handle multiple # processes accepting connections on the same filesystem domain socket. # # You may need to increase daemons if as your system load increases. Symptoms # include sporadic authentication failures. If you start getting # authentication failures, increase daemons. However, the default of 5 # SHOULD be sufficient. Bumping up daemon count is only a short-term # solution. The permanent solution is to add more resources: RAM, faster # disks, faster CPUs... daemons=5 ##NAME: authdaemonvar:2 # # authdaemonvar is here, but is not used directly by authdaemond. It's # used by various configuration and build scripts, so don't touch it! authdaemonvar=/var/run/courier/authdaemon ##NAME: DEBUG_LOGIN:0 # # Dump additional diagnostics to syslog # # DEBUG_LOGIN=0 - turn off debugging # DEBUG_LOGIN=1 - turn on debugging # DEBUG_LOGIN=2 - turn on debugging + log passwords too # # ** YES ** - DEBUG_LOGIN=2 places passwords into syslog. # # Note that most information is sent to syslog at level 'debug', so # you may need to modify your /etc/syslog.conf to be able to see it. DEBUG_LOGIN=0 ##NAME: DEFAULTOPTIONS:0 # # A comma-separated list of option=value pairs. Each option is applied # to an account if the account does not have its own specific value for # that option. So for example, you can set # DEFAULTOPTIONS="disablewebmail=1,disableimap=1" # and then enable webmail and/or imap on individual accounts by setting # disablewebmail=0 and/or disableimap=0 on the account. DEFAULTOPTIONS="" ##NAME: LOGGEROPTS:0 # # courierlogger(1) options, eg to set syslog facility # LOGGEROPTS="" ##NAME: LDAP_TLS_OPTIONS:0 # # Options documented in ldap.conf(5) can be set here, prefixed with 'LDAP'. # Examples: # #LDAPTLS_CACERT=/path/to/cacert.pem #LDAPTLS_REQCERT=demand #LDAPTLS_CERT=/path/to/clientcert.pem #LDAPTLS_KEY=/path/to/clientkey.pem
看起来你在postfix存储电子邮件的地方和邮件search电子邮件的地方不匹配。
看看你的postfixconfiguration,很明显,你让postfix将电子邮件存储在默认格式和默认位置, /var/spool/mail/$user与mbox格式 。
在快递中,您使用authpam作为身份validation模块。 因此,预计快递将以maildir格式从/home/$user/Maildirsearch电子邮件。
简单的修复是在postfix存储电子邮件时更改位置和格式。 为此,请在main.cf添加此参数
home_mailbox = Maildir/
它将改变postfix的行为,以maildir格式存储〜/ Maildir /邮件。