Exim only accept mail if rule match

tomtom901

Verified User
Joined
Feb 14, 2010
Messages
295
Location
Meerlo, The Netherlands
Hi all,

I've got a question: For one user, I would only like to accept mail if it matches a rule (subject contains).

Is this possible? I couln't quite find it myself.
 
Exim doesn't know the contents of the email; the subject is actually part of the email contents. You can use something like a custom rule for SpamAssassin, or you could create your own system for parsing the entire email and creating a flag of some sort when returning it to exim to do the rest of the routing, but you'd need to keep the connections open for a while so you could still refuse to accept the email if you don't like the subject.

You might be temted to return the email if the Subject doesn't match, but don't do it; you'll end up sending back a lot of mail to forged senders and get on blocklists.

Jeff
 
Back
Top