Bounces handling autoreply

Hello, I receive many bounces which are caused by some autoreply, some are out-of-office reply and some are from user which changed mailbox. As theese bounces don’t contain a 55x error code line ( as long as I’m getting phplist behaviour right) they are not handled by bounce rules. I’d like to know if it’s possible to match a regexp against the message body or Subject. It would be super useful as most of theese messages come with recurring patterns in one of those two fields.
Thanks

@svalo phplist doesn’t have any bounce rules defined, you need to create them yourself. Matching the body of the email is exactly what a bounce rule does.
See https://www.phplist.org/manual/ch040_bounce-management.xhtml for how to create rules.

@duncanc thanks for you answer and sorry, I forgot to mention I already have some bounce rules defined. From the documentation I understood phplist matches the regexp against a line containing the smtp error (or better a line containing 55x), is this correct or does it match against the full body of the bounce?
I’m also a bit confused on how the regexp are interpreted.

  • Is having ( and ) mandatory in the regexp or only if you have multiple string to match like (black|white)?
  • Are spaces important inside the expression?
  • Does characters like . have to be escaped?
  • Should i use * at beginning and/or end of substring to match?

I read the doc but couldn’t manage to understand this.
Thank you again

@svalo You might want to look for a tutorial on regular expressions to understand how they match but you don’t need to use anything particularly complicated.

One use of ( and ) is to group alternatives. There are others but you probably won’t need them.

@duncanc Thanks again. I might sound as a total noob but I’m actually using regexp daily, my question was more regarding how phplist treats the regexp I provide :slight_smile: I think I’ll go and read the source and try figure out myself.
My questions came out also because I received notification about mail matching a rule that should’nt match and the other way round as well. I.e. a rule composed of a long,specific rule, matched a mail which didn’t contain that string and a rule really generic, matching a word, with an hight priority, didn’t match anything.

I’ll rewrite the regexps once I’ll undestand who phplist deals with them.
Thanks again for the support