Quantcast
Channel: iRedMail
Viewing all articles
Browse latest Browse all 14171

Sieve rule for forwarded emails only

$
0
0

Hello again!

I have a situation and want to create a sieve rule to fix the problem. But I'm having problems how to create this rule.

Scenario:
- email from spammer@spammer.com to user@mydomain.com
- Amavis marks the message as spam (Subject: [SPAM] ...)
- user@mydomain.com set to FORWARD his e-mails to otheraccount@gmail.com
- Amavis process email from spammer@spammer.com to otheraccount@gmail.com

I want to block forwards to external servers if message was marked as spam.

My idea is create a sieve rule like this: "if spamscore>5 and recipient domain is not in "my domain list" and destination domain is not in "my domain list" -- discard) (I think that's the way to identify a real forward).

Detail: user needs to receive the spam locally (.Junk folder) but won't receive the message in his external account.

This way I'll prevent Gmail blocks me as spammer.

Any ideias how to begin?

Thank you!!


Viewing all articles
Browse latest Browse all 14171