header_checks in main.cf don't work

euronews

New Member
Mar 20, 2022
1
0
1
54
Hello,

I'm new to PMG.
I want to setup a mail forward to a third party server only a few addresses.

Usually, in /etc/postfix/main.cf I add:
header_checks = regexp:/etc/postfix/header_checks

Create this file and put inside like this:
/^To: (.*)@example1.com/ REDIRECT userJ@msn.com
/^To: (.*)user2@example2.com/ REDIRECT user2@gmail.com
/^To: (.*)user3@example2.com/ REDIRECT user3@hotmail.com

After this, just restart the postfix and the magic worked.

In PMG this solution it didn't worked. Please let me know how to implement this.


Many thanks in advance + best regards!
Horacio
 
Last edited: