Bounce back invalid domains immediately in PowerMTA


in Bulk Email, PowerMTA Support

PowerMTA is no doubt great MTA but it requires lots of configuration to make it work intelligently. If your pmta license have Out bound connections limit than you have to configure it smartly, to free up connections and increase emails per minute/hour.

Most of the time, these connections are used by invalid domains e.g,, and on other hand your bounce-after for global domains is too long e.g bounce-after 4d 12hr (by default)

How PowerMTA works?

PowerMTA tries to resolve Domain to IP (If it fails, it doesn’t make tcp connection, through DnsQueryFailed error), then it tries to make tcp connection and wait for SMTP greeting. (It keeps trying until smtp-greeting-timeout value (default 5m) reaches.After5 minutes, connection is killed and this process is repeated until bounce-after (in your global domain configuration) is reached.

And there are dozens of typo error domains of yahoo/gmail/hotmail

One more technique is to bounce back all domains that doesn’t have MX record. This would help you to reduce your PMTA Queue.

Step-1 : General PowerMTA configuration tweaking

Edit: /etc/pmta/config

<domain *>
smtp-greeting-timeout 1m
bounce-upon-no-mx yes

PowerMTA suggests to set it to 5 minute(If your network is not reliable) I disagree. 60 seconds are more than enough for remote MTA to response.

Step-2 : Bounce back invalid domains immediately

dummy-smtp-port – is SMTP black-hole, is powermta feature that use to listen for dummy SMTP connections. This new configuration would require to restart your PowerMTA(service pmta restart) You can refer to official document and find which configuration requires reload and restart.

dummy-smtp-port 2525
<smtp-pattern-list dummysmtp>
reply // bounce-queue

domain-macro invaliddomainslist,,
<domain $invaliddomainslist>
route [your-lan-ip]:2525
smtp-pattern-list dummysmtp
bounce-after 1m

service pmta restart

How to identify these messages in accounting log file?

These are marked as category 'other' with 'failed,5.0.0 (undefined status),x-pmta;bounce-queue'

How to mark them in bad-domain category?

You will need to create bounce-category-patterns to handle this.

/failed\,5\.0\.0 \(undefined status\)\,x\-pmta\;bounce\-queue/ bad-domain

Now, if you process accounting log file, you would see all these domains under bad-domain category instead Other.

Related Posts:

Previous post:

Next post: