BounceHandler rules override with auto reply

d3m0n

Member
Hello Community,

hope everyone is safe

I know that auto replies are considered as soft bounce and i am looking for a solution how to exclude them from the bounce list and make them drop into the mailbox

I have created a copy of the rules.php file
cp apps/common/vendors/BounceHandler/rules.php apps/common/vendors/BounceHandler/rules-custom-override.php

and then removed the line
'/^AutoReply message from /i',
from rules-custom-override.php

then I have tested sending a campaign from email test1@domain to another test2@domain where I have autoresponder setup and i didn't get any autoresponder to back to my test1@domain or to bounce@domain

when I tested sending directly from Roundcube webmail from test1@domain to test2@domain the autoresponder dropped instantly
what have i done wrong, how to make auto replies pass ?

thx for any advices
 
Maybe there's another rule that matches your emails?
There is a test.php file in that folder, which you can modify and add your email content in it, then run it and it will run all the rules against it and will tell you which rule matched, so you can then comment those out ;)
 
Hello @twisted1919 ,

thank you for your response, do you have any manual on how to work with this file?

a) what kind of content shall i put into the file?
b) where exactly should it put it ? into "$matched= [];"
c) how to run it ? with a /usr/bin/php -q or there is a web interface for it?

thanks in advance
 
do you have any manual on how to work with this file?
Nah, this is only used by our QA process to make sure things are okay, is not meant for public usage.

where exactly should it put it ?
PHP:
$rules  = require dirname(__FILE__) . '/rules.php';
$string = "";
$string = BounceHandler::stripSpecialChars($string);
Assign your email content to the $string variable, so:
PHP:
$rules  = require dirname(__FILE__) . '/rules.php';
$string = " the full source of the email ";
$string = BounceHandler::stripSpecialChars($string);

how to run it ? with a /usr/bin/php -q
Bash:
/usr/bin/php rules.test.php
And make sure you delete line 6 in the script, which says:
PHP:
exit('');
 
Hello @twisted1919 ,

i can confirm i am officially suck.

here is what i have done to conduct the test.
i have created a fresh new email on gmail , and in the advanced setting i scrolled to Vacation responder "on"
so now when i send email from any mailbox i get a response with "autoresponder message"

now i have created a campaign on mailwizz and i have sent to that newly created mailbox
as a result I nothing dropped to the mailbox that i have sent from AND there is no "soft hard or internal bounce"

now if i send any email to that new mailbox again , i still get a autorespond with " out of office"
next i have copied entire message and i have placed it into the $string = "";
commended out exit('');
and run the test with /usr/bin/php rules.test.php

as a result i get
Matched rules:
Array
()

Nothing.


the question is: where is the autoresponder email? it's not bounced and it's not returning.

Please advise what steps could i take to debug , what am i doing wrong?

Thank you in advance , sorry for filling up the space with this unuseful information , but this functionality is vital for me.
 
Hello @twisted1919 ,

i can confirm i am officially suck.

here is what i have done to conduct the test.
i have created a fresh new email on gmail , and in the advanced setting i scrolled to Vacation responder "on"
so now when i send email from any mailbox i get a response with "autoresponder message"

now i have created a campaign on mailwizz and i have sent to that newly created mailbox
as a result I nothing dropped to the mailbox that i have sent from AND there is no "soft hard or internal bounce"

now if i send any email to that new mailbox again , i still get a autorespond with " out of office"
next i have copied entire message and i have placed it into the $string = "";
commended out exit('');
and run the test with /usr/bin/php rules.test.php

as a result i get
Matched rules:
Array
()

Nothing.


the question is: where is the autoresponder email? it's not bounced and it's not returning.

Please advise what steps could i take to debug , what am i doing wrong?

Thank you in advance , sorry for filling up the space with this unuseful information , but this functionality is vital for me.
I have managed to get to the source of the problem working on the extension to unset some headers.
Can i unset the headers for a specific campaign only ?

Code:
($header['name'] == 'Precedence') {
            unset($emailParams['headers'][$index]);

With an extension or it only can only be done system-wide?
thx
 
Back
Top