I thought that this solved my problem, but I am now facing another,
intermediate one. How do I ignore the return code from a cc so that mail
is piped in, and maildrop continues to process rules until it finds a to?
After speaking with the author of relayDB, I found that I am having non-0
values returned. This causes maildrop to EX_TEMPFAIL and defer the message.
He is, however, primarily familiar with Procmail and didn't have an answer
for maildrop. From our conversation:
[Daniel]
I think I've seen this before, and it's a problem with the tool piping
the mail through relaydb.
relaydb only reads the beginning of the headers (up to a certain number
of Received: lines), then just terminates. It doesn't read the entire
data it gets piped. Now, if the program that pipes the data to relaydb
doesn't handle that case gracefully (usually SIGPIPE i.e. "broken
pipe"), it might return a failure.
Note that you should use "pipe copy of message into relaydb, ignoring
relaydb's return code or any other error" if the tool supports it.
procmail, for instance, does that with
:0c
| /usr/local/bin/relaydb -b
And not "pipe message through relaydb and drop mail if return code is
error" or similar (which also exists).
[/Daniel]
I looked at documentation for exception{}, but could not get it to work in
practice.
My attempts:
exception{
if (^X-Spam-Status: YES)
{
cc "|/usr/local/bin/relaydb -b"
}
else
{
cc "|/usr/local/bin/relaydb -w"
}
}
or:
if (^X-Spam-Status: YES)
{
exception{
cc "|/usr/local/bin/relaydb -b"
}
}
else
{
exception{
cc "|/usr/local/bin/relaydb -w"
}
}
Thanks,
Seth
----- Original Message -----
From: "Gordon Messmer" <[EMAIL PROTECTED]>
To: "Hanford, Seth" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 5:59 PM
Subject: Re: [courier-users] Maildrop and xfilter losing mail
> Hanford, Seth wrote:
> > My example recipe looks like this:
> >
> > if ( /^X-Spam-Status: Yes/ )
> > xfilter "/usr/local/bin/relaydb -b -f /usr/local/share/relaydb"
> > else
> > xfilter "/usr/local/bin/relaydb -w -f /usr/local/share/relaydb"
> >
> > Unfortunately, mail comes in, but gets lost after the appropriate
entries
> > are made into the relaydb.
>
> Don't use xfilter. Do this instead:
>
> if ( /^X-Spam-Status: Yes/ )
> {
> cc "|/usr/local/bin/relaydb -b -f /usr/local/share/relaydb"
> }
> else
> {
> cc "|/usr/local/bin/relaydb -w -f /usr/local/share/relaydb"
> }
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by OSDN's Audience Survey.
> Help shape OSDN's sites and tell us what you think. Take this
> five minute survey and you could win a $250 Gift Certificate.
> http://www.wrgsurveys.com/2003/osdntech03.php?site=8
> _______________________________________________
> courier-users mailing list
> [EMAIL PROTECTED]
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users