技術員聯(lián)盟提供win764位系統(tǒng)下載,win10,win7,xp,裝機純凈版,64位旗艦版,綠色軟件,免費軟件下載基地!

當前位置:主頁 > 教程 > 服務器類 >

postfix反垃圾郵件設置

來源:技術員聯(lián)盟┆發(fā)布時間:2018-10-16 18:16┆點擊:

  增加防止發(fā)件人身份偽造的配置:

 代碼如下      

# smtpd related config
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

smtpd_sender_restrictions =
  permit_mynetworks,
  check_recipient_access hash:/etc/postfix/local_recipient,
  permit_sasl_authenticated,
  reject_sender_login_mismatch,
  reject_authenticated_sender_login_mismatch,
  reject_unauthenticated_sender_login_mismatch,
  reject_unknown_sender_domain

# SMTP AUTH config here
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

 

  補充:

  配置extmail不允許偽造不存在的本地郵件地址發(fā)郵件,不允許并仿冒他人郵件地址發(fā)送郵件

  cd /etc/postfix/

  cat >mysql_virtual_sender_maps.cf<

  user = extmail

  password = extmail

  hosts = localhost

  dbname = extmail

  table = mailbox

  select_field = username

  where_field = username

  additional_conditions = AND active = '1'

  EOF

  vim main.cf

  smtpd_sender_login_maps =

  mysql:/etc/postfix/mysql_virtual_sender_maps.cf

  smtpd_sender_restrictions =

  permit_mynetworks,

  reject_sender_login_mismatch,

  reject_authenticated_sender_login_mismatch,

  reject_unauthenticated_sender_login_mismatch使配置生效

  postfix reload