On Wed, 2003-10-15 at 13:41, Jesse Guardiani wrote:
> On Wednesday 15 October 2003 10:57, russ wrote:
> > On Wed, 2003-10-15 at 10:24, Jesse Guardiani wrote:
> > > On Tuesday 14 October 2003 21:13, russ wrote:
> > > > On Tue, 2003-10-14 at 21:05, [EMAIL PROTECTED] wrote:
> > > > > qmail installes a sendmail wrapper... my sqwebmail sendit script
> > > > > calls the qmail supplied sendmail wrapper with no problems.
> > > > >
> > > > > Look for it in your qmail/bin
> > > >
> > > > Yes, sqwebmail works fine for me too, it just won't pipe mail through
> > > > qmail-scanner the right way, so I have no virus protection and can't
> > > > stop certain file extentions from getting through.  Normally that might
> > > > not even be an issue since it only happens when it goes to mail
> > > > accounts on the same machine, but this is being set up at a school for
> > > > the students.  Not blocking certain extentions will be suicide for me.
> > > > :)
> > >
> > > I think the problem is that you don't understand how qmail-scanner is
> > > executed.
> > >
> > > In order for qmail-scanner to run, the QMAILQUEUE environment variable
> > > has to be set to the location of qmail-scanner-queue.pl, which is
> > > usually:
> > >
> > >     /var/qmail/bin/qmail-scanner-queue.pl
> > >
> > > Normally, this is done via tcpserver, and usually with this configuration
> > > file:
> > >
> > >     /etc/tcp.smtp
> > >
> > > However, when you run the `sendmail` command from a shell script like
> > > sendit.sh, you don't invoke tcpserver, and thus tcpserver never gets the
> > > chance to set the QMAILQUEUE environment variable.
> > >
> > > If you WANT to set the QMAILQUEUE environment variable so that the
> > > QMAILQUEUE patch will run qmail-scanner before running qmail-queue, then
> > > you generally have two options:
> > >
> > >     1.) Set QMAILQUEUE in qmail-smtpd's run script, which is usually
> > > located here:
> > >
> > >         /var/qmail/supervise/qmail-smtpd/run
> > >
> > >         This should assure that qmail-scanner is run for EVERY email sent
> > >         through qmail.
> > >
> > >     2.) Set QMAILQUEUE from sqwebmail's sendit.sh file, located here:
> > >
> > >         /usr/local/share/sqwebmail/sendit.sh
> > >
> > >         This will only run qmail-scanner for sqwebmail's outgoing mail.
> > >
> > > Both of the above file are /bin/sh scripts, so placing the following at
> > > the top of either file aught to work:
> > >
> > > QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
> > > export QMAILQUEUE
> > >
> > > Hope that helps.
> >
> > Thanks for your answer,  I do understand how that works, maybe I am not
> > being clear with my question.  I CAN get sqwebmail to pipe through
> > qmail-scanner, however, it does not carry the "From" or "Recipient"
> > fields into qmail-scanner. Since those fields are blank, qmail-scanner
> > just drops the message out.  Then it goes to qmail-queue with the -f
> > "$1" switch (which is were it picks up the From: and Recipient: fields)
> > and sends the e-mail.
> 
> That doesn't really make much sense. The `sendmail` command should automatically
> add the From header for you if you're using the -f flag (which the default
> sendit.sh does), and qmail-scanner shouldn't NEED to check any Recipient headers.
> Recips are provided via a file descriptor to qmail-queue programs. And AFAIK it's
> perfectly legal for an incoming message to lack a Recipient: header.
> 
> Try replacing the contents of sendit.sh with this, and see if it works:
> 
> #!/bin/sh
> 
> QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
> export QMAILQUEUE
> QMAILUSER="$1"
> export QMAILUSER
> 
> exec /var/qmail/bin/qmail-inject -hf "$1" 

Thank you SOOO MUCH !!!! That solved my problem 100%
-- 
Russel Oliver
[EMAIL PROTECTED]


Reply via email to