Re: content_filter

From: Matthew Wheeler (no email)
Date: Tue Oct 01 2002 - 02:57:16 EDT


> Why does the content_filter give it back to Port 25? That's obviously
> wrong!
> Pass it to port 10027, where another smtpd listens, with "-o
content_filter="
>

yeah I thought it would have to be something like that, what would the
command line arg for "sendmail" be to do that??

Here is my shell script (complete ripoff of one from readmes)
and the pertinent lines from master.cf

#!/bin/sh

 

# Localize these.

INSPECT_DIR=/path/to/filter/dump

SENDMAIL="/usr/sbin/sendmail -i"

 

# Exit codes from <sysexits.h>

EX_TEMPFAIL=75

EX_UNAVAILABLE=69

 

# Clean up when done or when aborting.

trap "rm -f in.$$" 0 1 2 3 15

 

# Start processing.

cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit
$EX_TEMPFAIL; }
 

cat >in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }

 

altermime --input=in.$$ --disclaimer=/path/to/disclaimer.txt || \
        { echo Message content rejected; exit $EX_UNAVAILABLE; }

 
 

$SENDMAIL "$@" <in.$$

 
 

exit $?

And here is the interface line from my master.cf
dfilt unix - n n - - pipe
   flags=Rq user=filter argv=/path/to/content_filter.sh -f ${sender} --
${recipient}

Ralf Hildebrandt wrote:
> On Tue, Oct 01, 2002 at 02:48:52PM +1000, Matthew Wheeler wrote:
>
>>Hi, I am hacking up a small content_filter (of type pipe) and getting
>>myself into a mail loop.
>>
>>Basically what is happening is this:
>>
>>Email comes into port 25 on postfix
>>Postfix passes it onto port 10025 (smtp) Virus Scanner
>>Virus Scanner passes it back into Postfix on port 10026
>>Postfix passes it into content_filter (pipe)
>>content_filter passes it back into port 25 and the merry go round begins
>>again :-)
>
>

 
__________________________________________________

This Message is intended for the addressee named and may contain confidential information.
If you are not the intended recipient, please delete it and notify the sender.
Views expressed in this message are those of the individual sender and not necessarily the views of the Judicial Commission of NSW.

 

-
To unsubscribe, send mail to with content
(not subject): unsubscribe postfix-users








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD