procmail
[Top] [All Lists]

Re: Trying to bounce mail after-the-fact with procmail/formail

2001-10-26 21:43:39

Rich,

You've already gotten the virtusertable tricks, but YOU CAN process a
mail folder after the fact, and apply procmail rules to it.  For details
on bouncing, look at the pertinent bits of Catherine Hampton's fabulous
package at http://www.spambouncer.org/, or my modified version of the
pertinent code at http://www.it.ca/software/procmail-bounce (a context
for which is included in http://www.it.ca/software/procmail-spamtrap).

In order to run procmail on a file containing messages ... read Era's
mini-FAQ.  Your answer is at 
http://www.ling.helsinki.fi/users/reriksso/procmail/mini-faq.html#split

Enjoy.


On Fri, Oct 26, 2001 at 11:18:28AM -0400, Rich Kulawiec wrote:
From: Rich Kulawiec <rsk(_at_)magpage(_dot_)com>
Subject: Trying to bounce mail after-the-fact with procmail/formail
To: procmail-users(_at_)procmail(_dot_)org
Date: Fri, 26 Oct 2001 11:18:28 -0400

Here's the situation:

I have put a wildcard in the (sendmail) virtusertable of a domain
that I run, e.g.

      @example.com rsk

which will cause all mail sent to addresses at example.com that don't
match any other virtusertable or aliases entry to be forwarded to me.

This is good because every now and then someone makes a slight misspelling
of a destination address, and I can forward the message on its way,
inform the sender of the need to correct it in the future, and that's that.

This is bad because the domain in question is one character different
from two or three quasi-popular domains, and so I'm getting a fair amount
of mail that really isn't supposed to be here at all.  And I'm not at all
sure which of the other domains should really be getting it.

What I have:

      A standard Unix-style mailbox folder (e.g. messages separated
      by blank lines, all begin with "From ", etc.) containing about
      a hundred of these mis-directed messages.

What I'd like to do with it:

      For each message in that folder, generate a bounce a la the type
      that sendmail would have generated had it discovered that the
      destination address did not exist.  (Which is what it would have
      done if I had not put the virtusertable wildcard in place.)

In other words, I'd like things to appear to the senders as if these
addresses aren't valid (because that is really the case) because otherwise
they will probably continue to use them and never discover their error(s).

I've been searching through sendmail and procmail archives, contributed
software, etc., but have yet to find something that will handle this.
It's entirely possible that I've looked right at it and missed it, though
I've tried to look carefully.  Can anyone assist?

Thanks,
---Rsk
Rich Kulawiec
rsk(_at_)magpage(_dot_)com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail