[Exim] Exim and vipuls razor.

Startseite
Nachricht löschen
Nachricht beantworten
Autor: j2
Datum:  
To: exim-users
Betreff: [Exim] Exim and vipuls razor.
I tried to implement vipuls Razor
(http://prdownloads.sourceforge.net/razor/razor-agents-1.19.tar.gz)

and did the following

a transport:

razor_check_pipe:
driver = pipe
command = /home/razor/razor-check.pl
user = razor
group = mail
environment = "RECIPIENT=$local_part@$domain"
prefix =
suffix =

as my first director

razor_check:
driver = smartuser
transport = razor_check_pipe
condition = ${if eq {$received_protocol}{razor_checked}{no}{yes}}

and then the (slightly modified) razor-check.pl

#!/usr/bin/perl
#
# take message in from Exim and check to see
# if it is spam as determined by razor.
#
# Mail::Audit module from
# http://search.cpan.org/search?module=Mail::Audit
# http://simon-cozens.org/writings/mail-audit.html
use Mail::Audit qw(Razor);
# read mail in on STDIN and create new mail audit object
my $incoming = Mail::Audit->new;
# check if mail is spam
if ($incoming->is_spam()) {
# add spam header
$incoming->put_header("X-Razor-Check","SPAM I am");
# if spam, then put in special folder

#The original file used the following.
# $incoming->accept("/home/razor/spam");

#i did this, as i just want to add the header and replace the message in the
queue
 $incoming->pipe($cmd)
} else {
  $cmd = "/usr/local/bin/exim -oMr razor_checked -f "
         .$ENV{"SENDER"}." '".$ENV{"RECIPIENT"}."'";
  # good mail we give back to exim with a special protocol
  # set so exim knows that we have checked the message
  $incoming->pipe($cmd)
}
exit 0;



But, it doesnt work... and it seems to be a perl problem, so not applicable
for this list maybe.. but somoen should have don it before?

exim gives:
2002-02-17 01:01:48 16blZI-0007Vu-00 ** bounce-sEJTVjZG@???
D=razor_check T=razor_check_pipe: Child process of razor_check_pipe
transport returned 255 (could mean shell command ended by signal 127
(Unknown signal 127)) from command: /home/razor/razor-check.pl
2002-02-17 01:01:48 16blZI-0007Vu-00 Frozen (delivery error message)

and running a test on the script gives

[root@statler root]# cat /home/razor/test.message |
/home/razor/razor-check.pl
Modification of a read-only value attempted at
/usr/local/lib/perl5/site_perl/5.6.1/Net/DNS/Resolver.pm line 155.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.6.1/Razor/Client.pm line 21.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.6.1/Razor/Client.pm line 21.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.6.1/Mail/Audit/Razor.pm line 10.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.6.1/Mail/Audit/Razor.pm line 10.
Compilation failed in require at (eval 6) line 2.
BEGIN failed--compilation aborted at (eval 6) line 2.
BEGIN failed--compilation aborted at /home/razor/razor-check.pl line 9.
[root@statler root]#

Anyone with any idea?