3

when an email is sent to a non existing domain or recipient, i would like the sender to receive an immediate email from mailer-daemon informing the recipient does not exists.

Actually, what happens on my system is the email gets in the deferred queue and stays there the time specified in the configuration. As i setted delay_warning_time = 30m after 30 minutes in the queue the sender gets a notification but that's no what i want for non existing addresses. What i would like is to reject the email immediately and to notifify the sender.

Does anyone knows what i'm doing wrong? thanks a lot

Currently, non existing recipients emails are standing in the postfix queue:

# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
AA6CA48DCC     1496 Wed Feb 12 12:56:36  [email protected]
         (connect to mx.email-srv.com[199.231.85.98]:25: Connection timed out)
                                         [email protected]

6FF9948DFF     1498 Wed Feb 12 13:07:04  [email protected]
         (connect to mx.email-srv.com[199.231.85.98]:25: Connection timed out)
                                         [email protected]

Here's my Postfix configuration:

2bounce_notice_recipient = $delay_notice_recipient
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = no
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
delay_notice_recipient = admin
delay_warning_time = 30m
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
masquerade_domains = mail.domain.es mail.domain.com hostname.domain.es hostname.domain.com
maximal_backoff_time = 8000s
maximal_queue_lifetime = 5d
milter_default_action = accept
milter_protocol = 2
minimal_backoff_time = 1000s
mydestination =
mydomain = domain.es
myhostname = mail.domain.es
mynetworks_style = host
myorigin = domain.es
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = $smtpd_milters
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost =
relocated_maps = mysql:/etc/postfix/mysql_relocated.cf
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_helo_timeout = 60s
smtp_tls_CAfile = /etc/ssl/certs/sf_bundle.crt
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_milters = inet:localhost:8891
smtpd_recipient_limit = 16
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, reject_unknown_helo_hostname, permit_sasl_authenticated, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
smtpd_soft_error_limit = 3
smtpd_tls_cert_file = /etc/ssl/certs/domain.es.crt
smtpd_tls_key_file = /etc/ssl/private/domain.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
transport_maps = mysql:/etc/postfix/mysql_transport.cf
transport_retry_time = 30s
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
virtual_uid_maps = static:5000

1 Answer 1

3

How is postfix supposed to know if the email is non existent, or the if the remote server is just unavailable (as seems to be the case with your queue stuck mail). Usually, postfix will try and send the mail, but unless it gets back a definitive answer from the remote server, usually a 550 reply (450 range ones mean temporarily unavailable), postfix has no way of determining if the email exists, or if there is some other issue which might allow the email to be delivered successfully later.

2
  • Hi, you're right. I thought i was sending an email to the non existing domain gmai.om Excuses :D
    – peris
    Feb 12, 2014 at 12:51
  • No need to apologize, we've all made mistakes :D
    – NickW
    Feb 12, 2014 at 13:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .