Bounce rule expression window

I have a hopefully simple request/suggestion regarding the creation of bounce rules. (and another slightly more complicated)

I’ve been testing 3.2.2 then upgraded to 3.2.3 for a few months, and started using it for sending this year :wink:

Now I have to deal with my bounces and I notice a few things:

I have 3 bounce rules

  1. Seen as SPAM
  2. Mailbox Full
  3. User doesn’t exist
    [ 4) Out of office - would be nice ]

these set-up with pipe “|” separated phrases for each scenario (as I understood from here )

Trouble is the window for the regex is 1 line and I soon lose track of which rules I’ve covered without scrolling back and forth, meanwhile there is a nice textarea for the memo.

Request 1:
Can you please make the textarea for the regex larger :wink:

Request 2:
in ref to this post Out of Office bounce rule
would it be possible to add a bounce rule to forward the bounce to a specific address (eg listmaster?) for out of office type replies.

Otherwise I’m finding this a nice piece of software thanks to all you developers :smiley:


Hi, can you make a feature request - details on under Developers > bug reporting


Hi Anna,
thanks for your response, do you mean creating a mantis account etc. in order to make a feature request ?
If that is what you mean, once done (yet another account to manage :wink: ) would it not be better to post ALL my requests/questions/comments directly there rather than here ?

I thought that this was where things got elevated from if warranted, (after due discussion) I’m no regex fundi but I see I have bumped into a character limit on the window in question, is this an HTML limitation or owing to an optimal limit on regular expressions, in which case are many single rules more efficient ??? which opens up more questions etc.

I DO realise these are technical questions (kinda ;)), but that is why I posted in the development section of this forum, am I in the wrong place ? Are these the sort of things I should be asking on mantis ?


I don’t really know the answer to your question, but I would suggest that you say that you would find it helpful if it were bigger and see what people say :smile:

If you are really unsure you could ask on the developers mailing list


For what it’s worth, I’d probably put the feature requests on Mantis (since the features are a request, and that is where the ‘master list’ of requested features lives).

It’s good that you asked your regex question here. If it doesn’t get answered to your satisfaction, you would then want to put it on Mantis, and let the developers figure out if it’s a bug or a new feature.

Also, since this is open source, you can also dig into the code to see if you can fix it, or suggest a fix. Then post your findings on Mantis so it gets added to the released code, or even better, use github to submit the change for incorporation. You will have to know how github, git, and cloning works to do this… as well as how to code. (not a huge barrier???)

Lastly, as a workaround, when I encounter situations like this, I modify the regex in a regular text editor (texmate, or notepad++, etc). Then copy and paste into phpList rules page. It’s not perfect, but it’s better than scrolling around in the window that’s too small.

Save your regex command to your hard drive, so it’s easy to recall and edit.

You might want to look at ‘regex buddy’, it’s great for generating and testing regular expressions.

For what it’s worth…
And any update will probably undo this…

You can increase the size of the regex field a little if you make a simple edit to admin/bouncerule.php
It should be line 31.
Replace this:

printf('<tr><td>%s</td><td><input type=text name="regex" size=30 value="%s"></td></tr>',

With this:

printf('<tr><td colspan="2">%s</td></tr><tr><td colspan="2"><input type=text name="regex" size=60 value="%s"></td></tr>',

Hi Chris, if you want you could make a pull request on github to change the core code and fix the bug :smile:


Hey Chris and Dan,
Thanks for this
FWIW I have submitted this to mantis

And it seems as if it will be included in the next patch, and then hopefully next release :wink:

I’m still unsure as to the length of the expression allowed, if there is a best practice amount of “|” statements or length of each for efficiency, but I guess I can just google that.

Thanks again.

1 Like

I understand your desire to create one regex for all, but alternatively, you might have to just create 2 shorter bounce rules or shorten the phrases you’re checking against.

I don’t see how having only 4 bounce rules can handle it all. I guess it can be done.
I have about 40 so I can automatically handle a variety of circumstances.

Yep, ATM I have

1 rule for Mailbox Full (delete bounce)
1 rule for SPAM filtered (delete bounce, blacklist subscriber)
3 rules for address no longer valid (delete bounce, blacklist email address)

(I’m also a little unclear on what the difference is between a subscriber and an email address but we’ll leave that for now as it’s a topic already addressed elsewhere on this forum and mantis.)

I guess I’m a bit of a forgetful control freak :wink: but when check a subscribers history and it reports

Subscriber auto blacklisted by bounce rule X

I need to flick back and forth to see what rule X refers to ie. what kind of bounce it was from my categories above.
This is easy ATM but as more edge cases get added I can see it won’t scale well, though it sure beats having to deal with each bounce by hand as I used to before moving to phplist :smile:

I have about 40 so I can automatically handle a variety of circumstances

As a matter of interest (how) do you categories your rules ?
This may help my understanding as I am still a newbie here.


I’m a speed freak.
I sort my rules in an order of magnitude from high to low according to which gets the most matches. Consider that once there is a hit, the rules stop processing.