Maybe I misunderstand... but you have "mail-from regex" and "rcpt-to
regex", which covers all those use cases, no?
On Wed, Jan 08, 2025 at 08:05:23AM +0100, Philipp wrote:
Hi
The match rules for the sender and recipient are currently only match
the full mail addresses. So you can not match local part or domains in
them. There are some workarounds for this, but they depend on the
concrete table implementation.
It would be nice to have a general syntax for this. I would prefere
to have an optional parameter ``address-part'' for these conditions.
So the syntax would look something like this:
[from] mail-from [full|localpart|domain] sender|<sender>
[for] rcpt-to [full|localpart|domain] recipient|<recipient>
The biggest problem with this is that the "domain" keyword now is used
twice. But I don't know a better keyword. The "rcpt-to domain" part is
redundant, but I have added it for symetry.
To implement this I would extend the ruleset_match_smtp_mail_from()
and ruleset_match_smtp_rcpt_to().
What do you think about this idea?
Philipp