Bounce Handling
Last updated
Last updated
When you send a message to a non-existing e-mail address, you will get an automatic reply saying that this e-mail address does not exist. This is what we call a bounce e-mail and this message will be automatically sent to the e-mail address you specified as “bounce address” in the AcyMailing configuration page. Depending on your server, this message may not be returned immediately and sometimes it can be sent up to one week after you sent your e-mail.
Bounce Example
AcyMailing Enterprise is able to handle such messages.
AcyMailing will connect to your mailbox, "read" your messages, determine which e-mail address bounced and automatically execute actions on this wrong receiver such as:
Delete the user
Block the user
Remove the subscription of the user
Unsubscribe the user
Subscribe the user to another list
Then AcyMailing can delete the message from your mailbox, save it on the AcyMailing user profile and/or forward it to another e-mail address so that it won't be processed twice.
That way, you will always keep a clean list of subscribers and the non-existing e-mail addresses will be removed from the system.
We highly recommend you to handle your bounce messages on a dedicated mailbox. That way, you won’t receive the replies from your subscribers on this same mailbox and you will safely let AcyMailing delete messages from your bounce mailbox. If you don't use a dedicated mailbox, please make sure you don't specify any action on the message for the final action.
Your bounce messages will be automatically sent to the address you specified as “bounce address” in the AcyMailing configuration page. This address won’t be visible by the receiver of your message and will only be used to handle bounce messages and automatic replies.
You should specify an e-mail address attached to one of your mailboxes so AcyMailing will be able to connect to it and handle the messages.
Let's now configure the bounce handling. First access the bounce configuration via the AcyMailing back-end menu.
Bounce Menu
Boune configuration
Bounce Address : This field indicates the same e-mail address you specified in the field "Bounce Address" on the "Mail Configuration" tab. It's just there as a reminder as you should configure the system to connect to this e-mail address.
Server : The e-mail server AcyMailing should connect to to handle messages.
Port : Port of your e-mail server. In most cases, it will be 110 for POP3, 143 for IMAP and 993 for IMAP using a secured connection.
Connection Method : Choose the method AcyMailing should use to connect to your mailbox.
Secure Method : You can select a secured method to connect to your e-mail server (if you use GMail, you should select "SSL")
Self-Signed Certificates : Do you want AcyMailing to auto-sign your certificates?
Username : Username used to connect to your e-mail account. In most cases, it will be the same as your bounce address.
Password : Password used to connect to your e-mail account.
Connection timeout (seconds) : Set the maximum number of seconds AcyMailing should try to connect to your e-mail server before stopping. 10 seconds is a good default value.
Maximum number of e-mails : Each time AcyMailing will connect to your mailbox, it will handle a series of e-mails. You can set the maximum number of e-mails AcyMailing will handle at the same time.
Enable the Automatic Bounce Handling : Once tested, you will want this system to run automatically so you can then turn On this option and let Acy do the job.
The default rules will handle most cases so you should not have to add any other rule.
If the regex matches the message, then AcyMailing will execute the corresponding actions (on the detected subscriber and on the e-mail) and then will handle the next message. If the regex does not match the e-mail, then AcyMailing will try to execute the next rule. It's useless to specify twice the same regex as AcyMailing will stop processing the e-mail as soon as it finds a rule which matches, the final action is only executed if none of the rules can be applied to the message.
Default rules
The first rule "Action Required" will be executed on messages which require an action from you. You will want this kind of message to be manually handled so you should forward them to a webmaster and handle them one by one. This rule will handle all "click here to confirm you're an human" automatic answers or "reply to this Newsletter and leave the subject intact".
The rule "Acknowledge of receipt - in subject" will delete notification message such as "I'm on vacation" or "thank you for your message" on the subject line. We just want to ignore these ones.
The rule "Feedback loop" will handle feedback loops complaints.
The rule "Feedback loop - in body" will handle the previous rule in the body.
The rule "Mailbox Full" will handle messages not delivered because the receiver had his mailbox full. We don't want to immediately block that user so by default AcyMailing will wait 3 soft bounces messages before executing an action on that subscriber.
The rule "Blocked by Google Groups" will handle bounces caused by Google groups blocking
The rule "Mailbox does not exist 1" will handle bounce messages indicating the mailbox could not be reached because it does not exist.
The rule "Message blocked by recipient filters" will handle messages which could not be delivered because your message has been blocked by a filter. By default Acy will forward you these messages so you can investigate the issue.
The rule "Mailbox does not exist 2" will handle bounce messages indicating the mailbox could not be reached because it does not exist.
The rule "Domain does not exist" will handle bounce messages indicating the mailbox could not be reached because the domain name does not exist.
The rule "Temporary failures" will handle other soft bounces such as mailbox temporary unavailable. By default AcyMailing will only execute an action on the subscriber if it receives at least 3 soft bounces from this user.
The rule "Failed permanently" will handle what we call "hard bounces". The mailbox or receiver domain does not exist so we want to immediately block the user to not contact him any more. This rule will handle messages we could not catch with the previous Mailbox does not exist and Domain does not exist rules.
The rule "Acknowledgement of receipt - in body" will delete notification message such as "thank you for contacting us..." if it's included in your bounce body. The first Acknowledge or receipt - in subject rule will only be detected based on the subject line compared to that one which checks the body.
The Final rule will be executed in case of the message didn't match any of the previous rules. By default we redirect this kind of message to your e-mail address so you may handle it manually or improve the rules so next time it will be handled automatically.
You can modify all our default rules, re-order them, add new ones, delete them... but you don't have to!
By default, users with wrong e-mail addresses will be blocked from AcyMailing but their subscription won't change. That's perfect so you can see who bounced (and unblock it if necessary) and you will still keep track of its old subscription even if he won't receive e-mails any more as he's blocked.
99% of bounce messages will be handled by our default rules... You don't have to modify them or create new ones!
You may want to modify a rule or create your own one.
To edit an existing rule, simply click on its name.
To create a new rule, click on the new button on the top right of the bounce handling screen.
New rule
Rule
Name : Name of the rule. It doesn't have any importance, the objective is simply to clearly identify the rule during the process so that you can understand it better.
Enabled : Only enabled rules will be loaded during the bounce handling.
Regex : Regular expression to identify if the current rule applies to the message or not. If the rule matches the message, the action on the subscriber and on the e-mail will be triggered otherwise the next rule will be considered. If the Regex matches the message, no more rule will be triggered.
Execute the regex on : The regex can be executed on the sender information, on the subject and / or on the body of the message.
Statistics : If the rule matches, should AcyMailing flag the message as a bounce message in the statistics?
Action on the user : If the regex matches the message, AcyMailing will try to identify the subscriber and an action will be applied to this subscriber.
The following actions on the subscriber will only be executed if AcyMailing received X bounce messages from this user. This option is very useful to handle "soft bounces". If you specify 0 or 1 then the action on the subscriber will be executed immediately. If you specify 2 or more, then Acy won't execute the subscriber action unless it already received X bounce messages from this user which have been considered as bounce message in the statistics (due to the option "statistics : Yes").
Delete the user subscription : The user will be removed from all your mailing lists but the user won't be deleted.
Unsubscribe the user : The user will be unsubscribed from the mailing lists he was subscribed to.
Subscribe the user : The user will be subscribed to the selected list.
Block the user : The user will be disabled but his subscription won't be changed. AcyMailing does not send e-mails to a blocked user.
Delete the user : The user will be deleted from AcyMailing. AcyMailing does never delete a Joomla User (his subscription will be deleted in AcyMailing but not the user itself if it's a registered one).
Action on the e-mail : If the regex matches the message, an action will be applied to the message itself.
Save message in database : The bounce message will be save in the user's history so you may see it on the user profile.
Forward the message : The bounce message will be forwarded to the specified e-mail address so that you can handle it manually.
Delete the message : The bounce message will be deleted from your mailbox. You should always delete the message from the mailbox unless you're testing the system.
You can either launch the bounce handling manually or use your cron task to automatically trigger it.
Go on your AcyMailing bounce configuration page and configure your bounce system as you want.
Then, test your configuration by clicking on the button "Bounce Handling", AcyMailing will try to connect to your mailbox and return the actual number of messages in your mailbox.
Test your connection
If you don't have error and you have some e-mails in your mailbox, then AcyMailing will display you a message to trigger the real bounce handling.
Bounce Process
Now you successfully tested the whole process, you can configure AcyMailing to do the job automatically using your cron task.
auto bounce
Turn on the option Enable the Automatic Bounce Handling and then configure the frequency used to connect to your mailbox. Connecting to your mailbox to handle messages can take some times. We don't recommend you to do it too often (once a day should be enough)
The process is simple:
1. AcyMailing sends a Newsletter to a wrong e-mail address
2. A bounce message is returned by the recipient server saying the e-mail address we try to reach does not exist
3. AcyMailing reads this bounce message in your mailbox and applies an action on your subscriber (block him, unsubscribe him, delete him...)
You should test each step to make sure it's working as it should and identifies the problem if there is one:
1. Via AcyMailing, send a test Newsletter to a non-existing e-mail address (via the Newsletter-preview screen)
2. You should receive a bounce message on your bounce mailbox... Did you? If not, please check the bounce e-mail address used.
3. Once you see that bounce message in your bounce mailbox, Acy will be able to handle it. Go on the AcyMailing bounce handling and click on the button "bounce handling" to make sure it does.
Server: imap.1and1.com (or imap.1and1.fr)
Port: 143
Connection Method: IMAP
Secure Method: - - -
Self-signed certificates: No
Your e-mail account/password
If you want to use your GMail account to handle the bounces, you should first enable the IMAP connection on your GMail account settings and then configure AcyMailing:
Server: imap.gmail.com (if it does not work, you should try with imap.googlemail.com)
Port: 993
Connection Method: IMAP
Secure Method: SSL
Self-signed certificates: Yes
Your GMail username/password
If you have an authentication issue with GMail whereas you're absolutely 100% sure about your username and password, please:
Make sure you enabled the IMAP connection on your GMail account
Try to unlock your GMail account, sometimes GMail blocks the application: http://www.google.com/accounts/DisplayUnlockCaptcha
Gmail apparently added a security for the Imap connection so if you cannot manage to set the connection up, enable the option "Authorize less secured applications" in the Gmail account's parameters, section "Connection and security".
Server: pop.secureserver.net
Port: 110
Connection Method: POP3 (without imap extension)
Secure Method: - - -
Self-signed certificates: No
Your e-mail account/password
Server: ns0.ovh.net
Port: 110
Connection Method: POP3
Secure Method: - - -
Self-signed certificates: No
Your e-mail account/password
Server: outlook.office365.com
Port: 995
Connection Method: POP3
Secure Method: SSL
Self-signed certificates: Yes
Your e-mail account/password
Imap error
AcyMailing uses special php functions to connect to your mailbox, it requires the PHP Imap extension to be installed on your server.
Even if you use the POP3 connection, AcyMailing will need this PHP extension which handles all the communication with your mail server.
Please enable this extension on your php.ini file or contact your hosting company to enable this extension on your website.
If you cannot enable this extension, you can use the Connection method : POP3 without IMAP extension, this method has been only developed for users not being able to enable the IMAP PHP extension on their server.
Self Signed certificate
Your mail server apparently need you to sign a certificate to enable you the connection to your mailbox.
You should turn on the option "Self-signed Certificates" and give it a new try.
Error esmtp exim
This is a typical error when your website can not connect to your mail server.
This is not a problem of authentication but really a problem of mail server address or port.
In our screen-shot, we were using the wrong port. The default port are:
110 for POP3
143 for IMAP
993 for IMAP when using a secured connection
invalid remote specification
The error message "Invalid remote specification" may appear if your php_imap module has not been compiled with ssl support. You will need to ask your web host to recompile php and add the --with-imap-ssl option to the configure command.
The rules won't consider this kind of message as a message indicating that the mailbox does not exist. So no action will be applied to the subscriber and this message will be simply deleted or forwarded to another e-mail address based on the rules configuration.
Sometimes there is a delay and sometimes you will receive the bounce immediately.
When you send a message to a non-existing domain name : john@fmqlksjdfmlqksdfj.com, your own mail server won't be able to send the message and so you will immediately get a bounce e-mail saying this address does not exist. Depending on your mail server configuration, even this bounce might be delayed if your mail server keeps your message in a queue to try to re-send it later.
But when you send a message to a non-existing user account (but an existing domain name): mfqlkjsdfmlqkjsdmflqjsldf@gmail.com Then your own mail server is able to deliver your message. And GMail will read your message, try to deliver it to the right person, detect that the account does not exist and then return you a bounce message. Depending on the configuration of the receiver's domain, this action takes some time as some servers double check (sometimes during more than a day) that they really can not deliver your e-mail.
On our own website, when we send Newsletters to all our users, it takes 2 days to handle all the bounces but sometimes we even still receive some of them a week later.
AcyMailing will use the bounce address you specified in your AcyMailing configuration page.
Nevertheless some servers do not allow AcyMailing to set it and another e-mail address will be used so your bounce messages will be sent to this other e-mail address.
To check it, you can do a spam test or test your message on http://www.mail-tester.com
Bounce address
Some mail servers will force this bounce address to another one if you use the PHP Mail Function or an external delivery service. This can be solved by using the SMTP method instead of the PHP Mail Function or by making sure your bounce messages are redirected to your own bounce e-mail address if you use an external delivery service.
On the statistics page, you will see two columns: failed and bounced.
The two columns indicate two different information.
"Failed" is the number of e-mails AcyMailing or your server refused to send whereas "Bounced" is the number of e-mails your server sent but then a bounce message has been generated and sent back to your mailbox.
If you're using our latest version, you can see a button "re-install rules" at the top of the bounce page.
Simply click on it, Acy will delete all your rules and reinstall the default ones.
You have 0% bounce in your statistics and you find it odd?
Here is what you should do:
1. Send a spam test via the preview screen and make sure the bounce e-mail address returned by the spam test is the right one! (the one you entered in the Acy configuration page as "bounce address")
If it's not the right one, then two options:
You use an external delivery service and they handle your bounce messages... you should make sure that this third party also redirects bounce messages to your own mailbox so you can handle them as well
Your host changes your bounce address into a weird one... Please contact your hosting company to know how you can make sure that messages are sent using the bounce e-mail address you specified!
2. Go on the AcyMailing bounce handling system and make sure that you try to connect to the right mailbox. If you have a connection issue then try to fix it. (see above)
3. Bounce messages will be redirected to your mailbox and Acy will handle them only if:
Messages are still in the mailbox!
If you use Outlook to check that mailbox as well, messages will be downloaded and won't stay on your online mailbox so Acy will not be able to handle bounces at all.
The bounce messages should be in your main folder! Sometimes your mail client will flag bounce messages as spam... in which case Acy won't be able to handle them any more. Please make sure your messages stay in your main folder and create some rules in your mail client if needed to assure you they are not automatically considered as spam
SendGrid There is an option in SendGrid to redirect the bounce message to another e-mail address so Acy can still handle your bounce messages. Connect to your SendGrid account, Email Reports > Settings > Forward bounces This option enables you to forward bounces to a specific email address. Please check the box below and enter the forwarding email address which should be your AcyMailing bounce address.
ElasticEmail You can specify a forward e-mail address on your ElasticEmail account under the menu "SETTINGS" -> "Sending" so bounce messages are redirected to another e-mail address.