有什么办法来configuration后缀跳过垃圾邮件/防病毒检查的smtp连接是SMTP-AUTH'ed? 我想保留所有的外部smtpstream量的标准检查,但为我的本地用户发送电子邮件,我想跳过反垃圾邮件/防病毒检查。
我的configuration有几乎标准configuration的Postfix + Amavisd + SpamAssassin + clamav。
提前致谢。 先生
在main.cf中设置
smtpd_data_restrictions = reject_unauth_pipelining,permit_sasl_authenticated,check_sender_access pcre:/etc/postfix/content_filter.pcre
不要在main.cf中设置content_filter =!
/etc/postfix/content_filter.pcre应该是这样的:
/^/ FILTER smtp-amavis:[127.0.0.1]:10024
不要忘记跑步
postmap /etc/postfix/content_filter.pcre
master.cf应该是这样的:
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_data_restrictions= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 smtp-amavis unix - - n - 16 lmtp -o lmtp_data_done_timeout=1200 -o lmtp_send_vforward_command=yes -o disable_dns_lookups=yes
希望这可以帮助。 有关更多信息,请参阅http://www.postfix.org/postconf.5.html 。
在您的main.cf文件中,假设您的垃圾邮件筛选器位于smtpd_recipient_restrictions (或smtpd_data_restrictions / smtpd_something_restrictions )中, permit_sasl_authenticated在其他任何permit_sasl_authenticated之前添加permit_sasl_authenticated 。 这将在过程中尽早接受已通过身份validation的用户,而无需执行任何进一步的检查。 可能有办法让你的垃圾邮件/病毒扫描被包含在smtpd_*_restrictions行中,使用类似于check_policy_service条目的东西,它将检查master.cf中定义的服务。 我目前使用这个来对所有的邮件运行一个外部的spftesting,但是我希望它能用于其他检查。
pcre文件不应该postmap'ed 。
如果在sasl auth中不使用端口25,那么在smtp端口25中使用content_filter将会禁用smtp auth用户。
这不是很难configuration。