![postfix , dovecot imap/pop3](https://linux22.com/image/994757/postfix%20%2C%20dovecot%20imap%2Fpop3.png)
我有邮件服务器、postfix 和 dovecot。我将它们都作为服务启动:
: ~ # /etc/init.d/postfix Start
[Ok] Starting postfix (via systemctl): postfix.service.
: ~ # /etc/init.d/dovecot Start
[Ok] Starting dovecot (via systemctl): dovecot.service.
但尝试telnet的时候却无法发送邮件:
: ~ # Telnet 192.168.xx.xx 25
Trying 192.168.xx.xx ...
Connected to 192.168.xx.xx.
Escape character is '^]'.
220 ns1.xx.xx.id ESMTP Postfix (Ubuntu)
ehlo mail.xx.xx.id
250-ns1.xx.xx.id
250-Pipelining
250-SIZE 10.24 million
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 SMTPUTF8
mail from: [email protected]
250 2.1.0 Ok
RCPT TO: [email protected]
451 4.3.0 <[email protected]>: Temporary lookup failure
尝试通过 telnet 连接到 IMAP/POP3 时:
: ~ # Telnet 192.168.xx.xx 143
Trying 192.168.xx.xx ...
Connected to 192.168.xx.xx.
Escape character is '^]'.
Connection closed by foreign host.
: ~ # Telnet 192.168.xx.xx 110
Trying 192.168.xx.xx ...
Connected to 192.168.xx.xx.
Escape character is '^]'.
Connection closed by foreign host.
我检查了后缀:
: ~ # Postfix status
postfix / postfix-script: the Postfix mail system is running: PID: 1523
: ~ # Postfix check
postfix / postfix-script: warning: group or other writable: /usr/lib/postfix/./lib postfix-util.so.1
postfix / postfix-script: warning: group or other writable: /usr/lib/postfix/./lib postfix-tls.so.1
postfix / postfix-script: warning: group or other writable: /usr/lib/postfix/./lib postfix-master.so.1
postfix / postfix-script: warning: group or other writable: /usr/lib/postfix/./lib postfix-dns.so.1
postfix / postfix-script: warning: group or other writable: /usr/lib/postfix/./sbi n / lmtp
postfix / postfix-script: warning: group or other writable: /usr/lib/postfix/./lib postfix-global.so.1
postfix / postfix-script: warning: group or other writable: / usr / lib / postfix / sbin / ./lmtp
:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command =
mailbox_size_limit = 0
mydestination = txx.xx.id, mail.xx.xx.id, localhost.localdomain, localhost
mydomain = xx.xx.id
myhostname = ns1.xx.xx.id
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 192.168.11.53/24
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 (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
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_alias_domains = xx.xx.id
virtual_alias_maps = hash:/etc/postfix/virtual
:~# dovecot -n
# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-34-generic x86_64 Ubuntu 16.04 LTS
disable_plaintext_auth = no
mail_location = maildir:~/Maildir
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 {
driver = pam
}
protocols = imap imap pop3
userdb {
driver = passwd
}