On Tue, Apr 27, 2010 at 10:18 AM, Noel Jones <[email protected]> wrote:
> If you want to help out folks who type in vaild-but-dead domain names, such
> as tehnews.com, you can add transport_maps entries to immediately  bounce
> the mail.
> # transport_maps
> tehnews.com  error:5.1.2 not a working domain

I really like the idea of creating a 'transport_map' so I verified my
/etc/postfix/transport directory existed and read the docs. I show
that 'transport smtp' is the default so I opened the transport file
and added the following line:

tehnews.com       error:5.1.2 not a working domain

I then saved the file and ran:

postmap /etc/postfix/transport

I really didn't see if I needed to specifically squeeze the
'transport_maps' parameter in a specific area in 'main.cf' so I
appended to the very end of the file as you can see from my new
Postconf -n below:

address_verify_sender = $double_bounce_sender
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavisfeed:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
home_mailbox = mail/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 20480000
mydestination = $myhostname, $mydomain, mail.$mydomain
mydomain = iamghost.com
myhostname = mail.iamghost.com
mynetworks = $config_directory/mynetworks
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
recipient_delimiter = +
relay_domains =
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_security_level = may
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,   reject_unauth_destination,
reject_non_fqdn_recipient,   reject_unknown_recipient_domain,
reject_non_fqdn_helo_hostname,   reject_invalid_helo_hostname,
check_policy_service unix:postgrey/socket,
reject_unlisted_recipient,   check_sender_access
hash:/etc/postfix/sender_access,   check_helo_access
pcre:/etc/postfix/helo_checks.pcre,        check_client_access
hash:/etc/postfix/client_access,   reject_rbl_client zen.spamhaus.org,
  reject_rbl_client bl.spamcop.net
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks,
permit_sasl_authenticated,    reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_unknown_reverse_client_hostname
smtpd_tls_CAfile = /etc/ssl/intermediate.crt
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /cert/pub/mail.crt
smtpd_tls_key_file = /cert/priv/mail.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
transport_maps = hash:$config_directory/transport
unknown_local_recipient_reject_code = 550

I tested this and it appears to give an immediate delivery failure
with reason. Does this look OK to you guys?

Reply via email to