|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
[LONG] content_filter doesn't work
From: Alexander Fortin (mean_street
tin.it)
Date: Wed Mar 31 2004 - 08:56:26 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all
I'm a new Postfix user and I'm in trouble :)
Well, I've to run spamassassin on my machine and I want to integrate it
with postfix, that seems to be the simplest MTA solution for a not smart
user like me.
Well, I've folloewd the Advosys how-to pass to pass
(http://advosys.ca/papers/postfix-filtering.html) and then a strange
thing happens: the filter works in stand-alone mode but if I try to make
postfix do it modifying the master.cf file the thing doesn't work, the
mail is delivered but in the headers there aren't the X-Spam voices.
Here my configuration files:
root
klingon:/etc/postfix# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
manpage_directory = /usr/share/man
mydestination = klingon, localhost.localdomain, , localhost
myhostname = klingon
mynetworks = 127.0.0.0/8
program_directory = /usr/lib/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
sample_directory = /usr/share/doc/postfix/examples
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP test server (Debian/GNU)
smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/filtered_domains
--------------------------------------------------------------
root
klingon:/etc/postfix# cat master.cf |grep -v "^#"
smtp inet n - - - - smtpd -o
content_filter=filter:dummy
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m "${extension}" ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop
-f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
filter unix - n n - - pipe
flags=Rq user=filter argv=/var/spool/filter/filter.sh -f ${sender}
-- ${recipient}
--------------------------------------------------------------
root
klingon:/etc/postfix# cat filtered_domains
klingon FILTER filter:dummy
alienshell.dyndns.org FILTER filter:dummy
--------------------------------------------------------------
root
klingon:~# cat /var/spool/filter/filter.sh |grep -v "^#"
INSPECT_DIR=/var/spool/filter
SENDMAIL="/usr/sbin/sendmail -i"
SPAMASSASSIN=/usr/bin/spamassassin
EX_TEMPFAIL=75
EX_UNAVAILABLE=69
cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
trap "rm -f out.$$" 0 1 2 3 15
cat | $SPAMASSASSIN -x > out.$$ || \
{ echo Message content rejected; exit $EX_UNAVAILABLE; }
$SENDMAIL "$
" < out.$$
exit $?
--------------------------------------------------------------
Thanks a lot for your help!
--
Alexander Fortin
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]