postfix+dovecot 區域網內OE不能收發郵件

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

postfix+dovecot 區域網內OE不能收發郵件

用oe連接cheney@mail.jimmychem.gicp.net時無法收發郵件,連接不上。
oe的配置:
cheney@mail.jimmychem.gicp.net
pop3:mail.jimmychem.gicp.net
smtp:mail.jimmychem.gicp.net

已經有cheney用戶了:
ls /var/mail
cheney

相關配置:
1、dns、telnet情況
A、dig mx


; <<>> DiG 9.5.0-P2 <<>> jimmychem.gicp.net
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58303
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;jimmychem.gicp.net.      IN   A

;; ANSWER SECTION:
jimmychem.gicp.net.   3600   IN   A   192.168.1.104

;; Query time: 3 msec
;; SERVER: 192.168.1.104#53(192.168.1.104)
;; WHEN: Thu Nov 20 16:23:08 2008
;; MSG SIZE  rcvd: 52

B、telnet

telnet mail.jimmychem.gicp.net 25
Trying 192.168.1.89...
Connected to mail.jimmychem.gicp.net.
Escape character is '^]'.
220 mail.jimmychem.gicp.net ESMTP Postfix (Ubuntu)



telnet mail.jimmychem.gicp.net 143
Trying 192.168.1.89...
Connected to mail.jimmychem.gicp.net.
Escape character is '^]'.
* OK Dovecot ready.



telnet mail.jimmychem.gicp.net 110
Trying 192.168.1.89...
Connected to mail.jimmychem.gicp.net.
Escape character is '^]'.
+OK Dovecot ready.

2、相關配置文件
A、psotfix

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_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

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.jimmychem.gicp.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname,localhost.$myhostname,localhost
relayhost =
mynetworks = 127.0.0.0/8,192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
default_transport = error
relay_transport = error


B、dovecot(凡是前面有#號的都沒粘貼上來)

protocols = imap imaps pop3 pop3s
protocol imap {

}
protocol pop3 {

}
protocol managesieve {
sieve=~/.dovecot.sieve
sieve_storage=~/sieve

auth default {
mechanisms = plain
passdb pam {
   }
userdb passwd {

user = root
}
dict {
  #quota = mysql:/etc/dovecot-dict-quota.conf
}
plugin {


3、cat /var/log/mail.log 前面幾行和最後幾行
前面的幾行:

Nov 20 10:06:00 luqiuli postfix/master: daemon started -- version 2.5.5, configuration /etc/postfix
Nov 20 10:25:09 luqiuli postfix/smtpd: connect from localhost
Nov 20 10:25:27 luqiuli postfix/smtpd: disconnect from localhost
Nov 20 11:35:51 luqiuli postfix/master: terminating on signal 15
Nov 20 14:00:59 luqiuli postfix/master: daemon started -- version 2.5.5, configuration /etc/postfix
Nov 20 14:46:43 luqiuli postfix/smtpd: connect from localhost
Nov 20 14:47:47 luqiuli postfix/smtpd: 89F8C1386D: client=localhost
Nov 20 14:48:09 luqiuli postfix/cleanup: 89F8C1386D: message-id=<20081120064747.89F8C1386D@luqiuli>
Nov 20 14:48:09 luqiuli postfix/qmgr: 89F8C1386D: from=<cheney@localhost>, size=334, nrcpt=1 (queue active)
Nov 20 14:48:09 luqiuli postfix/local: 89F8C1386D: to=<cheney@localhost>, relay=local, delay=44, delays=44/0.01/0/0.07, dsn=2.0.0, status=sent (delivered to mailbox)
Nov 20 14:48:09 luqiuli postfix/qmgr: 89F8C1386D: removed
Nov 20 14:48:13 luqiuli postfix/smtpd: disconnect from localhost
Nov 20 15:02:30 luqiuli dovecot: Dovecot v1.1.4 starting up
Nov 20 15:02:30 luqiuli dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Nov 20 15:02:31 luqiuli dovecot: Killed with signal 15
Nov 20 15:02:31 luqiuli dovecot: Dovecot v1.1.4 starting up
Nov 20 15:02:31 luqiuli dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Nov 20 15:02:31 luqiuli dovecot: Killed with signal 15
Nov 20 15:02:31 luqiuli dovecot: Dovecot v1.1.4 starting up
Nov 20 15:02:31 luqiuli dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Nov 20 15:04:03 luqiuli dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured
Nov 20 15:08:55 luqiuli postfix/master: terminating on signal 15
Nov 20 15:09:36 luqiuli dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured
Nov 20 15:10:55 luqiuli postfix/master: daemon started -- version 2.5.5, configuration /etc/postfix
Nov 20 15:11:56 luqiuli postfix/smtpd: connect from localhost
Nov 20 15:12:04 luqiuli postfix/smtpd: disconnect from localhost


最後面的幾行:

Nov 20 15:59:10 luqiuli postfix/smtpd: disconnect from mail.jimmychem.gicp.net
Nov 20 15:59:20 luqiuli dovecot: IMAP(cheney): Connection closed bytes=865/3882
Nov 20 16:00:37 luqiuli dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.1.104, lip=192.168.1.89
Nov 20 16:00:55 luqiuli last message repeated 11 times
Nov 20 16:04:27 luqiuli dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured
Nov 20 16:20:22 luqiuli dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.1.104, lip=192.168.1.89
Nov 20 16:20:53 luqiuli dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.1.104, lip=192.168.1.89
Nov 20 16:25:33 luqiuli postfix/smtpd: connect from mail.jimmychem.gicp.net
Nov 20 16:26:21 luqiuli postfix/smtpd: disconnect from mail.jimmychem.gicp.net
Nov 20 16:26:58 luqiuli dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured
Nov 20 16:28:46 luqiuli dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured


哪裡出錯了?我是從網上找了好多文章,然後自己配置的。
《解決方案》

telnet跟dig測試在哪裡操作的?
應該都要在oe所在的操作系統上測試
《解決方案》

在別的電腦telnet也是正常的:
mx



telnet mail.jimmychem.gicp.net 25



telnet mail.jimmychem.gicp.net 110


telnet mail.jimmychem.gicp.net 143



OE出錯:用戶cheney無法登錄,輸入cheney的linux登錄密碼不行,空白不輸入密碼也不行。

[ 本帖最後由 cheneylou 於 2008-11-21 10:23 編輯 ]
《解決方案》

我在網上看的是postfix自帶smtp,然後加個pop和imap伺服器就可以了,後來又找了postfix+dovecot的文章,然後ubuntu很簡單的,直接sudo apt-get 就安裝了,配置文件在1樓,到現在為止沒在改過。

難道是要安裝個第三方的smtp服務軟體?做過postfix的兄弟姐妹幫忙看看吧。可是既然postfix自帶smtp的話,應該是可以用的啊?不解……
《解決方案》

cheney@mail.jimmychem.gicp.net

裡面的mail去掉
《解決方案》

Nov 20 14:48:09 luqiuli postfix/cleanup: 89F8C1386D: message-id=<20081120064747.89F8C1386D@luqiuli>
Nov 20 14:48:09 luqiuli postfix/qmgr: 89F8C1386D: from=<cheney@localhost>, size=334, nrcpt=1 (queue active)
Nov 20 14:48:09 luqiuli postfix/local: 89F8C1386D: to=<cheney@localhost>, relay=local, delay=44, delays=44/0.01/0/0.07, dsn=2.0.0, status=sent (delivered to mailbox)

這封郵件成功了
《解決方案》

Nov 20 16:04:27 luqiuli dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured


認證肯定有問題呀

再看看dovecot的認證部分吧
《解決方案》

OE出錯:用戶cheney無法登錄,輸入cheney的linux登錄密碼不行,空白不輸入密碼也不行


查看「認證模塊」的log
《解決方案》

原帖由 ruochen 於 2008-11-21 11:53 發表 http://bbs.chinaunix.net/images/common/back.gif
Nov 20 16:04:27 luqiuli dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.89, lip=192.168.1.89, secured


認證肯定有問題呀

再看看dovecot的認證部分吧

我早上琢磨到現在,覺得也是認證有問題。我只是按照網上的帖子apt-get install這樣安裝的,然後dovecot.conf是沒動的,進去一看很都配置是空白的,用#註釋掉了,只配置了協議:imap,pop3。

哪位大哥有心情有時間的幫忙用SSH看下吧。

如果不行我再從頭學習一下再配置吧。
《解決方案》

已經給 ruochen發ssh用戶名和密碼了。有時間幫忙看下把

[ 本帖最後由 cheneylou 於 2008-11-21 13:39 編輯 ]




[火星人 ] postfix+dovecot 區域網內OE不能收發郵件已經有817次圍觀

http://coctec.com/docs/service/show-post-12225.html