1

Topic: Little help for forwarding needed

Does anyone know how to make a server rule (I think in amavis?) to move all messages coming from a domain to a specific address?

Example:
all mails coming from @example.com (to any recipient or domain on the server) have to be moved to account@domain.com

Of course the account@domain.com is an account configured on the server.
The message must *NOT* be received by the original recipient.

Running on iRedmail 0.6.0 on Ubuntu 9.10 with iRedAdminPro 1.6.1

Thanks a lot in advance

Alberto

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Little help for forwarding needed

Try Postfix header_checks(5).

*) In Postfix config file main.cf:

header_checks = pcre:/etc/postfix/header_checks.pcre

*) Content of /etc/postfix/header_checks.pcre:

/^From: .*\<.*@example\.com\>.*/ REDIRECT account@domain.com

*) Verify it with the real mail header. for example:

# postmap -q 'From: <test@example.com>' pcre:/etc/postfix/header_checks.pcre 
REDIRECT account@domain.com

*) Restart Postfix.

WARNING: I didn't test it, so not sure whether it will work as expected.

3

Re: Little help for forwarding needed

ZhangHuangbin wrote:

WARNING: I didn't test it, so not sure whether it will work as expected.

Hello Zhang,

It works like a charm! Many thanks wink

Oh, a little off topic, but don't forget if you can, to give me the list of files and tables for this topic :
http://www.iredmail.org/forum/topic2412 … yment.html
(Read the last lines of my last post)

Bye and thx again

Alberto

4

Re: Little help for forwarding needed

Albux wrote:

It works like a charm! Many thanks wink

Glad to hear that. smile

Albux wrote:

Oh, a little off topic, but don't forget if you can, to give me the list of files and tables for this topic :
http://www.iredmail.org/forum/topic2412 … yment.html
(Read the last lines of my last post)

You can try to dig with iRedMail-x.y.z/conf/*. I'm sorry that i don't have a clear list. sad