史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   網路疑難應用技術研討區 (http://forum.slime.com.tw/f47.html)
-   -   非常慎重的考慮放棄sendmail =.= (http://forum.slime.com.tw/thread194022.html)

Chin-Wei 2006-12-20 07:38 PM

非常慎重的考慮放棄sendmail =.=
 
今天下午在設定 enhdnsbl 的時候,想說黑名單設一設,會不會一不小心去把isp的mail server也擋掉?有點可怕,就去找了找白名單的設定方式。在google上找到這篇:
http://patrick.vande-walle.eu/softwa...sing-sendmail/

其實重點在這段:
引用:

DNS white list

Why should you have a DNS white list ? Sometimes, you may need to accept e-mails from machines placed on DNS black lists. In this case, running a local white list is an answer. Beware that the following line should appear in your Sendmail.mc BEFORE the lines mentioning the blacklists.

HACK(`dnswl’, `whitelist.yourserver.com’)dnl

Replace yourserver.com with your own DNS server. You should also add a file named dnswl.m4 in /usr/share/sendmail-cf/hack containing:

divert(8)
R$* $: $&{client_addr}
R::ffff:$-.$-.$-.$- $: $(host $4.$3.$2.$1._ARG_. $: NotFound $)
R$-.$-.$-.$- $: $(host $4.$3.$2.$1._ARG_. $: NotFound $)
RNotFound $: OKSOFAR
R$+ $@
divert(-1)


On the DNS side (I am assuming you are using Bind), you would create a zone file with lines such as:

$ttl 5M
whitelist.yourserver.com. IN SOA whitelist.yourserver.com. hostmaster.yourserver.com. (
2006010300
1D
2H
30D
4D )

whitelist.yourserver.com. IN NS dns.yourserver.com.
IN A 0.0.0.0
;
; test entry
2.0.0.127 IN A 127.0.0.2
IN TXT “Test Entry”
;
; remember to reverse the octets!
;
; consider exempting your own mail server
1.0.168.192 IN A 127.0.0.2 ; my mail server IP address

; These are the server we want to whitelist. Do not forget to reverse the octets !
1.0.0.10 IN A 127.0.0.2

Rather than Bind, you could also run rbldnsd, a small daemon that would make it easier to serve DNS white (or black) lists. Its main advantage is that you can add IP addresses to its zone file in native (i.e. not reversed) format, possibly saving yourself a few scripting lines if you would automate the process of adding hosts to the list.


紅色記號的部份,鬼才看得懂哩:56gtyhu:
夭壽喔..... 要是再這樣下去,我看遲早都得去動到 sendmail.cf 那個天書設定檔 =.=
我看也該是時候投向 Postfix 的懷抱..........:face29:

飛鳥 2006-12-21 02:01 PM

其實我也考慮過耶,sendmail.cf那個火星人語言的設定檔,地球人怎麼可能看得懂

也想過改用Postfix,不過現在用的好好的,別亂動的好

之後去看sendmail.mc就好,不過進階功能,還是要那個.cf檔

Chin-Wei 2006-12-21 02:24 PM

引用:

作者: 飛鳥
其實我也考慮過耶,sendmail.cf那個火星人語言的設定檔,地球人怎麼可能看得懂

也想過改用Postfix,不過現在用的好好的,別亂動的好

之後去看sendmail.mc就好,不過進階功能,還是要那個.cf檔

嗯呀... 不過偶是覺得趁現在中毒未深,趕快轉換跑道先 =.=

Chin-Wei 2006-12-24 09:27 PM

今天偶的 Mail Server 收到一封 pchome 的 Mail Server 丟過來的 report:

引用:

This is the Postfix program at host ms63.pchome.com.tw.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The Postfix program

<xxxx@pchome.com.tw>: maildir delivery failed: Sorry, the user's maildir has
overdrawn his diskspace quota, please try again later.



pchome 也是使用 Postfix 耶...:face29:
阿鳥老大~ 偶們一起手牽手投向 Postfix 陣營好不好:n3:

飛鳥 2006-12-25 12:26 AM

如果懂了sendmail,Postfix更好懂了

因為Postfix是根據sendmail做簡化設定檔來的,所以原理都從sendmail來

可看看鳥哥(vbird)的介紹http://linux.vbird.org/linux_server/0390postfix.php

Chin-Wei 2006-12-25 12:50 AM

引用:

作者: 飛鳥
如果懂了sendmail,Postfix更好懂了
因為Postfix是根據sendmail做簡化設定檔來的,所以原理都從sendmail來
可看看鳥哥(vbird)的介紹http://linux.vbird.org/linux_server/0390postfix.php

其實是因為小老弟常常看到許多高手 (小州、netman等),都是建議使用 Postfix
因為聽說擋spam擋到後來,若要得到極緻的效能,就必須要在SMTP Session建立時即進行Header過濾。偶是聽說這一塊用Postfix會容易很多啦......:o

sendmail 的 cf 檔不是給地球人看的....XXXXDDDDD
(要看的懂的話,可能腦袋裡要內建 M4 處理器 =.=)

飛鳥 2006-12-25 04:00 PM

那應該要練習perl啦

深奧的perl程式也不是一般人看得懂的,全幾乎是符號 @@"

我還是要多練習perl吧

Chin-Wei 2006-12-25 07:22 PM

引用:

作者: 飛鳥
那應該要練習perl啦

深奧的perl程式也不是一般人看得懂的,全幾乎是符號 @@"

我還是要多練習perl吧

^___^

小老弟目前正在練習 bash......:face29:


所有時間均為台北時間。現在的時間是 04:29 AM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1