2

I've recently closed an open-relay in my postfix configuration. Various web-checkers (e.g. http://www.mailradar.com/openrelay/) confirm that the relay is not open. However, despite clearing the queue several times using postsuper -d ALL, new messages still appear in queue, i.e. log entries look like

Sep 14 04:16:30 kozolec postfix/cleanup[28413]: 94E5C460797B: message-id=<20170914081630.94E5C460797B@kozolec.slosar.com> Sep 14 04:16:30 kozolec postfix/bounce[28415]: B1E4B4607978: sender non-delivery notification: 94E5C460797B Sep 14 04:16:30 kozolec postfix/qmgr[22082]: 94E5C460797B: from=<>, size=11760, nrcpt=1 (queue active) Sep 14 04:17:00 kozolec postfix/smtp[28414]: 94E5C460797B: to=<rhztmuppmjt@debbierector.com>, relay=none, delay=30, delays=0/0/30/0, dsn=4.4.1, status=deferred (connect to debbierector.com[69.64.147.33]:25: Connection timed out) Sep 14 04:26:57 kozolec postfix/qmgr[22082]: 94E5C460797B: from=<>, size=11760, nrcpt=1 (queue active) Sep 14 04:27:27 kozolec postfix/smtp[28463]: 94E5C460797B: to=<rhztmuppmjt@debbierector.com>, relay=none, delay=657, delays=627/0/30/0, dsn=4.4.1, status=deferred (connect to debbierector.com[69.64.147.33]:25: Connection timed out) ...

Where are these guys coming from? How do I get rid of them permanently? (I found these by grepping mail.log for message id from mailq)

This is how my redacted main.cf looks like (see also second comment):

```

# See /usr/share/postfix/main.cf.dist for a commented, more complete 
 version

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = kozolec.slosar.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

## virtual domains
virtual_alias_domains = [spaced separated list of domains]
virtual_alias_maps = hash:/etc/postfix/virtual

message_size_limit = 102400000

smtpd_recipient_restrictions = permit_mynetworks,    permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain

```

A. Slosar
  • 121
  • 2
  • Some more information about your setup would be useful. Best if your know what you changed from postfix defaults and could just add this to the question. And maybe some more information about why (which config mistake) the installation was an open relay and what you changed to close it. – allo Sep 14 '17 at 14:22
  • So, I think I used more or less default postfix config and added these two lines to close the open relay `smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sender_restrictions = reject_unknown_sender_domain` All this postfix is used for is to forward email to gmail. To do this I have lines like `virtual_alias_domains = [list of domains] virtual_alias_maps = hash:/etc/postfix/virtual` and `/etc/postfix/virtual` has a list of forwarders. The rest is default. Any ideas? – A. Slosar Sep 15 '17 at 01:34

0 Answers0