[Exim] Piping Problem

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Justin Stanford
Fecha:  
A: exim-users
Asunto: [Exim] Piping Problem
G'day folks

This problem has caused me much concern and no matter who I ask,
regardless of exim experience I've been unable to solve it.

In exim's configure file i've specified the following director:

vircheck:
  driver = smartuser
  transport = virus_scan
  condition = "${if or {{eq {$received_protocol}{scanned_ok}} \
                                 {eq {$sender_host_address}{127.0.0.1}}}\
                                 {0}{1}}"
  user = root


(never_users=root is commented out, so root should be a valid user)

The corresponding transport is as follows:

virus_scan:
driver = pipe
command = "/usr/sbin/antiv > /dev/null"
user = root


The concept is for any mail for local delivery, not having a received
protocol value of scanned_ok to be piped to an external virus scanning
script - this script will then mark verified mail as scanned_ok and
resubmit it to exim for delivery.

The script executes perfectly from commandline - if I was to have an email
in say /tmp/testmsg, headers and all, and do a manual pipe like this :-

cat /tmp/testmsg | /usr/local/sbin/exim -t -oMr scanned_ok

The script executes perfectly, verifies that there are no viri, ad the
email is submitted for delivery, and arrives at its destination.

However as soon as one tries to get exim to pipe it itself, this error
appears in the exim_mainlog, and the mail disapears. :-

2000-05-09 12:43:39 12p7UJ-000Nll-00 <= jus@???
H=(spider.web.za) [196
.2.140.158] U=qmailr P=smtp S=492 id=20000509124505.A7449@???
2000-05-09 12:43:40 12p7UJ-000Nll-00 ** jus@??? D=vircheck
T=virus_scan:
Child process of virus_scan transport returned 2 from command:
/usr/sbin/antiv
2000-05-09 12:43:40 12p7UK-000Nlq-00 <= <> R=12p7UJ-000Nll-00 U=bin
P=local S=12
48
2000-05-09 12:43:40 12p7UJ-000Nll-00 Error message sent to
jus@???
2000-05-09 12:43:40 12p7UJ-000Nll-00 Completed

The error email I get contains this:-

  jus@???:
    Child process of virus_scan transport returned 2 from command:
    /usr/sbin/antiv


Yet the script appears to execute perfectly when run from commandline.
Anyone...?

Many thanks in anticipation,
jus

--
Justin Stanford
082 7402741
jus@???
www.security.za.net
IT Security and Solutions