Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with qmail-scanner

Status
Not open for further replies.

GSRRGS

ISP
Feb 27, 2003
21
0
0
HK
Hi,
I am using qmail-1.03 with ./Maildir type mail box format. I then tried to add qmail-scanner feature in running qmail. After installing qmail-scanner, I have succesfully tested the installtion with provided test_installation.sh script. Then i modified the /etc/tcp.smtp file to have QMAILQUEUE point to this new qmail-scanner-queue.pl perl script in /var/qmail/bin directory. The updated /etc/tcp.smtp file is:
127.:allow,RELAYCLIENT=""
<Allowed IP>:allow,RELAYCLIENT=&quot;&quot;,QMAILQUEUE=&quot;/var/qmail/bin/qmail-scanner-queue.pl&quot;

After this I rebuild the /etc/tcp.smtp file with qmailctl cdb commmand. After this when I tried to send mail using this server as SMTP server, I got following error:

&quot;An error occured while sending mail. The mail server responded:qq temporary problem(#4.3.0). Please check the message and try again.&quot;

Please help me as i need to protect my network from viruses and spam mails.

Thanks in Advance
 
check that qmailq.qmail chowns the scanner.pl file

This is the second line of my /var/qmail/supervise/qmail-smtpd/run file

QMAILQUEUE=&quot;/var/qmail/bin/qmail-scanner-queue.pl&quot; export QMAILQUEUE

I make no reference to QMAILQUEUE in /etc/tcp.smtp

HTH.
 
Thanks for reply
The permissions of scanner.pl file are correct. I then tried with modifying qmail-smtpd/run file as suggested by you but again the same problem. My qmail-smtpd/run file is :

#!/bin/sh
QMAILQUEUE=&quot;/var/qmail/bin/qmail-scanner-queue.pl&quot; export QMAILQUEUE
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
if [ -z &quot;$QMAILDUID&quot; -o -z &quot;$NOFILESGID&quot; -o -z &quot;$MAXSMTPD&quot; ]; then
echo QMAILDUID, NOFILESGID, or MAXSMTPD is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi

In /etc/tcp.smtp file I had removed reference to QMAILQUEUE

Please see what else can I do.

Thanks
 
there is an existing qmail-queue patch for qmail 1.03. You have to look for it on qmail.org.
Unpatched versions doesn't work with this QMAILQUEUE Env. .
I don't know if the plain version ignores this Env. or if there is some misinterpretation.

Anyway. Instead of using this &quot;export QMAILQUEUE&quot;, you are free to modify it file-based:
#rcqmail stop
#mv /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig

setup a bash-script,name it /var/qmail/bin/qmail-queue and chown/chmod it to the same values as the original file was:
---snip---
#!/bin/bash
/var/qmail/bin/qmail-scanner-queue.pl |/var/qmail/bin/qmail-queue.orig
---snip---

i didn't try this, but it should work.
 
I have applied qmailqueue patch also. Then I tried by creating another bash script as mentioned by you but the same error I get while sending mail. I think I should mention one more thing that will be useful you to help me. Few days back I was trying to install Panda Antivirus Qmail addition on this server and after installing, I was gettting the same error while sending the mail. I then uninstalled it. And without it qmail and vpopmail are working perfectly. So it might be something related to qmail as in both the cases I am getting the same error as mentioned earlier.

Hope the same quick reply from u guys.

Thanks
 
Sorry, i've got only one possible solution left:

Try to check, if your qmailq &quot;user&quot; is generally allowed to execute your perl-interpreter.

btw. i won't do all spam/virus filtering between qmail-smtpd and qmail-queue. A year ago i tried this with only a spamassassin (&quot;/usr/local/bin/spamc | /var/qmail/bin/qmail-queue&quot;) . This resulted in very high load with delivery delayed a few hours and dropped mails. If you don't own a very fast multiprocessor machine with a huge amount of ram, i would not recommend this...
Currently, the mail is checked by 4 different filters.
1. rblsmtpd (i know, not everebodies flavor...)
2. rejecting sender from a few east-asia.
3. per-user-based: virus-checking (f-prot & odeiavir)
4. per-user-based: spam-checking (spamassassin)
For me, this is now a very satisfying combination.
Days ago i wrote a small &quot;howto&quot; just a few threads below in this board.

Sorry for my english :)
 
Hi,

I have checked the permissions of /usr/bin/perl and they are:
-rwxr-xr-x 2 root root 708188 Aug 10 2001 /usr/bin/perl

That means everybody has the execute permission on it. I am also using rblsmtpd with bl.spamcop.net blocking list. What elso can I do to stop Junk/Virus mail from our site?

rgds
 
I have solved the problem. That qq error was actually due to memory limit in softlimit part in qmail-smtpd/run file. I have increased softlimit from 2MB to 6MB and it worked then.

Thanks to all for answering my queries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top