Re: [SPAM] Some messages fail delivery in postfix -> maildrop -> crm114 chain

Sam Varshavchik <[email protected]>
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
glen martin writes:

>
> On 01/06/14 04:00, Sam Varshavchik wrote:
> > glen martin writes:
> >
> >> Here is my ~/.mailfilter:
> >>
> >>    <snip>
> >>    MAILDIR="$HOME/.maildir"
> >>    DEFAULT="$MAILDIR"
> >>
> >>    logfile "maildropfilter.log"
> >>    log "=========="
> >>
> >>    xfilter "/usr/bin/crm114 -u $HOME/.crm114/
> >> $HOME/.crm114/mailfilter.crm"
> >>
> >>    log "----------"
> >>
> >>    if (/^X-CRM114-Status: SPAM/)
> >>            to "$MAILDIR/.0_checkspam._R_spam"
> >>
> >>    </snip>
> >>
> >> The immediate symptom is that the some messages sit spooled forever
> >> (until they expire, I suppose).  mailq gives me a whole bunch of
> >> items that look like this:
> >>
> >>    <snip>
> >>    51EE7520BA     1981 Sat Jan  4 11:27:34  MAILER-DAEMON
> >>    (temporary failure. Command output: /usr/bin/maildrop: Unable to
> >> filter
> >>    message.)
> >
> > This usually indicates that the external command invoked via xfilter
> > has terminated with a non-zero exit code, indicating an error.
>
> Hi Sam, Thanks for your response.
>
> That was my suspicion as well.  To test that, I've tried calling the
> maildrop command from the shell, in both delivery mode and not, piping
> the same message content. In essence, trying my best to duplicate how
> postfix would have called.  The return code was 0 in those tests, the
> message was delivered successfully both ways. You'll see details farther
> down in my original message.
>
> Is there a way to catch the return code and log information from
> maildrop when it is called from postfix in delivery mode?

Unfortunately this is not logged with enough detail.

But merely invoking something from the command line would not reproduce this  
with 100% accuracy. You would have to invoke maildrop by whatever userid and  
groupid maildrop gets invoked by, from postfix. Additionally, all the  
variables in the environment must be accurately reproduced.

But you can also attack this from another angle. Instead of invoking your  
external filter, from maildrop, have maildrop execute a wrapper shell  
script, that invokes your external filter, and then logs its exit code,  
somewhere.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJSy1XvAAoJEGs6Yr4nnb8lPwkP/iRkP0GoQzGHpN2Vl1jbSiol
ZQOlWn/qJ5jRUqH3SN0xvD/AmpLw9ALB2kpieJvuIwHgEVAXvVqPrBSeu7fhdEA3
nzLAhvCys+hWHzGqcAcOPqW7rk2Fhh6/iADGSbBSaza61XcxHj5MeAnOrxKXiRFe
ThXysvMR2Qtd/8IxNN/+76GpUwuBmNux/fsZuX/2qdaARpiuG8UNDBu0110lTKTn
/vfZb2p4i2Nf+h+SzsDHMsR6qUcXtTDfWZvF4nK3mwNSAh/TaJI6eSUozzdGzg3j
hZ3S09M2R9Fr9prpxv0OuLqmEW9DfTzLIc+PneaXtPO7ZQ6+8/bHeAcCwIsklhIF
TRz5IUtZ+KBxbBhe97O1PbQB3eOH4eFxBG+0raRd1OKsbRthUtiCzIfvIRtsdmfK
EHPMX+htzHGrj8MLKaS9RPIKVidxj8sSnU3yeGbAXW2JLhvfkhOznDyIdkzlQoCy
BChAjIyiyM87aAUwcl6GNDteZlBWQfrCcySxUgdfmAp04WX2RBi6F5G3fQHU8QU8
mGHM9r/KVaq8S8Fm8autrP0pMtBHVNd6OZ8T7v403H8iVVDVZCETDEgnkvf4zLBg
rtr6OnZ3CrKwrsFN7Du0zESZmas/bLa6tpqagnrh1Xv84tGrS020C6gCHnKJoobx
dA4KjRn6BFkU4511XQ+9
=lwth
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.