I'll just continue this thread by myself, but please feel free to jump in.
:)
I've got what I think is the right solution, but an implementation detail
is standing in the way. Current process (again, qmail+procmail+tmda
0.67):
1. message goes to procmail via .qmail file
| preline /usr/local/bin/procmail -p
2. some messages filtered out/sorted by procmail recipes
3. what's left is passed to TMDA:
:0
| /usr/local/bin/tmda-filter
4. TMDA does its thing
5. Messages that are confirmed go to a second procmail run
DELIVERY="| /usr/local/bin/procmail ~/.procmailrc_tmda"
Step 5 is failing miserably. I've tried a number of variations of the
above DELIVERY statement, including:
-inserting "preline" before calling procmail
-using procmail -p
-including MAIL_TRANSFER_AGENT="postfix" (otherwise not defined)
In all cases, I either get
IOError: failure delivering message to command "/usr/local/bin/procmail
~/.procmailrc_tmda" (command "/usr/local/bin/procmail ~/.procmailrc_tmda"
exited 1 ())
or something similar. I don't think that procmail (the second time) is
running at all because it's set to log to a file and it doesn't even write
log messages consistent with being fired up.
I tried manually piping a message to "/usr/local/bin/procmail
~/.procmailrc_tmda" and it works fine. So somehow, tmda isn't able to
pass the message off to procmail.
I need fresh eyes - help! :)
Chris
On Sun, 5 Jan 2003, Chris Hardie wrote:
>
> I think I'm making progress on answering my own question. This post:
>
> http://mla.libertine.org/tmda-users/200203/msg00125.html
>
> seems to have relevant answers. But I'm wondering why it didn't show up
> in the maling list archive search engine, which in fact seems to return 0
> hits for the keyword "procmail". I'm sure I'm missing something here.
>
> Chris
>
>
> On Sat, 4 Jan 2003, Chris Hardie wrote:
>
> >
> > Greetings. I have a question that *seems* like it should be intuitive
> > enough to answer, but I'm having trouble wrapping my brain around it.
> > I'm using qmail, procmail, and tmda 0.67.
> >
> > My .qmail file pipes mail to 'procmail -p'. I'd like to call tmda-filter
> > from procmailrc. If tmda-filter decides to do anything with the message
> > other than approve it (e.g. send a confirmation, drop, bounce, etc), then
> > procmail shouldn't have any more work to do in that run.
> >
> > However, if tmda-filter approves the message (e.g. it passes the filter),
> > I'd like procmail to keep working with it.
> >
> > The procmail file I'm hoping for looks something like this (in
> > pseudo-recipe terms):
> >
> > 1) pass and sort known mailing list messages
> > -if a match is found, message is filed and process ends
> > -otherwise, keep going to next recipe
> >
> > 2) Message is to an address we don't usually want to filter, but looks
> > like spam
> > -pass to tmda-filter
> > -if tmda-filter does something (confirm,bounce,drop), process ends
> > -otherwise (message is confirmed), keep going to next recipe
> >
> > 3) pass and sort mail with other particular headers
> > -if a match is found, message is filed and process ends
> > -otherwise, keep going to next recipe
> >
> > 4) pass message to tmda-filter
> > -if tmda-filter does something (confirm, bounce, drop), process ends
> > -otherwise (message is confirmed) keep going to next recipe
> >
> > 5) if message is destined for my cell phone, route to cell phone
> >
> > 6) default delivery
> >
> >
> > A few notes: hopefully I've made obvious the kinds of weird things I want
> > to do: if someone sends a message to
> > "[EMAIL PROTECTED]", an address I don't normally want to
> > filter or do confirms on, but looks like spam (because, say, it has an
> > RBLcheck header in it that I can detect with procmail), then I want to
> > have TMDA confirm it. Likewise, if a message is sent to my cell phone
> > address (which is routed to procmail via .qmail files), I want to make
> > sure it's confirmed by TMDA before it gets passed to the phone, but I want
> > to do that particular routing in procmail. The end result is that I can
> > pass mail sent to a variety of addresses through the same filtering
> > system, but treat each one a little differently.
> >
> > I guess the theme is that TMDA and procmail both have similar kinds of
> > filtering options, and I'm just more used to procmail's, and want to work
> > with it for everything except the whitelist/blacklist stuff. So I
> > basically want to treat tmda-filter as a filter that will fail/defer
> > (confirm,bounce,drop) or succeed (pass the message through).
> >
> > Am I thinking about this the right way? Is it painfully obvious how this
> > should work, or am I trying to stretch TMDA in directions it's not
> > supposed to go?
> >
> > Thanks for any help.
> >
> > Chris
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users