procmail
[Top] [All Lists]

Re: [pro] procmail bounce handling

2008-02-12 14:55:43
Yes, I actually already have everything you describe below. Everything
is coming to a single user, and I am aware that I can't count on the
headers to be there every time. What I'm asking is, in messages that I
can verify (by looking at the mbox post procmail) include my X-todo_id:
header, I can't seem to get that header out via procmail.

I use mailman also, but it is not a good fit for this project.

Thanks,

Matthew


On Tue, 2008-02-12 at 14:39 -0500, Charles Gregory wrote:
Very often, if a mail is 'bounced' rather than 'rejected', you don't have
all your original headers to play with. Ever noticed that mail from yahoo
groups comes with an evelope address that is formatted as
'bounce+your+address+listname(_at_)yahoo(_dot_)(_dot_)(_dot_)(_dot_)'? It is 
so that a recipe like
yours can extract the necessary information from the recipient address
passed to it from the MTA. (which is NOT necessarily the TO address it
places in the visible headers!). The trick with this is that you need to
setup a virtual/alias table in your MTA to recognize all 'bounce*'
addresses as valid and then pass them on to a single user account that
will then have a procmailrc to parse the address.....

Or so the theory goes. Never actually done this. I just use 'mailman'. :)

- Charles

On Tue, 12 Feb 2008, Matthew Boeckman wrote:
I have what seems to be a simple request that is causing me great deals
of problems. If what I am trying to accomplish in procmail/formail is
better handled differently, please tell me so.

I'm creating a dumb bounce handler that will log to a file the original
recipient of a bounce, the date we received it, the Diagnostic-Code and
a special X header that we add to outgoing newsletters. That output then
gets processed by our db team and users are removed. 

What I have so far is a procmailrc with:

FROM=`formail -xFrom:`
DATE=`formail -xDate:`
REASON=`formail -xDiagnostic-Code:`
TODO=`formail -xX-todo_id:`
TO=`formail -xTo:`
:0w:
|/home/www/bounce-thing "$FROM" "$DATE" "$REASON" "$TODO" "$TO"

bounce-thing is a shell script that takes those variables and echo's
them out to my file. 

The problem I have is that I cannot seem to extract either X-todo_id:
(our x header) or Diagnostic-Code from any of the messages. Is there
something really obvious I'm missing about getting those headers out
with formail? Any thoughts are greatly appreciated, I've read through
the faq, google groups, and a handful of other resources and can't seem
to find an answer.

Thanks in advance!

Matthew
-- 
Matthew Boeckman
Sr. Systems Administrator
303-963-7889
mboeckman(_at_)servicemagic(_dot_)com

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
-- 
Matthew Boeckman
Sr. Systems Administrator
303-963-7889
mboeckman(_at_)servicemagic(_dot_)com

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>