动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 邮件系统软件 > Qmail
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Qmail ]的信息

本月文章推荐
.如何才能在Qmail系统下实现删除定.
.在Fedora上建立自己的邮件服务器.
.Sqwebmail安装指南.
.web界面添加email的Perl程序不完.
.让 CBL 结合 SpamAssassin 使用.
.Linux下安全高效Web邮件服务器(上.
.如何在拨号环境下使用postfix.
.postfix + SpamAssassin with SP.
.Postfix+sasl认证方式的配置.
.分布式的Qmail邮件系统.
.Linux+IMAP4.7c1安装脚本.
.Postfix+SMTP 密碼認證.
.邮件系统的选型与架构专题(3).
.postfix邮件系统完整版.
.如何让postfix找到最佳MX记录.
.Fetchmail使用简介.
.基于Linux和Postfix的邮件系统的.
.构筑我的电子邮局(下)-QMail篇.
.在Linux平台上安装基于Postfix、.
.QMAIL+MH设计方案.

限制特定用户收发邮件的高级访问控制方法

发表日期:2006-12-3 |


一般邮件应用稍微有一电规模的企业,大多都会涉及到这样的应用需求:

某销售A只能收到来自163.com及sina.com的邮件某技术员B只能给内部用户发邮件,不允许向外网发邮件,但可以收到外网邮件某主管可以收发内、外网邮件......

如何实现呢?Postfix 1.x就已经可以通过配置实现这些功能了。

以下是邮件列表里Noel Jones 提出的解决方案:

Hello!

I have the same problem:

1. I need to permit some internal users (not all) to send mail to any
external user (Internet)
2. I need to permite any external user to send mail to some my internal
users (not all)

In fact, the problem is: just "some" of my internal users have permission to
receive mail from and send mail to the Internet.

How can I solve this?

寄件者:Noel Jones (njones@megan.vbhcs.org)
主旨:Re: RES: User Restriction.....


View this article only
新闻群组:mailing.postfix.users
日期:2002-12-04 15:18:04 PST

At 05:39 PM 12/4/02 -0200, raissa.medeiros@caixa.gov.br wrote:
>1. I need to permit some internal users (not all) to send mail to any
>external user (Internet)
>2. I need to permite any external user to send mail to some my internal
>users (not all)
>
>In fact, the problem is: just "some" of my internal users have permission
>to receive mail from and send mail to the Internet.
>
>How can I solve this?
>
>Thanks,
>Raissa

Restricting also who can receive mail from the internet changes the example
I posted a few minutes ago.

In the example below, the same list of restricted_users is used for
controlling both who can send and who can receive internet mail. If you
don't require the local_plus feature, just leave that part out.

  1. in main.cf:
  1. use restriction classes to make restricted_users file more readable.
    smtpd_restriction_classes = local_only, local_plus

local_only =
reject_unauth_destination
permit_mynetworks
reject

local_plus =
check_recipient_access hash:/etc/postfix/local_plus
check_sender_access hash:/etc/postfix/local_plus
reject_unauth_destination
permit_mynetworks
reject

  1. this is the default setting, required for this setup.
    smtpd_delay_reject = yes
  1. we'll do this in sender restrictions to avoid open relay problems.
    smtpd_sender_restrictions =
    check_sender_access hash:/etc/postfix/restricted_users
    check_recipient_access hash:/etc/postfix/restricted_users

and in /etc/postfix/restricted_users
# /etc/postfix/restricted_users
# this file contains a list of users only allowed to send and receive local
mail
# postmap this file after changes
# local users not listed here have no restrictions
user1@miodemi.com local_only
user2@miodemi.com local_plus

and in /etc/postfix/local_plus:
# /etc/postfix/local_plus
# this file contains allowed destinations and senders
# for users restricted to local_plus
# postmap this file after changes
miproveedor.com OK

Remember to "postmap local_plus" and "postmap restricted_users" after
making changes to them.
Remember to run "postfix reload" after changing main.cf

我自己常用的限制方法

有几个方法:

1) smtpd_restriction_classes = local_only
设置一个限制类别叫local_only,然后参考access(5)的格式做一个访问控制:

local_only = check_recipient_access hash:/etc/postfix/maps/my_rcpt

文件my_rcpt内容:

163.com RELAY21cn.com RELAYhzqbbc.com RELAY

然后,设置:

smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/maps/mysender 

mysender内容:

hzqbbc@local.hzqbbc.com   local_only 

这样凡是Mail from:的信只能RCPT TO: 到163.com, 21cn.com及 hzqbbc.com 三个地方了。其他的都发不出去。

按这个方法,还可以设置更多的类别,例如remote_only以及不限制的帐号等。但这些都只对from:限制。而且不管是否SASL后的。所以有一定缺陷。不过,已经达到目的了。

2)使用snapshot版的policy策略
根据某个hash表或配置文件,判断对应的sender和recipient是否匹配,匹配就返回OK或者DUNNO或者RELAY等(可能RELAY已经过时,这个是postfix 1.1.x的)如果不匹配就返回错误代码

按postfix所带的smtpd-policy.pl模式,修改一下就可以使用了。详细参考POLICY_README等。

3)使用APF for postfix
详细地址:http://apf.org.cn/addon/

其实和2)方法是基本一致的。同样利用postfix内置的policy功能。

上一篇:如何在postfix队列里删除以特定字符开头的邮件? 人气:3069
下一篇:维护Postfix的一些脚本、程序集锦 人气:2505
浏览全部Qmail/Sendmail/Postf的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-8-30 HBcms(宏博cms)内容管理系统 v1.1
2008-8-30 邓西网站帮助系统 v2.3
2008-8-30 破竹CMS v4.0.7.21
2008-8-30 美女写真网图片小偷 v1.5 全站静
2008-8-30 PHP美女写真Cms v1.00
2008-8-30 PHPer.yang情书系统 v1.0
2008-8-30 快乐商城全站源码
2008-8-29 oblog v4.6 build 20080827
2008-8-29 ASBLOG v2.5 bulid 080828
2008-8-23 Mini WinMount V0.4
2008-8-23 Vista优化大师3.11正式版
2008-8-23 Wine 1.13
2008-8-23 KlipFolio 5.0 Build 5899-80
2008-8-23 Windows Sysinternals Desktops
2008-8-23 OneTap Movies1.2破解版
2008-8-23 AnnotaterPDF阅读1.1.503 破解版
2008-8-23 SoundMeter分贝测量仪 v1.0汉化破
2008-8-23 iDrum音乐节拍1.0破解版
  发表评论
姓 名: 验证码:
内 容:
站长工具:网站收录查询 | Google PR查询 | ALEXA排名查询 | CSS在线编辑器 | 广告代码 | Html转换js | js/vbs加密 | md5加密 | 进制转换
实用工具:汉字翻译拼音 | 符号对照表 | 个税计算 | 经典小工具 | 汉字简繁转换 | 普通单位换算 | 公制单位换算 | 生辰老黄历 | 国内电话区号 国家代码与域名缩写 | 文字加密解密 | 健康查询 | 万年历 | 汉字横竖排版 | 手机号码查询 | 计算器 | ip搜索
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報
防水工事·改修工事 フットサル大会 探偵