<div dir="ltr">And you can also change the scanner to clamav (istead of clamd) in MailScanner.conf. This also solves the problem, but is a performance hit. <div><br></div><div style>I am sure I will think of something else in a minunte so I can email 500 people again something they don't want to read. </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 19, 2013 at 12:49 AM, Jerry Benton <span dir="ltr"><<a href="mailto:jerry.benton@mailborder.com" target="_blank">jerry.benton@mailborder.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Forgot to mention ... <div><br></div><div>I do this with the mtagroup because both postfix and clamav need access to these files. If you read the MailScanner docs you see where Julian lays out the logic. I just extended upon that with an enitrely new group because the Mailborder servers have a lot more going on. </div>
<div><br></div><div>If you are still having huge problems, you could always run clamd as root, but that is not recommended. However, it is a valid short term solution to clear out your queues with email being time sensitive and all.</div>
<div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 19, 2013 at 12:44 AM, Jerry Benton <span dir="ltr"><<a href="mailto:jerry.benton@mailborder.com" target="_blank">jerry.benton@mailborder.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok so ... I have no idea how you setup permissions, so I will just show you what is doen in the Mailborder install scripts. In short, I create a special group and add postfix, clamav, and any other required user to that group. I then set the MailScanner quarantine, postfix processing, etc. as being owned by that group. I then set the below permissions, which is essentially group read and write (0660)<div>
<br></div><div><br></div><div><div># set permissions</div><div>#</div><div>chown root:mtagroup /etc/postfix/<a href="http://main.cf" target="_blank">main.cf</a></div><div>chmod 0664 /etc/postfix/<a href="http://main.cf" target="_blank">main.cf</a></div>
<div>chown -R root:mtagroup /etc/MailScanner/reports/</div><div>chown postfix:mtagroup /var/spool/MailScanner</div><div>chown postfix:mtagroup /var/spool/MailScanner/incoming</div><div>chown postfix:mtagroup /var/spool/MailScanner/quarantine</div>
<div>chown postfix.mtagroup /var/spool/MailScanner/spamassassin</div><div>chown postfix:mtagroup /var/spool/postfix</div><div>chown postfix:mtagroup /var/spool/postfix/incoming</div><div>find /etc/MailScanner/reports/ -type d -exec chmod 0655 {} \;</div>
<div>find /etc/MailScanner/reports/ -type f -exec chmod 0664 {} \;</div><div>chmod g+w /var/spool/MailScanner/*</div><div>touch /var/spool/MailScanner/incoming/SpamAssassin.cache.db</div><div>chown postfix:mtagroup /var/spool/MailScanner/incoming/SpamAssassin.cache.db</div>
<div>touch /var/spool/MailScanner/incoming/Processing.db</div><div>chown postfix:mtagroup /var/spool/MailScanner/incoming/Processing.db</div></div><div><br></div></div><div class="gmail_extra"><div><div><br><br>
<div class="gmail_quote">
On Thu, Apr 18, 2013 at 11:54 PM, Steve Freegard <span dir="ltr"><<a href="mailto:steve.freegard@fsl.com" target="_blank">steve.freegard@fsl.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How about AppArmour as you're on Ubuntu.<br>
<br>
sudo /etc/init.d/apparmor stop<br>
<br>
Does that fix it?<br>
<br>
Regards,<br>
Steve.<br>
<div><br>
<br>
On 18/04/13 21:57, Carlos Raśl Laguna wrote:<br>
> Did what you ask no difference do<br>
><br>
> #!/usr/bin/perl -U -I/usr/share/MailScanner/<br>
><br>
> an't call method "close" on an undefined value at<br>
> /usr/sbin/mailscanner_create_locks line 47.<br>
> Error: Attempt to create locks in /var/lock/MailScanner failed!<br>
> Can't set GID 33 at /usr/sbin/MailScanner line 1541.<br>
><br>
><br>
> 2013/4/18 Carlos Raśl Laguna <<a href="mailto:carlosla1987@gmail.com" target="_blank">carlosla1987@gmail.com</a><br>
</div>> <mailto:<a href="mailto:carlosla1987@gmail.com" target="_blank">carlosla1987@gmail.com</a>>><br>
<div>><br>
> Did what you ask no difference do<br>
><br>
><br>
><br>
> 2013/4/18 Carlos Raśl Laguna <<a href="mailto:carlosla1987@gmail.com" target="_blank">carlosla1987@gmail.com</a><br>
</div>> <mailto:<a href="mailto:carlosla1987@gmail.com" target="_blank">carlosla1987@gmail.com</a>>><br>
<div>><br>
> Thanks for the fast reply<br>
> all i get is<br>
><br>
> Can't call method "close" on an undefined value at<br>
> /usr/sbin/mailscanner_create_locks line 47.<br>
> Error: Attempt to create locks in /var/lock/MailScanner failed!<br>
> Can't set GID 33 at /usr/sbin/MailScanner line 1541.<br>
><br>
><br>
><br>
><br>
> 2013/4/18 Martin Hepworth <<a href="mailto:maxsec@gmail.com" target="_blank">maxsec@gmail.com</a><br>
</div>> <mailto:<a href="mailto:maxsec@gmail.com" target="_blank">maxsec@gmail.com</a>>><br>
<div><div>><br>
> Make youve turned off selinux<br>
><br>
> Also run the debug as the postfix user<br>
><br>
> Martin<br>
><br>
> On Thursday, 18 April 2013, Carlos Raśl Laguna wrote:<br>
><br>
><br>
> Hi aim using mailscanner 4.84.5-4 on ubuntu 12.04.2 an<br>
> after some check MailScanner --lint give no error back,<br>
> however when i run in debug mode i get this<br>
><br>
> LibClamAV Error: cli_scanhtml: Can't create temporary<br>
> directory<br>
> /var/spool/MailScanner/incoming/SpamAssassin-Temp/fileZu9PiO/clamav-dfeb188c6d93ac33695b6db46175629e<br>
> LibClamAV Error: cli_scanhtml: Can't create temporary<br>
> directory<br>
> /var/spool/MailScanner/incoming/SpamAssassin-Temp/fileZu9PiO/clamav-0973cd1b961c3f9d0c42a72a271a3579<br>
><br>
> plugin: eval failed: bayes: (in learn) locker:<br>
> safe_lock: cannot create lockfile<br>
> /var/lib/MailScanner/bayes.mutex: Permission denied<br>
> plugin: eval failed: bayes: (in learn) locker:<br>
> safe_lock: cannot create lockfile<br>
> /var/lib/MailScanner/bayes.mutex: Permission denied<br>
><br>
> It looks like permission issue but no enteraly shure<br>
> about that had change the user from where runnig clamav<br>
> without any good outcome<br>
><br>
> grep -i postfix MailScanner.conf | grep -v ^#<br>
> Run As User = postfix<br>
> Run As Group = postfix<br>
> Incoming Queue Dir = /var/spool/postfix/hold<br>
> Outgoing Queue Dir = /var/spool/postfix/incoming<br>
> MTA = postfix<br>
><br>
> Any help here would be really appreciated. Thanks for<br>
> your time.<br>
><br>
><br>
><br>
> --<br>
> --<br>
> Martin Hepworth, CISSP<br>
> Oxford, UK<br>
><br>
> --<br>
> MailScanner mailing list<br>
> <a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a><br>
</div></div>> <mailto:<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a>><br>
<div><div>> <a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
><br>
> Before posting, read <a href="http://wiki.mailscanner.info/posting" target="_blank">http://wiki.mailscanner.info/posting</a><br>
><br>
> Support MailScanner development - buy the book off the website!<br>
><br>
><br>
><br>
><br>
><br>
><br>
<br>
<br>
--<br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a><br>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
<br>
Before posting, read <a href="http://wiki.mailscanner.info/posting" target="_blank">http://wiki.mailscanner.info/posting</a><br>
<br>
Support MailScanner development - buy the book off the website!<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><div>-- <br><div dir="ltr"><div><div><br>--<br></div>Jerry Benton<br></div>Mailborder Systems<br><a href="http://www.mailborder.com" target="_blank">www.mailborder.com</a><br>
</div>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><div><br>--<br></div>Jerry Benton<br></div>Mailborder Systems<br><a href="http://www.mailborder.com" target="_blank">www.mailborder.com</a><br>
</div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><div><br>--<br></div>Jerry Benton<br></div>Mailborder Systems<br><a href="http://www.mailborder.com" target="_blank">www.mailborder.com</a><br>
</div>
</div>