<[EMAIL PROTECTED]> writes:
> This is the last part of my .procmailrc file:
>
> # Run the message through tmda-filter.
> :0 w
> | /usr/home/sean/tmda-0.84/bin/tmda-filter
>
> # Take the exit code from TMDA.
> EXITCODE=$?
>
> # TMDA takes care of final delivery
> DEFAULT=/dev/null
>
> :0
> * TO: sean@
> {
> :0c
> ! [EMAIL PROTECTED]
>
> :0
> ! /home/sean/mbox
> }
>
>
> My problem is that I would like to have the rest of the rules after
> the line DEFAULT=/dev/null to still be read.
>
> How can I have tmda confirm an address and then complete the rest of
> the file?
1) Tell TMDA to deliver through a second procmailrc-type file by
setting DELIVERY. The docs include an example for procmail:
http://tmda.net/config-vars.html#DELIVERY
Note that you *must* use a different name for the procmailrc-type
file or you will end up in a loop. The example in the docs above
uses ~/.procmailrc-tmda. Then, move everything after the DEFAULT
statement in your .procmailrc (above) into the new .procmailrc-tmda
(or whatever you choose to call it).
Now, successful messages will be piped to procmail for further
processing.
2) Use the -p flag (--print) flag with tmda-filter. This causes
tmda-filter to write successful messages to stdout (normal *nix
filtering) and return 0. If a message is *not* successful, i.e. it
is bounced, dropped or confirmed, tmda-filter will return 99. In
the case of any unexpected error, tmda-filter returns 75 to cause
the MTA to reschedule delivery.
So, you need to change your .procmailrc. Depending on what MTA is
delivering your mail, it will be different. The basic problem is
that for qmail and Courier, if tmda-filter returns 99, you want to pass it
through, but for any of the others you want to return 0. Since the
qmail/Courier version is easier, I'll show you what your
.procmailrc might look like if you're using Exim/Postfix/Sendmail
(warning -- untested!):
# Run the message through tmda-filter.
:0 fW
| /usr/home/sean/tmda-0.84/bin/tmda-filter -p
:0 e
{
# If tmda-filter returned 99, don't set EXITCODE!
:0
? /bin/test $? -eq 99
/dev/null
:0
EXITCODE=$?
/dev/null
}
:0
* TO: sean@
{
:0c
! [EMAIL PROTECTED]
:0
! /home/sean/mbox
}
Obviously, option 1 is easier (I'm not sure I've got the vagaries of
procmail correct in my example, but you get the idea, anyhow).
Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users