<HTML>
<HEAD>
<TITLE>Re: MailScanner w/ Qmail / Plesk ( format error: file is too short )</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi Pravin,<BR>
<BR>
Thanks for your reply... I did some further testing after reading your post. When I send a message to the Qmail SMTP server a file is created as follows:<BR>
<BR>
maillog: May &nbsp;9 13:41:38 relaylock: /var/qmail/bin/relaylock: mail from xxx.xxx.xxx.xxx:62279 (my.domain.com)<BR>
path: /var/qmail/queue.in/mess/14<BR>
file: -rw-r--r-- &nbsp;&nbsp;1 qmailq nofiles &nbsp;669 May &nbsp;9 13:41 7064533<BR>
<BR>
<BR>
I ran the inject command as you directed and the message is sent and received in the other mailbox:<BR>
<BR>
command: /var/qmail/bin/qmail-inject.mailscanner cprince@princeinternet.com &lt; 7064533<BR>
maillog:<BR>
<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.084522 new msg 7064535<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.084561 info msg 7064535: bytes 737 from &lt;root@my.domain.com&gt; qp 12777 uid 0<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.087267 starting delivery 3: msg 7064535 to local 1-cprince@domain.com<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.087284 status: local 1/10 remote 0/20<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.091709 delivery 3: success: did_1+0+1/<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.091730 status: local 0/10 remote 0/20<BR>
May &nbsp;9 13:45:38 qmail: 1178736338.091742 end msg 7064535<BR>
<BR>
<BR>
Once I run MailScanner, it reads the file in the queue but fails with the same error:<BR>
<BR>
/usr/sbin/MailScanner <BR>
In Debugging mode, not forking...<BR>
Ignore errors about failing to find EOCD signature<BR>
format error: file is too short <BR>
&nbsp;at /usr/sbin/MailScanner line 832<BR>
Stopping now as you are debugging me.<BR>
commit ineffective with AutoCommit enabled at /usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 93, &lt;CLIENT&gt; line 34.<BR>
Commmit ineffective while AutoCommit is on at /usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 93, &lt;CLIENT&gt; line 34.<BR>
<BR>
<BR>
Do you have any other thoughts?<BR>
<BR>
Thanks,<BR>
Cameron<BR>
<BR>
<BR>
On 5/9/07 12:28 PM, &quot;Pravin Rane&quot; &lt;pravin.rane@gmail.com&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Try to inject mail using /var/qmail/bin/qmail-inject.mailscanner<BR>
<B>/var/qmail/bin/qmail-inject.mailscanner user@mydomain.com &lt; name_of_the_file<BR>
</B>and see whether that mail is getting pushed to /var/qmail/queue directory<BR>
&nbsp;<BR>
<BR>
<BR>
&nbsp;<BR>
On 5/9/07, <B>Cameron B. Prince</B> &lt;cplists@princeservices.com&gt; wrote: <BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hey guys,<BR>
<BR>
I have a new dedicated server with Plesk. I originally purchased the<BR>
SpamAssassin and Dr. Web anti-virus plugins but they just don't compare to <BR>
MailScanner w/ MailWatch.<BR>
<BR>
I followed the instructions to setup MailScanner with Qmail here:<BR>
<BR>
<a href="http://qms.ausics.net/">http://qms.ausics.net/</a><BR>
<BR>
I verified all the perl modules and checked the updates to the <BR>
MailScanner.conf file. When I started MailScanner the init script complained<BR>
that the MTA was invalid. I started Qmail manually and sent a test message.<BR>
When the message hit the SMTP I got a queue error returned to the client. <BR>
<BR>
I ran this command and the queue errors went away:<BR>
<BR>
chmod u+s /var/qmail/bin/qmail-queue<BR>
<BR>
Now a test message produces this in the log:<BR>
<BR>
relaylock: /var/qmail/bin/relaylock: mail from xxx.xxx.xxx.xxx :61451<BR>
(my.domain.com <a href="http://my.domain.com">&lt;http://my.domain.com&gt;</a> )<BR>
MailScanner[6489]: New Batch: Scanning 1 messages, 668 bytes<BR>
MailScanner[6489]: SpamAssassin cache hit for message 7064403<BR>
MailScanner[6489]: Virus and Content Scanning: Starting <BR>
MailScanner[6489]: Uninfected: Delivered 1 messages<BR>
MailScanner[6489]: Logging message 7064403 to SQL<BR>
MailScanner[6451]: 7064403: Logged to MailWatch SQL<BR>
<BR>
When I checked the other mailbox for the message I found that it was never <BR>
received. I enabled debugging and got this output when I tried another test<BR>
message:<BR>
<BR>
/usr/sbin/MailScanner<BR>
In Debugging mode, not forking...<BR>
Ignore errors about failing to find EOCD signature<BR>
format error: file is too short <BR>
at /usr/sbin/MailScanner line 832<BR>
Stopping now as you are debugging me.<BR>
commit ineffective with AutoCommit enabled at<BR>
/usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 93,<BR>
&lt;CLIENT&gt; line 34. <BR>
Commmit ineffective while AutoCommit is on at<BR>
/usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 93,<BR>
&lt;CLIENT&gt; line 34.<BR>
<BR>
<BR>
<BR>
I know this patch for Qmail is pretty old and I wonder if this is the cause <BR>
or if it's more likely to be a problem with the Plesk version of Qmail. Can<BR>
anyone give me some ideas to troubleshoot this?<BR>
<BR>
<BR>
Thanks,<BR>
Cameron<BR>
<BR>
<BR>
<BR>
PS Here's the output of a lint test:<BR>
<BR>
/usr/sbin/MailScanner --lint<BR>
Read 764 hostnames from the phishing whitelist<BR>
Config: calling custom init function SQLBlacklist<BR>
Config: calling custom init function MailWatchLogging<BR>
Config: calling custom init function SQLWhitelist <BR>
Checking version numbers...<BR>
Version number in MailScanner.conf (4.58.9) is correct.<BR>
MailScanner setting GID to &nbsp;(2520)<BR>
MailScanner setting UID to &nbsp;(2520)<BR>
<BR>
Checking for SpamAssassin errors (if you use it)... <BR>
Using SpamAssassin results cache<BR>
Connected to SpamAssassin cache database<BR>
SpamAssassin reported no errors.<BR>
lock.pl sees Config &nbsp;LockType = &nbsp;flock<BR>
lock.pl sees have_module = &nbsp;0<BR>
Using locktype = flock<BR>
MailScanner.conf says &quot;Virus Scanners = f-prot&quot;<BR>
Found these virus scanners installed: f-prot<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
--<BR>
MailScanner mailing list<BR>
mailscanner@lists.mailscanner.info &nbsp;<a href="mailto:mailscanner@lists.mailscanner.info">&lt;mailto:mailscanner@lists.mailscanner.info&gt;</a> <BR>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><BR>
<BR>
Before posting, read <a href="http://wiki.mailscanner.info/posting">http://wiki.mailscanner.info/posting</a> &nbsp;<a href="http://wiki.mailscanner.info/posting">&lt;http://wiki.mailscanner.info/posting&gt;</a> <BR>
<BR>
Support MailScanner development - buy the book off the website!<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
</SPAN></FONT>
</BODY>
</HTML>