限制可以从服务器发送电子邮件的地址列表

限制可以从服务器发送电子邮件的地址列表

我只想限制运行 Postfix 的 Ubuntu 系统中的特定列表来发送电子邮件,当然我可以接收外部电子邮件(发件人/收件人)

假设我的域名是tt.net

这是我从我的主机 OVH 收到的信息::

Our Antispam protection has detected a large amount of spam being sent from one of your IPs:
149.202.xx.xx

In order to ensure the security of our network the outgoing traffic from your server to
ports 25 has been suspended.

In order for you to check, here is a sample of the blocked emails:


  Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300
Destination IP: 185.34.84.134 - Message-ID: [email protected] - Spam score: 300

那些地址不是我的!并且未在我的虚拟列表中配置。

主.cf ::

default_destination_rate_delay = 2
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
myhostname = smtp.tt.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions =  permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/letsencrypt/live/webmail.tt.net/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/webmail.tt.net/privkey.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain = $myhostname
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf
virtual_transport =  dovecot
virtual_mailbox_base = /var/mail/vmail
smtpd_recipient_limit = 5000
dovecot_destination_recipient_limit = 1

smtpd_sender_restrictions =
   permit_mynetworks
   permit_sasl_authenticated
   reject_unknown_sender_domain
   reject_unknown_reverse_client_hostname
   reject_unknown_client_hostname
smtpd_helo_required = yes

smtpd_helo_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_invalid_helo_hostname
    reject_non_fqdn_helo_hostname
    reject_unknown_helo_hostname

master.cf(部分)

submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

如何限制我的服务器上的电子邮件发件人?

相关内容