亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 4855 | 回復(fù): 8
打印 上一主題 下一主題

[Mail] 如何禁止postfix的smtp而只是用esmtp [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2009-09-06 00:44 |只看該作者 |倒序瀏覽
正在弄一個postfix的mailserver 看了marion 的文檔,編譯安裝。裝完測試發(fā)現(xiàn)一些問題,foxmail不管是否勾選通過smtp認(rèn)證都可以發(fā)出郵件,看日志然后telnet感覺esmtp是有的,但是smtp沒有禁止。不知如何禁止。下面是日志,希望碰到過同類問題的朋友們幫忙

不勾選認(rèn)證的日志
Sep  5 23:58:39 ****** postfix/smtpd[16767]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep  5 23:58:39 ****** postfix/smtpd[16767]: warning: 58.33.157.147: address not listed for hostname 147.157.33.58.broad.xw.sh.dynamic.163data.com.cn
Sep  5 23:58:39 ****** postfix/smtpd[16767]: connect from unknown[58.33.157.147]
Sep  5 23:58:39 ****** postfix/trivial-rewrite[16770]: warning: do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
Sep  5 23:58:39 ****** postfix/smtpd[16767]: NOQUEUE: reject: RCPT from unknown[58.33.157.147]: 504 5.5.2 <PC-200908251556>: Helo command rejected: need fully-qualified hostname; from=<test@test.com> to=<test@gmail.com> proto=SMTP helo=<PC-200908251556>
Sep  5 23:58:39 ****** postfix/smtpd[16767]: lost connection after RCPT from unknown[58.33.157.147]
Sep  5 23:58:39 ****** postfix/smtpd[16767]: disconnect from unknown[58.33.157.147]
Sep  5 23:58:39 ****** postfix/smtpd[16767]: warning: 58.33.157.147: address not listed for hostname 147.157.33.58.broad.xw.sh.dynamic.163data.com.cn
Sep  5 23:58:39 ****** postfix/smtpd[16767]: connect from unknown[58.33.157.147]
Sep  5 23:58:39 ****** postfix/smtpd[16767]: 9FA60F270032: client=unknown[58.33.157.147], sasl_method=LOGIN, [email=sasl_username=test@test.com]sasl_username=test@test.com[/email]
Sep  5 23:58:39 ****** postfix/cleanup[16774]: 9FA60F270032: message-id=<>
Sep  5 23:58:39 ****** postfix/qmgr[16776]: 9FA60F270032: from=<test@test.com>, size=643, nrcpt=1 (queue active)
Sep  5 23:58:39 ****** postfix/smtpd[16767]: disconnect from unknown[58.33.157.147]
Sep  5 23:58:44 ****** postfix/smtp[16777]: 9FA60F270032: to=<test@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.222.46]:25, delay=5, delays=0.1/0/2.5/2.5, dsn=2.0.0, status=sent (250 2.0.0 OK 1252166324 12si7091801pzk.74)
Sep  5 23:58:44 ****** postfix/qmgr[16776]: 9FA60F270032: removed



勾選后的日志

Sep  6 00:16:16 ****** postfix/smtpd[16822]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep  6 00:16:16 ****** postfix/smtpd[16822]: warning: 58.33.157.147: address not listed for hostname 147.157.33.58.broad.xw.sh.dynamic.163data.com.cn
Sep  6 00:16:16 ****** postfix/smtpd[16822]: connect from unknown[58.33.157.147]
Sep  6 00:16:17 ****** postfix/trivial-rewrite[16826]: warning: do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
Sep  6 00:16:17 ****** postfix/smtpd[16822]: 070C7F270032: client=unknown[58.33.157.147], sasl_method=LOGIN, [email=sasl_username=test@test.com]sasl_username=test@test.com[/email]
Sep  6 00:16:17 ****** postfix/cleanup[16829]: 070C7F270032: message-id=<>
Sep  6 00:16:17 ****** postfix/qmgr[16776]: 070C7F270032: from=<test@test.com>, size=643, nrcpt=1 (queue active)
Sep  6 00:16:17 ****** postfix/smtpd[16822]: disconnect from unknown[58.33.157.147]
Sep  6 00:16:21 ****** postfix/smtp[16831]: 070C7F270032: to=<test@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.222.46]:25, delay=4.4, delays=0.1/0/1.7/2.6, dsn=2.0.0, status=sent (250 2.0.0 OK 1252167381 12si7096839pzk.6)
Sep  6 00:16:21 ****** postfix/qmgr[16776]: 070C7F270032: removed

在上面的日志里也沒看到用esmtp協(xié)議的樣子,只有更sasl_method的login認(rèn)證
自己也剛接觸postfix,覺得如果客戶端勾選esmtp認(rèn)證的話在日志里應(yīng)該會出現(xiàn)相應(yīng)的字符才對。就像不是用出現(xiàn)smtp一樣。

自己配的main.cf
broken_sasl_auth_clients = yes
command_directory = /usr/local/postfix/sbin
config_directory = /etc/postfix
daemon_directory = /usr/local/postfix/libexec
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = /var/www/postfix_html
inet_interfaces = all
mail_owner = vmail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/postfix/man
message_size_limit = 14336000
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = test.com
myhostname = mail.test.com
mynetworks = 127.0.0.1
newaliases_path = /usr/bin/newaliases
queue_directory = /home/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1000
virtual_mailbox_base = /home/domains
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 20971520
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = virtual
virtual_uid_maps = static:1000


不知道問題出在哪里。

論壇徽章:
0
2 [報告]
發(fā)表于 2009-09-06 22:00 |只看該作者
原帖由 minmig 于 2009-9-6 00:44 發(fā)表
正在弄一個postfix的mailserver 看了marion 的文檔,編譯安裝。裝完測試發(fā)現(xiàn)一些問題,foxmail不管是否勾選通過smtp認(rèn)證都可以發(fā)出郵件,看日志然后telnet感覺esmtp是有的,但是smtp沒有禁止。不知如何禁止。下 ...


別用foxmail測試,太智能了。

論壇徽章:
0
3 [報告]
發(fā)表于 2009-09-07 10:59 |只看該作者
多謝樓上回復(fù)



現(xiàn)在換用outlook explore測試

果然需要通過選中需要身份驗證才能發(fā)件

看了一下日志和error信息。



不選身份驗證如下:

outlook error信息是
  1. Helo command rejected: need fully-qualified hostname
復(fù)制代碼
postfix日志是:
  1. Sep  7 10:09:03 ****** postfix/smtpd[4972]: connect from unknown[*.*.*.*]
  2. Sep  7 10:09:03 ****** postfix/trivial-rewrite[4975]: warning: do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
  3. Sep  7 10:09:03 ****** postfix/smtpd[4972]: NOQUEUE: reject: RCPT from unknown[*.*.*.*]: 504 5.5.2 <PC200908251556>: Helo command rejected: need fully-qualified hostname; from=<test@test.com> to=<minmig@gmail.com> proto=SMTP helo=<PC200908251556>
  4. Sep  7 10:09:03 ****** postfix/smtpd[4972]: NOQUEUE: reject: RCPT from unknown[*.*.*.*]: 504 5.5.2 <PC200908251556>: Helo command rejected: need fully-qualified hostname; from=<test@test.com> to=<minmig@gmail.com> proto=SMTP helo=<PC200908251556>
  5. Sep  7 10:09:03 ****** postfix/smtpd[4972]: disconnect from unknown[*.*.*.*]
復(fù)制代碼
根據(jù)以上日志感覺是 沒有點認(rèn)證時,沒有獲取fqdn,從而在無法再mysql數(shù)據(jù)庫找到相應(yīng)記錄所以檢測不過。而不是因為ESMTP認(rèn)證不過造成的。

自己感覺,希望樓上指正。



下面是勾選了smtp認(rèn)證的日志
  1. Sep  7 10:27:34 ****** postfix/smtpd[5024]: connect from unknown[*.*.*.*]
  2. Sep  7 10:27:34 ****** authdaemond: received auth request, service=smtp, authtype=login
  3. Sep  7 10:27:34 ****** authdaemond: authmysql: trying this module
  4. Sep  7 10:27:34 ****** authdaemond: authmysqllib: connected. Versions: header 50045, client 50045, server 50045
  5. Sep  7 10:27:34 ****** authdaemond: SQL query: SELECT username, password, "", '1000', '1000', concat('/home/domains/',maildir), concat('/home/domains/',maildir), "", name, "" FROM mailbox WHERE username = 'test@test.com'
  6. Sep  7 10:27:34 ****** authdaemond: password matches successfully
  7. Sep  7 10:27:34 ****** authdaemond: authmysql: sysusername=<null>, sysuserid=1000, sysgroupid=1000, homedir=/home/domains/test.com/test/Maildir/, address=test@test.com, fullname=test, maildir=/home/domains/test.com/test/Maildir/, quota=<null>, options=<null>
  8. Sep  7 10:27:34 ****** authdaemond: authmysql: clearpasswd=<null>, passwd=$1$Xb14kEH9$lpc6pMVcskOs0ZEGri/We0
  9. Sep  7 10:27:34 ****** authdaemond: Authenticated: sysusername=<null>, sysuserid=1000, sysgroupid=1000, homedir=/home/domains/test.com/test/Maildir/, address=test@test.com, fullname=test, maildir=/home/domains/test.com/test/Maildir/, quota=<null>, options=<null>
  10. Sep  7 10:27:34 ****** authdaemond: Authenticated: clearpasswd=test, passwd=********
  11. Sep  7 10:27:34 ****** postfix/trivial-rewrite[5028]: warning: do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
  12. Sep  7 10:27:34 ****** postfix/smtpd[5024]: 1B8CCF270034: client=unknown[*.*.*.*], sasl_method=LOGIN, sasl_username=test@test.com
  13. Sep  7 10:27:34 ****** postfix/cleanup[5031]: 1B8CCF270034: message-id=<5D4AEE77B429461FAE6BBE79F869C90E@PC200908251556>
  14. Sep  7 10:27:34 ****** postfix/qmgr[6055]: 1B8CCF270034: from=<test@test.com>, size=1401, nrcpt=1 (queue active)
  15. Sep  7 10:27:34 ****** postfix/smtpd[5024]: 2E4CCF270035: client=unknown[*.*.*.*], sasl_method=LOGIN, sasl_username=test@test.com
  16. Sep  7 10:27:34 ****** postfix/cleanup[5031]: 2E4CCF270035: message-id=<0B8F6BBFDBA048B2870B6BF359D2E35B@PC200908251556>
  17. Sep  7 10:27:34 ****** postfix/qmgr[6055]: 2E4CCF270035: from=<test@test.com>, size=2179, nrcpt=1 (queue active)
  18. Sep  7 10:27:34 ****** postfix/smtpd[5024]: 3970FF270036: client=unknown[*.*.*.*], sasl_method=LOGIN, sasl_username=test@test.com
  19. Sep  7 10:27:34 ****** postfix/cleanup[5031]: 3970FF270036: message-id=<562C77B577B04EA484DE796B76BDFA52@PC200908251556>
  20. Sep  7 10:27:34 ****** postfix/qmgr[6055]: 3970FF270036: from=<test@test.com>, size=2179, nrcpt=1 (queue active)
  21. Sep  7 10:27:34 ****** postfix/smtpd[5024]: disconnect from unknown[*.*.*.*]
  22. Sep  7 10:27:36 ****** postfix/smtp[5035]: 3970FF270036: to=<minmig@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.222.15]:25, delay=2.8, delays=0.04/0/1.6/1.1, dsn=2.0.0, status=sent (250 2.0.0 OK 1252290456 15si14450451pzk.92)
  23. Sep  7 10:27:36 ****** postfix/qmgr[6055]: 3970FF270036: removed
  24. Sep  7 10:27:37 ****** postfix/smtp[5034]: 2E4CCF270035: to=<minmig@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.222.15]:25, delay=3.7, delays=0.03/0/2.6/1, dsn=2.0.0, status=sent (250 2.0.0 OK 1252290457 15si14651865pzk.58)
  25. Sep  7 10:27:37 ****** postfix/qmgr[6055]: 2E4CCF270035: removed
  26. Sep  7 10:27:37 ****** postfix/smtp[5033]: 1B8CCF270034: to=<minmig@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.222.15]:25, delay=3.8, delays=0.08/0/1.9/1.8, dsn=2.0.0, status=sent (250 2.0.0 OK 1252290457 15si14651774pzk.58)
  27. Sep  7 10:27:37 ****** postfix/qmgr[6055]: 1B8CCF270034: removed
復(fù)制代碼
弄了那么就對postfix的ESMTP認(rèn)真模塊的流程還是有點模糊



感覺是  outlook -->  smtpd --> sasl2 --> authlib --> mysql 。不知道對不對,Esmtp在哪里來獲得支持,是smtpd還是sasl2還是authlib。感覺是在sasl上面做的,但是又不知道在哪里設(shè)置。

還有一點是當(dāng)初在編譯postfix的時候就直接支持mysql ,為什么還需要用通過authlib來連接mysql呢?

希望大;蚺龅竭^相關(guān)問題的朋友幫忙。

[ 本帖最后由 minmig 于 2009-9-7 11:03 編輯 ]

論壇徽章:
8
綜合交流區(qū)版塊每周發(fā)帖之星
日期:2015-12-02 15:03:53數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-10-02 06:20:00IT運維版塊每日發(fā)帖之星
日期:2015-10-02 06:20:00IT運維版塊每日發(fā)帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年紀(jì)念徽章
日期:2013-10-24 15:41:34酉雞
日期:2013-10-19 10:17:1315-16賽季CBA聯(lián)賽之北京
日期:2017-03-06 15:12:44
4 [報告]
發(fā)表于 2009-09-07 12:17 |只看該作者
原帖由 minmig 于 2009-9-7 10:59 發(fā)表
多謝樓上回復(fù)



現(xiàn)在換用outlook explore測試

果然需要通過選中需要身份驗證才能發(fā)件

看了一下日志和error信息。



不選身份驗證如下:

outlook error信息是Helo command rejected: need fu ...




如果你的mynetworks參數(shù)包括你的網(wǎng)段,勾不勾選需要認(rèn)證都可以發(fā)信收信的

還有一點是當(dāng)初在編譯postfix的時候就直接支持mysql ,為什么還需要用通過authlib來連接mysql呢?
-------這個是起橋梁作用吧,postfix編譯支持mysql只是支持這個backend而已

論壇徽章:
0
5 [報告]
發(fā)表于 2009-09-07 12:53 |只看該作者
原帖由 ruochen 于 2009-9-7 12:17 發(fā)表




如果你的mynetworks參數(shù)包括你的網(wǎng)段,勾不勾選需要認(rèn)證都可以發(fā)信收信的

還有一點是當(dāng)初在編譯postfix的時候就直接支持mysql ,為什么還需要用通過authlib來連接mysql呢?
-------這個是起橋梁作用 ...



服務(wù)器是放在機(jī)房要加強(qiáng)安全,所以準(zhǔn)備加ESMTP認(rèn)證。要不要那個機(jī)器中毒了亂發(fā)郵件。雖然如果帳號泄密也會亂發(fā)郵件,如果用ESMTP在事后查起來能相對好一點。還有看到網(wǎng)上一些人利用mynetworks 的漏洞吧自己ip偽造成127.0.0.X 或 192.168.0.X吧服務(wù)器當(dāng)成open relay。不知道是真是假。
第二個問題多謝版主。

論壇徽章:
0
6 [報告]
發(fā)表于 2009-09-07 13:53 |只看該作者
還有一點是當(dāng)初在編譯postfix的時候就直接支持mysql ,為什么還需要用通過authlib來連接mysql呢?


這個理解不太對。你的postfix是通過sasl認(rèn)證的吧。sasl是調(diào)用的authlib來做認(rèn)證的吧。那就是authlib讀Mysql來認(rèn)證的

論壇徽章:
0
7 [報告]
發(fā)表于 2009-09-07 14:20 |只看該作者
原帖由 scyzxp 于 2009-9-7 13:53 發(fā)表


這個理解不太對。你的postfix是通過sasl認(rèn)證的吧。sasl是調(diào)用的authlib來做認(rèn)證的吧。那就是authlib讀Mysql來認(rèn)證的


那就是說在編譯postfix時不用加入mysql的目錄在日后也能通過authlib來用mysql認(rèn)證?
還有那個sals如何強(qiáng)制esmtp的問題...

論壇徽章:
0
8 [報告]
發(fā)表于 2009-09-07 14:41 |只看該作者
原帖由 minmig 于 2009-9-7 14:20 發(fā)表


那就是說在編譯postfix時不用加入mysql的目錄在日后也能通過authlib來用mysql認(rèn)證?
還有那個sals如何強(qiáng)制esmtp的問題...



postfix+mysql與驗證沒有任何關(guān)系。

論壇徽章:
0
9 [報告]
發(fā)表于 2009-09-07 14:50 |只看該作者
原帖由 scyzxp 于 2009-9-7 14:41 發(fā)表



postfix+mysql與驗證沒有任何關(guān)系。


這個是另外一個問題,我有點疑問隨口問的。
認(rèn)證的問題還是要看sasl哪里配,讓他體現(xiàn)出來。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP