JohnD a écrit : >> Use the Email Address Patterns for the lookup key sequence in >> http://www.postfix.org/access.5.html and apply that to the pgsql_table >> document.. >> A check sender access will always reference the MAIL FROM given to Postfix. > >> It is up to you and your needs as to what the table will contain and its >> structure. > > Thank you for the response. It turns out I don't have this configured > correctly in the first place. What I am trying to do is reject mail from > specific domain(s) that are specified in my sender_access_map hash. > > postconf -n > > alias_maps = hash:/etc/postfix/aliases > broken_sasl_auth_clients = yes > canonical_maps = pgsql:/etc/postfix/sql/pgsql-canonical-maps.cf > command_directory = /usr/sbin > config_directory = /etc/postfix > content_filter = amavisfeed:[127.0.0.1]:10024 > daemon_directory = /usr/libexec/postfix > data_directory = /var/lib/postfix > debug_peer_level = 2 > home_mailbox = Maildir/ > html_directory = no > mail_owner = postfix > mailq_path = /usr/bin/mailq > manpage_directory = /usr/share/man > masquerade_domains = $mydomain > message_size_limit = 10240000 > mydestination = $myhostname > mydomain = eliteswa.com > myhostname = mail.example.com > mynetworks = 192.168.0.0/24, 127.0.0.0/8 > myorigin = $mydomain > newaliases_path = /usr/bin/newaliases > queue_directory = /var/spool/postfix > readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES > sample_directory = /usr/share/doc/postfix-2.3.3/samples > sendmail_path = /usr/sbin/sendmail > setgid_group = postdrop > smtp_tls_note_starttls_offer = yes > smtp_use_tls = yes > smtpd_helo_required = yes > smtpd_recipient_restrictions = reject_non_fqdn_recipient, > reject_non_fqdn_sender, > check_sender_access > hash:/etc/postfix/sender_access_map, > permit_sasl_authenticated, > permit_mynetworks, > reject_unauth_destination, > reject_unknown_sender_domain, > reject_rbl_client zen.spamhaus.org > smtpd_reject_unlisted_sender = yes > smtpd_sasl_auth_enable = yes > smtpd_sasl_local_domain = $mydomain > smtpd_sasl_path = smtpd > smtpd_sasl_security_options = noanonymous > smtpd_tls_auth_only = no > smtpd_tls_cert_file = /etc/postfix/ssl/example-cert.pem > smtpd_tls_key_file = /etc/postfix/ssl/example-key.pem > smtpd_tls_loglevel = 1 > smtpd_tls_received_header = yes > smtpd_tls_session_cache_timeout = 3600s > smtpd_use_tls = yes > soft_bounce = no > tls_random_source = dev:/dev/urandom > unknown_local_recipient_reject_code = 550 > virtual_alias_maps = pgsql:/etc/postfix/sql/pgsql-virtual-alias-maps.cf > virtual_gid_maps = pgsql:/etc/postfix/sql/pgsql-virtual-gid-maps.cf > virtual_mailbox_base = /var/spool/virtual_mailboxes > virtual_mailbox_domains = > pgsql:/etc/postfix/sql/pgsql-virtual-mailbox-domains.cf > virtual_mailbox_maps = > pgsql:/etc/postfix/sql/pgsql-virtual-mailbox-recipients.cf > virtual_uid_maps = pgsql:/etc/postfix/sql/pgsql-virtual-uid-maps.cf > > Here are the contents of sender_access_map: > > @domain1.com REJECT > @domain2.com REJECT > > Although, I'm still receiving email from these domains. What have I > misconfigured or what am I not correctly understanding? >
you didn't read "access" documentation. the format is wrong. example.com REJECT domain blocked ...