サーバーから電子メールを送信できるアドレスのリストを制限します。

サーバーから電子メールを送信できるアドレスのリストを制限します。

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

サーバーでメール送信者を制限するにはどうすればよいですか?

ベストアンサー1

おすすめ記事