歡迎您光臨本站 註冊首頁

關於sendmail 只有系統用戶能發信件出去,其他用戶確發不了的問題

我的sendmail ,用out look 連接后,只有系統用戶能向外發郵件,用saslpasswd 增加的用戶卻發不了,外面的也可以給系統用戶發郵件,但用 outlook 卻收不了,用非系統用戶發郵件,一直提示輸入用戶名,密碼。。。不知道是怎麼回事?


不知道是哪裡認證有問題,/etc/sendmai.mc中的相關項已經改過了,如下:

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')

dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
    DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl

dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
dnl FEATURE(`accept_unresolvable_domains')dnl

dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`localhost.localdomain')dnl


gnu/linux 系統 ,sendmail-8.13.1-2,cyrus-sasl-2.1.19-5.EL4,imap-2001a-18。

telnet localhost 25 會輸出一下內容
Hello localhost.localdomain , pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-DELIVERBY
250 HELP


telnet localhost 110 輸出一下內容
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK POP3 localhost.localdomain v2001.78rh server ready


sendmail -d0.1 -bv root 輸出一下內容
Version 8.13.1
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
     MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
     NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF STARTTLS TCPWRAPPERS
     USERDB USE_LDAP_INIT


用 outlook 收信的時候,看maillog 裡面的日誌有這樣的:
pop3 service init from 61.237.235.2
Command stream end of file while reading line user=mytest@domain.com  host=

並一直提示輸入用戶名,密碼

系統用戶給系統用戶可以發郵件,在伺服器上能看到郵件方在了對應的用戶名下
,但系統用戶不能給 用 Saslpasswd 增加的用戶發郵件,日誌中提示 User unknown
,另外非系統用戶不能向外面發郵件,總是提示輸入用戶名,密碼 並在日誌中提示:

did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA


請大俠指點,跪謝了。。。
《解決方案》

saslpasswd 應該只是 for SMTP AUTH 的吧 !?
(我沒用過)
要用非系統用戶可以讓 sendmail 處理信件問題,重點在 PAM 的問題上
不在 sasl* 上
《解決方案》

回復 2樓 abel 的帖子

但系統用戶用 outlook 也是收不到信件,
日誌是這樣的:
pop3 service init from 61.237.235.2
Command stream end of file while reading line user=*** ,其中 *** 是我的郵件地址
《解決方案》

你若用 sendmail 先搞清楚 smtp , sasl , pop3 間的關係
《解決方案》

回復 4樓 abel 的帖子

大哥能否說詳細一點,我已經折騰了很長時間了,就是不知道哪裡的問題
系統用戶可以發郵件出去,外面的郵件也能發進來,並且從伺服器上看,郵件已經存在 /var/spool/mail 下面對應的系統用戶下 ,但用 out look 就是收不到,發的時候是 用 smtp,這個沒有問題,但收的時候是用 pop3 ,不知道 pop3 哪裡出問題了,從伺服器上 telnet localhost 110 ,登錄上去可以看郵件的,大哥請指點

我的系統有 sasl ,sasl2 ,在 /usr/lib/sasl2 下面有Sendmail.conf
內容已經改成是: pwcheck_method:saslauthd

[ 本帖最後由 pin_pin 於 2006-10-31 16:12 編輯 ]
《解決方案》

原帖由 pin_pin 於 2006-10-31 15:48 發表
但系統用戶用 outlook 也是收不到信件,
日誌是這樣的:
pop3 service init from 61.237.235.2
Command stream end of file while reading line user=*** ,其中 *** 是我的郵件地址
這裡的 *** 是 user account ,不是 user email
不然你把你的 pop3 操作 show 一下就知道了
《解決方案》

回復 6樓 abel 的帖子

Nov  1 09:19:40 ganpin ipop3d: pop3 service init from 221.219.248.207
Nov  1 09:19:53 ganpin ipop3d: Command stream end of file while reading line user=ganpincom@ganpin.com host=


我系統用戶是 ganpincom ,在余名管理後台已經設定 mail.ganpin.com 指向我的 ip.在outlook 用 ganpincom@ganpin.com,可以發信到 我在sohu.com 的一個郵箱,用 sohu.com 的這個郵箱也可以給 ganpincom@ganpin.com 發信,我在  /var/spool/mail/ganpincom 可以看到這個信,但用 out look 是收不到這個信的,一直彈出窗口提示輸入密碼,所以我懷疑是不是 Sasl認證有問題。自帶的 Sasl,系統有 sasl ,sals2 ,在 sasl2 下有 Sendmail.conf.另外 /etc/sysconfig/network 內容是:NETWORKING=yes
HOSTNAME=ganpin.com
GATEWAY=192.168.1.1
在 /etc/hosts 的內容是:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1        localhost.localdomain localhost
59.36.98.51     ganpin.com localhost.localdomain localhost

用 Salspasswd 增加個用戶,比如用系統用戶,並且換了個密碼,用這個密碼是發不了信的,只能用系統用戶登錄系統的密碼才可以發出去
《解決方案》

收信和 sasl 沒有什麼關係,
我想你的問題在於你把 outlook 中的 username 設成了 email , 而其實他只要 user 的部份就好了
也就是
user@domain 中的 user
《解決方案》

回復 8樓 abel 的帖子

我剛才試了,確實可以,也可以發,也可以收,那如果 帳戶名是  加了後綴的,比如 ganpincom@ganpin.com 卻收不了,如何實現呢,是不是用到別名什麼的?請大哥指點,小弟非常感激
《解決方案》

原帖由 pin_pin 於 2006-11-1 11:15 發表
我剛才試了,確實可以,也可以發,也可以收,那如果 帳戶名是  加了後綴的,比如 ganpincom@ganpin.com 卻收不了,如何實現呢,是不是用到別名什麼的?請大哥指點,小弟非常感激
你想這樣用巳經是 virtual domain 的用法,你可以看看這篇合不合用
http://cyrusimap.web.cmu.edu/imapd/install-virtdomains.html

[火星人 ] 關於sendmail 只有系統用戶能發信件出去,其他用戶確發不了的問題已經有628次圍觀

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