最新postfix的main.cf配置参考

自上次配置完postfix后,我对main.cf文件作了一次magic,以供以后参考;

其中的参数我不作完全解释,其余的参数可以参考鸟哥的文档《简易 Mail Server 架设 -- Postfix 设定》http://www.wucity.com/vbird/linux_server/0390postfix.php

#smtpd验证打开

smtpd_sasl_auth_enable = yes

#传送握手

smtpd_helo_required = yes

#传送握手约束条件
#smtpd_helo_restrictions =

#无效主机名
# reject_invalid_hostname

#裸IP
# permit_naked_ip_address,

#未知主机名

# reject_unknown_hostname,
#非规范主机名

# reject_non_fqdn_hostname,
#用mapname来过滤

# check_helo_access maptype:mapname

#本地域限制

#smtpd_sasl_local_domain =

#允许登录
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes

#recive filter 接收限制 permit表示接受,reject表示拒绝
smtpd_recipient_restrictions =
 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,
 check_policy_service inet:127.0.0.1:10030,
 reject_rbl_client cbl.anti-spam.org.cn,
 reject_rbl_client cdl.anti-spam.org.cn,
 reject_rbl_client cblplus.anti-spam.org.cn,
 reject_rbl_client dialup.ecenter.idv.tw,
 reject_rbl_client spam.ecenter.idv.tw,
 reject_rbl_client relays.ordb.org,
 check_relay_domains,
# permit_mx_backup,
# reject_unknown_recipient_domain,
# reject_unknown_sender_domain
 reject

#客户端限制
#smtp_client_restrictions = permit_sasl_authenticated
smtpd_client_restrictions =
 permit_mynetworks,
 permit_sasl_authenticated,
# reject_rbl_client bl.anti-spam.org.cn,
# reject_rbl_client cbl.anti-spam.org.cn,
# reject_rbl_client cdl.anti-spam.org.cn,
# reject_rbl_client cblplus.anti-spam.org.cn,
# reject_unknow_client,
# reject_unauth_pipelining
 reject

#sender role 发送方限制
smtpd_sender_restrictions =
 permit_sasl_authenticated,
# reject_non_fqdn_sender,
# reject_unknown_sender_domain,
# reject_rhsbl_sender dsn.rfc-ignorant.org
# check_sender_access hash:/etc/postfix/sender_access,
 reject

#RFC821 role 规则限制
#strict_rfc821_envelopes = no

#spam block 黑名单联盟
#maps_rbl_domains = blackholes.mail-abuse.org

#way what send error info to use by 反回错误信息给用户的方法
notify_classes =
 2bounce,
 policy,
 resource
# delay,
# protocol,
# software

#save mails days (day) 保存MAIL的最长期限
maximal_queue_lifetime = 30

#resend the bad mail spacing (secend) 重发机制时间
maximal_backoff_time= 4000
minimal_backoff_time= 600

#SMTP error spacing (secend) 错误发送空闲时间
smtpd_error_sleep_time = 5

#SMTP soft error spacing (times) 系统错误发送空闲时间
smtp_soft_error_limit = 10

#SMTP hard error spacing (times) 重大错误发送空闲时间
smtp_hard_error_limit = 100

#Virus filter 病毒过滤
content_filter = smtp-amavis:[127.0.0.1]:10024

#head check filter 邮件头检测
header_checks = regexp:/etc/postfix/header_checks

#mail body filter 邮件体检测
body_checks = regexp:/etc/postfix/body_checks

#SMTP max line length 邮件行长限制
line_length_limit = 2048

#recevier num limit 接收邮件最大数据限制
extract_recipient_limit = 20

#mail head size 邮件头大小
header_size_limit = 102400

#mail text size 邮件体限制
message_size_limit =20480000

#bounce mail size 系统回信大小限制
bounce_size_limit=50000

 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值