i create a perl script named scan.pl like this:
open(OUT, "|/usr/exim/bin/exim -oMr sv-scanned -bS")
|| die "Connection to Exim failed.\n";
open(READ, "$message");
while (<READ>)
{
print OUT "$_";
}
close(READ);
close(OUT);
and setup this router and transport:
svcheck_router:
no_verify
check_local_user
condition = \
"${if and { {!def:h_X-Spam-Flag:} \
{!eq {$received_protocol}{sv-scanned}} \
}\
{1}{0}\
}"
driver = accept
transport = svcheck
svcheck:
driver = pipe
command = /var/exim/scan.pl
use_bsmtp = true
home_directory = "/tmp"
current_directory = "/tmp"
user = mailnull
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =
because i'm using cpanel based server so there is
already several router set by cpanel.
and there is a router that conflict with my
script/router configuration, causing a mail loop, and
exim will drop the email with error message like "to
many Received: header"
here is the router and transport that looping with my
router/script configuration:
sa_localuser:
driver = accept
check_local_user
headers_add="${perl{gensaheader}{$local_part}}"
condition =
"${perl{checkusersa}{$local_part}{$received_protocol}}"
domains = ! lsearch;/etc/userdomains
transport = local_sa_delivery
local_sa_delivery:
driver = pipe
command = /usr/sbin/sendmail -bS
use_bsmtp = true
transport_filter = "/usr/bin/spamc"
user = $local_part
group = mail
log_output = true
current_directory = "/tmp"
home_directory = "/tmp"
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =
please help me solve this.
Best Regards,
Markus
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail