EMOS在大用户量环境的性能调优

参数不是最合适的,但应该是足够大的,500用户,在dell 1950标配机上跑着没问题。
1、修改/usr/lib/courier-imap/etc/pop3d
MAXDAEMONS=512
MAXPERIP=9000
2、修改/etc/authlib/authdaemonrc
daemons=256
3、修改/etc/amavisd.conf
$max_servers = 50;
4、修改/usr/sbin/apachectl
HTTPD='/usr/sbin/httpd.worker'
5、修改/etc/httpd/conf/httpd.conf
<IfModule worker.c>
StartServers         10
MaxClients       1500
ServerLimit         100
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>
6、修改/etc/clamd.conf
MaxThreads 50
7、修改/etc/my.cnf
max_connections=2048
8、去除rar打包exe会被ban的问题
编辑/etc/amavisd.conf,把$banned_filename_re = new_RE 这段内容相应的修改下
如果你知道该重启哪些服务,就重启这些服务,不清楚的话重启下系统就好。
9、加强发信人限制策略
编辑/etc/postfix/master.cf,把-o smtpd_client_restrictions=permit_sasl_authenticated,reject这行注释去掉。
10、仅允许同域用户给别名群发邮件。
原来的思路是用邮件列表做控制,后来发现邮件列表越搞越复杂越多事,又搜索了一把,发现用postfix的发信和收信人策略搞更方便,分享之。

A、        创建local_recipient和local_domains两个文件
[root@a postfix]# pwd
/etc/postfix
[root@a postfix]# cat local_recipient
allstaff@a.com local_only
[root@a postfix]# cat local_domains  
a.com OK
127.0.0.1 OK
youip OK
B、        产生db文件,如果修改过/etc/postfix/local_recipient和/etc/postfix/local_domains文件内容,需要重新执行下面的命令才可生效。
postmap hash:/etc/postfix/local_recipient
postmap hash:/etc/postfix/local_domains
C、        在main.cf里加入两行
smtpd_restriction_classes = local_only
local_only = check_sender_access hash:/etc/postfix/local_domains, reject
D、        在main.cf里给smtpd_sender_restrictions加个规则check_recipient_access hash:/etc/postfix/local_recipient,结果如下:
smtpd_sender_restrictions =
permit_mynetworks,
reject_sender_login_mismatch,
reject_authenticated_sender_login_mismatch,
reject_unauthenticated_sender_login_mismatch,
reject_unknown_sender_domain,
check_recipient_access hash:/etc/postfix/local_recipient
F、        重启postfix。

此时非a.com用户无法给allstaff发信。
弹回信息如下:
你发送到allstaff@a.com的邮件由于以下原因被退回 :
allstaff@a.com SMTP error, RCPT TO: 554 5.7.1 <allstaff@a.com>: Recipient address rejected: Access denied
请到http://help.163.com/special/00752CTC/126_tran_withdrawal_letter.html 查询退信原因。
参考了http://www.extmail.org/forum/viewthread.php?tid=4102&extra=&page=1和http://www.extmail.org/forum/viewthread.php?tid=8244&extra=page%3D5%26amp%3Bfilter%3Dtype%26amp%3Btypeid%3D1&page=1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值