iT邦幫忙

0

怎樣限制公司內部同事發電郵到街外??

我公司正在使用POSTFIX+SPAMASSASSIN
我老闆想限制一某些同事只能發電郵到公司內部,不能發出街外...
請問我應怎樣做呢?
謝謝

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
8
fantsyss
iT邦新手 2 級 ‧ 2011-08-30 15:24:44
最佳解答

我的話應該會用防火牆擋掉部分同仁的對外mail port,這樣應該就不能發出去。有誤請指正,謝謝。

joey6519 iT邦新手 4 級 ‧ 2011-08-31 10:18:00 檢舉

應該不對吧?Mail Server是在公司內部的話,限制那些員工的IP是沒有用的。
如果想用閘道端設備來限制,那設備應該要有郵件防護的功能。
一看到某些帳號要寄給其他非公司的帳號就阻擋才行。

fantsyss iT邦新手 2 級 ‧ 2011-08-31 21:35:13 檢舉

抱歉我沒有說的很清楚,的確是匣道器要有支援防護郵件的作用。

14
plums
iT邦高手 1 級 ‧ 2011-08-30 15:54:55

我們公司也有這樣的要求,在網路上找到的大部分是這個方法,自己有試過,確實可行,請參考

配置方法:
1)在main.cf里定义如下的smtpd_restriction_classes:

restrictions for local users - by extmail.org

smtpd_restriction_classes = local_only
local_only =
check_recipient_access hash:/etc/postfix/local_domains,
check_sender_access hash:/etc/postfix/local_domains,
reject
2)将main.cf里的smtpd_recipient_restrctions定义为:

local users restriction - by extmail.org

smtpd_recipient_restrictions =
check_client_access hash:/etc/postfix/local_users,
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname
3)编辑/etc/postfix/local_users:
192.168.0 local_only
192.168.1.5 local_only
4)编辑/etc/postfix/local_domains:
internal.foo.com OK
internal.bar.com OK
5)为3,4的文件建立hash:

postmap hash:/etc/postfix/local_users

postmap hash:/etc/postfix/local_domains

最好用root生成上述hash。
这样,就定义了extmail.org域里的192.168.0.0/24网段及192.168.1.5这个客户机只能收发internal.foo.com和internel.bar.com 两个域
名的邮件。这两个域名就是常规说的内部邮件域了。
如果这两类用户企图给外部发邮件,将遇到如下错误:
554 5.7.1 : Sender address rejected: Access denied
这样就基本达到了目的了。

6
CalvinKuo
iT邦大師 7 級 ‧ 2011-08-30 15:56:23

要用POSTFIX做的話,請參考這篇:
http://phorum.study-area.org/index.php?topic=39911.0

4
mis339
iT邦新手 2 級 ‧ 2011-08-31 09:23:43

小弟服務的客戶也有這樣的需求,目前是使用Mdaemon來解決。
曾詢問過國內某Mail Server軟體的「大廠」……竟然還被唸了一頓……說什麼他們最討厭那種架了Server還限制東限制西的公司…… >.<

4
oowo
iT邦高手 1 級 ‧ 2011-09-02 14:53:52

mail Server那能設規則的話…對要限制的人設下規則就行了…

4
新二君
iT邦新手 2 級 ‧ 2011-09-02 16:29:41

其實如果是限制內外就用postfix檔掉,但內可外不行雖然postfix可做但麻煩設定
我覺得還是用防火牆鎖ip和port 25方便許多~

如果有layer 4以上的網路設備因該更好做

我要發表回答

立即登入回答