系统:ubuntu 12.04,邮件账户采用系统账户。
postfix系统本身自带
dovecot安装apt-get install dovecot-imapd dovecot-pop3d.
下面是配置文件
postfix.main的配置
#myorigin = /etc/mailnamesmtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)biff = no# appending .domain is the MUA's job.append_dot_mydomain = no#delay_warning_time = 4hreadme_directory = no# TLS parameters#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key#smtpd_use_tls=yes#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache#myhostname = localhostmyhostname = 你的主机名mydomain = 你的域名myorigin = $mydomainalias_maps = hash:/etc/aliasesalias_database = hash:/etc/aliasesmydestination = $myhostname, localhost.$mydomain, , localhost,$mydomain#relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128mailbox_size_limit = 0recipient_delimiter = +inet_interfaces = alllocal_recipient_maps =default_transport = smtprelay_transport = relaylocal_recipient_maps = home_mailbox = Maildir/#smtpd_recipient_restrictions = permit_mynetworks#relay_domains = $mydestination
下面是dovecot.conf的配置,在末尾增加
protocols = pop3 imapmail_location = maildir:/home/%u/Maildirdisable_plaintext_auth = nossl_disable = yes
接下来就是使用邮件客户端收信了(写信的话有问题),但是这里面的有坑。
对于雷鸟客户端,输入邮件地址(帐号@域名)和密码(就是系统上的密码),由于没有加密,所以会提示警告,但是不会影响下载邮件。
而对于foxmail,如果你使用imap的话,会验证失败,但是使用pop的话,就能成功。