有一句话要说在前头:“Linux配置速成,从入门到跳楼一步走”
很绝望,我去Google了一圈,都没有找到解决方法,还是我自己乱**试出来的。
我不想说话,只是默默的贴上配置。
依次遇到的错误:“Mail content denied”,“dovecot: auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one”,“ dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs)”,“dovecot: imap(root): Error: Invalid settings in userdb: userdb returned 0 as uid”,“dovecot: imap(root): Error: Invalid user settings. Refer to server log for more information.”,“error: open database /etc/postfix/vmaps.txt.db: No such file or directory”,“postfix/trivial-rewrite[13636]: error: open file /etc/postfix/vhosts.txt: No such file or directory”,“Temporary lookup failure”
特别是下面这几个,弄了几百年才弄好:
“fatal: no SASL authentication mechanisms”,“ warning: SASL: Connect to private/auth failed: No such file or directory”,“Recipient address rejected: User unknown in local recipient table”,“Relay access denied”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no compatibility_level=2 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination # I didn't set smtp_auth with SASL because I just need to use SMTP at localhost # which is included in $mynetworks myhostname = localhost mydomain = mnihyc.com myorigin = mnihyc.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, localdomain, localhost, localhost.localdomain, localhost # DO NOT ADD $mydomain TO $mydestination !!! relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + #inet_interfaces = loopback-only #inet_interfaces = 127.0.0.1 inet_protocols = all smtp_generic_maps = hash:/etc/postfix/my_generic_maps #mail_spool_directory = /var/mail #home_mailbox = .mail/ # Settings by default virtual_mailbox_domains = mnihyc.com virtual_mailbox_base = /home/vmail virtual_mailbox_maps = hash:/etc/postfix/vmaps virtual_alias_maps = hash:/etc/postfix/valias virtual_minimum_uid = 1000 virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 virtual_transport = lmtp:unix:private/dovecot-lmtp |
1 2 |
mnihyc@mnihyc.com mnihyc@mnihyc.com/ # Use `postmapa vmaps` to update database after editing this file !!! |