Hoekynl

Registered
Oct 3, 2017
3
0
1
Netherlands
cPanel Access Level
Reseller Owner
Hello Everyone,

I need to add a domain-wide email suffix filter.
I've got most part working, but the delivery part will not work.

The regex is:
To matches: #[email protected]

Deliver to:
[email protected]

I want this to be
Deliver to:
*part before #*@domain.tld

I have made a regex that removes the # and the part between the @ but it gives a error at delivery:
Code:
error in filter file: malformed address "#(.*?)(?:([email protected]).)*" in filter file: missing or malformed local part (expected word or "<")
I guess that the deliver to: part doesn't work with regex?
You can see it work here: regex101.com/r/zF0wB3/8
Regex101 - online regex editor and debugger
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
I just need to be able to "insert" a variable (taken from regex) to the "Deliver to" part in the filter, I hope this is possible.
That's not possible without root access to the server to setup a custom Exim system filter. Regular expressions are only supported in the filter rule itself with the "matches regex" and "does not match" operators when using cPanel to create a filter.

Thank you.
 

Hoekynl

Registered
Oct 3, 2017
3
0
1
Netherlands
cPanel Access Level
Reseller Owner
That's not possible without root access to the server to setup a custom Exim system filter. Regular expressions are only supported in the filter rule itself with the "matches regex" and "does not match" operators when using cPanel to create a filter.

Thank you.
Hello Michael,

What would the settings be? I work at the hosting company and will have to ask tech if it's possible for them to set it up for me.

Thanks :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463