OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: nzkiwi68 on June 24, 2020, 12:26:05 AM

Title: Postfix Sender Canonical Rewriting appears broken
Post by: nzkiwi68 on June 24, 2020, 12:26:05 AM
I get this logged;
postfix/cleanup[25132]: warning: regexp map /usr/local/etc/postfix/sendercanonical, line 1: ignoring unrecognized request

I'm trying to use Sender Canonical Rewriting because a basic alarm panel that is sending email, set the FROM email address as the same as the sending TO email address and you can't change it.

So, I have a simple setting in Sender Canonical Rewriting.

123456789@sms.gateway.com          user@mydomain.com

It just doesn't seem to work.

Any ideas?
Title: Re: Postfix Sender Canonical Rewriting appears broken
Post by: nzkiwi68 on June 24, 2020, 12:36:49 AM
I just tried .* as the pattern match and I get this in the postfix log

postfix/cleanup[17182]: warning: regexp map /usr/local/etc/postfix/sendercanonical, line 1: unknown regexp option "c": skipping this rule



Title: Re: Postfix Sender Canonical Rewriting appears broken
Post by: mimugmail on June 24, 2020, 09:05:23 PM
Can you recheck with this:
https://github.com/opnsense/plugins/pull/1406#issuecomment-518566685
Title: Re: Postfix Sender Canonical Rewriting appears broken
Post by: nzkiwi68 on June 24, 2020, 11:14:39 PM
Thanks. That's good, it now works.
In that case, can I recommend the help text is updated;

Services > Postfix > Sender Canonical Rewriting > Rewrite From

Altered to;

Pattern matching (inside the quotes) e.g. match all "/.+/"  match a domain "/@domain\.com/i" match a user "/username/i"