Postfix anti-spam settings

Source: Internet
Author: User
Tags config smtp auth

  increase the protection against the fake configuration of the sender's personal parts:

  code is as follows &nbs P;

# smtpd related config
smtpd_recipient_restrictions =
&nbs P 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

Add:

Configuration Extmail does not allow the forgery of non-existent local mail addresses, and does not allow and counterfeit other people's e-mail addresses to send mail

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 the configuration to take effect

Postfix Reload

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.