[exim] trying to use 'pipe' in an exim filter, but not worki…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jeffrey 'jf' Lim
Date:  
À: exim users
Sujet: [exim] trying to use 'pipe' in an exim filter, but not working
I've got a system_filter file, which I've verified that exim does indeed
refer to, but somehow the 'pipe' just does not seem to work. Can anybody
debug why?

== system_filter ==
# Exim filter
if $sender_address does not end "@gmail.com" and $h_to contains "
test@???" then
        fail "sending not allowed."
endif
if $h_to contains "test@???" then
        unseen pipe "/usr/local/mailserver/process.sh"
endif
========


I've tried at various times playing with the first "if", and yes, I do get
the fail message when the conditions match (so I know exim is loading the
filter). But whenever I get pass the first "if" (like in this case, sending
from "@gmail.com" to "test@???", the pipe just does not seem to be
triggered.

==== process.sh ========
#!/bin/sh
tmp=`mktemp`
cat > $tmp
echo "sometext" >/tmp/foo
===============

The message gets sent to the inbox of the test account, but process.sh does
not run? (There is nothing in /tmp)


-jf

--
In the meantime, here is your PSA:
"It's so hard to write a graphics driver that open-sourcing it would not
help."
-- Andrew Fear, Software Product Manager, NVIDIA Corporation
http://kerneltrap.org/node/7228