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 hotmaail.com, yahooo.com, gmail.cm 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 </domain>
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 </smtp-pattern-list> domain-macro invaliddomainslist yahooo.com, gmail.cm, hotmaail.com <domain $invaliddomainslist> route [your-lan-ip]:2525 smtp-pattern-list dummysmtp bounce-after 1m </domain>
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.
<bounce-category-patterns> /failed\,5\.0\.0 \(undefined status\)\,x\-pmta\;bounce\-queue/ bad-domain </bounce-category-patterns>
Now, if you process accounting log file, you would see all these domains under bad-domain category instead Other.
11 replies on “Bounce back invalid domains immediately in PowerMTA”
Hey,
You are the best.Recently, I looked around about this topic.I’m still using pmta v3.5. I hope this really works on my config.
Thanks again.
Last rule bounce-category-pattern rule doesn’t work on pmta v3.5
If you use the pattern like this:
/failed\,5\.0\.0 \(undefined status\)\,x\-pmta\;bounce\-queue/ bad-domain
It will work on pmta v.35.
Missed forward slashes.
corrected now.
Thank you for reporting.
Hi
we are facing 421″hostname ” out of connection slot error in pmta…
Any one can help in this?
Hello
If you could provide a little more detail?
Hi,
i am new for PMTA, For this i read PMTA-UsersGuide-4.0 but could not help myself,
i ve problem in pattern list as like backoff mode & skip-mx
Backoff ?????
Any one can help in this?
contact me via
syed.alam(@)hackersgarage.com
Hello
Is there a way to send the bounce back to the bounce address?
For example. We use intersperse on a remote server.
Email gets relayed through pmta on remote server.
Email bounces due to wrong domain, it gets logged in Acc files but no message is send back to bounce address in interspire.
Any ideas?
Hi Hans
once you applied above configuration you will see those invalid domain under bad-domains category.
You can dump pmta logs into a database and then through a script mark all those email address that have delivery category bad-domains as bad emails. this way it will get filtered.
you contact me via http://www.hackersgarage.com/about-syed-alam as well.
Hi,
I have found a way to send bounces back to Interspire email marketer from PowerMTA.
All you need to do is add this to your pmta config.
Lets say client A uses the bounce address client@abc.com
You would add this to the config:
deliver-local-dsn YES
For Client B that uses client@xyz.com
You would add this to the config:
deliver-local-dsn YES
Once the email is bounced in PMTA 5.x.x it will send the Notification back to the bounce email interspire is using.
I hope this helps someone else, as I have been struggling to get this working đŸ™‚
hey hi
i have problem with my bounce setting i have check this setting on my pmta config file but where i put this setting on which field. i new on this so please help me as soon as possible
thanks