Thanks for your reply, Gordon.


I've ensured that /etc/courier/enablefiltering is run for both esmtp and
local (since I'm running tests on localhost).

Be sure that's what you want. There's *probably* no reason to filter "local" mail, which is why that's off by default. If only "esmtp" is specified, SMTP mail from the localhost is still filtered.

Yes, since I'm only interested in testing locally on the server, I have enablefiltering turned on for local mail.


# cat /etc/courier/enablefiltering
local esmtp

Looks right.


# ls -l /etc/courier/filters/active
total 0
lrwxrwxrwx 1 root root 43 Mar 21 20:39 perlfilter -> /usr/lib/courier/libexec/filters/perlfilter

# cat /etc/courier/filters/perlfilter
/usr/lib/courier/share/perlfilter.pl

What's it doing *there*? The man page for filterctl indicates that filters belong in "/usr/lib/courier/libexec/filters". You *did* activate perlfilter.pl using filterctl, didn't you? I'm guessing that you didn't, since the symlink name isn't the same as the application's name, and the application isn't in the right spot.

Yes I did, but I simply had the perl script in another location. But I've moved it, so now:

# cat /etc/courier/filters/perlfilter
/usr/lib/courier/libexec/filters/perlfilter.pl


# ls /var/spool/courier/filters/
perlfilter

Again, "ls -l" is more informative.


# ls -l /var/spool/courier/filters/
total 0
srw-rw----  1 daemon daemon 0 Mar 21 20:40 perlfilter

The processes are running...

# ps auwx|grep perlfilter
daemon    3320  0.0  0.0   3496   592 ?        S    20:40   0:00 perlfilter
daemon    3321  0.0  0.0   5940  1596 ?        S    20:40   0:00 perlfilter
daemon    3322  0.0  0.0   5940  1596 ?        S    20:40   0:00 perlfilter
daemon    3323  0.0  0.0   5940  1596 ?        S    20:40   0:00 perlfilter
daemon    3324  0.0  0.0   5940  1596 ?        S    20:40   0:00 perlfilter
daemon    3325  0.0  0.0   5940  1596 ?        S    20:40   0:00 perlfilter

For debugging the filter, you can write to STDERR. Anything written to the filter's stderr will show up in your mail logs.

And in the perl script, I'm outputting each line to STDERR. But nothing comes out in the log.

Here's the log:

Mar 21 20:41:17 xxxx courierd: started,id=0C03533C.4420D56D.00000D18,from=<[EMAIL PROTECTED]>,module=local,host=ricardo!!500!500!/home/ricardo!!,addr=<ricardo> Mar 21 20:41:17 xxxx courierd: Waiting. shutdown time=none, wakeup time=none, queuedelivering=1, inprogress=1 Mar 21 20:41:17 xxxx courierlocal: id=0C03533C.4420D56D.00000D18,from=<[EMAIL PROTECTED]>,addr=<[EMAIL PROTECTED]>,size=484,success: Message delivered.
Mar 21 20:41:17 xxxx courierd: completed,id=0C03533C.4420D56D.00000D18

So I'm confused as to why it's not working.




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to