procmail
[Top] [All Lists]

flexible filtering

1999-10-21 16:24:27
Here's background on my situation:

1. I have a vanity domain name, crossroads.net.

2. This is similar to a lot of other domain names out there, and a lot of people erroneously give out their e-mail address as "xyz(_at_)crossroads(_dot_)net".

3. I have three POP boxes, and I use a few aliases for each.

What I would like to do is this (using pseudo-code)

1. Define lists of aliases for each account, for example

account1_aliases = "adam, adamrice, joestalin, ssss"
account2_aliases = "admin, postmaster"
...

2. If an incoming piece of mail matches any alias on alias list 1, , pass it along account 1, etc. If it matches multiple on alias lists, pass it along to each (in case something is addressed to 2 accounts, which does happen). Ideally, I could do a partial match, so if the apparent addressee contains a substring match, that would be counted as a match. So, for example, if someone sent e-mail to "adamjrice(_at_)crossroads(_dot_)net", that would match on "adam" and be sent to account 1. This could result in some false positives, but I prefer that to false negatives.

3. If something doesn't match any of these alias lists *and* doesn't look like a spam, reply with a note saying (in so many words) "You've got the domain wrong. It might be one of the following... Your original note is attached at the bottom."

4. If something does look like spam and does not match any of my aliases, just trash it.

FWIW, it seems that the most reliable header line for determining the intended recipient is "X-Rcpt-To:"

I can figure most of the required recipes for this, but some aspects of it confuse me.

Many thanks in advance,

   Adam Rice | adamrice(_at_)crossroads(_dot_)net
Austin TX USA | http://www.crossroads.net/

<Prev in Thread] Current Thread [Next in Thread>
  • flexible filtering, Adam Rice <=