Koozali.org: home of the SME Server

Fetchmail and ClamAV

8stargen

Fetchmail and ClamAV
« on: September 13, 2004, 05:50:38 AM »
Just another quick question.

I'm using fetchmail http://www.schirrms.net/sme/SMEFetchMail.php to collect the mail from my clients old pop3 email accounts and drop them in to their new acounts on the SME server. That way they don't loose mails sent to their old address and they get the advatage of having all mail scanned by the scanning on SME.

However, I've noticed that mails delivered by fetchmail dont get intercepted by ClamAV ! I've tried telling fetch (via the admin panel) to send mails to their external address in the hope it would pass it on to qmail like any other email but no luck. I'm not farmiliar with the system. Could anyone point me in the right direction? It kind of important as the emails fetch is checking is the ones where all the virus' are coming from!

Thanks heaps, and I highly recommend this implimentation of Fetchmail for SME 6 from http://www.schirrms.net/sme/SMEFetchMail.php

Cheers,

Tim

8stargen

Fetchmail and ClamAV
« Reply #1 on: September 13, 2004, 04:19:34 PM »
Solved!

Just a note to anyone looking to do the same thing in the future...

I just had to change the appropriate template for the /etc/tcprules/tcp.smtp. Modifiing the first line to appear as follows:
Code: [Select]
127.0.0.1:allow,RELAYCLIENT="",QMAILQUEUE="/usr/bin/qmail-queue.amavis"

Then run
Code: [Select]
tcprules tcp.smtp.cdb tcp.smtp.temp < tcp.smtp

And your away.

Remeber, simply changing /etc/tcprules/tcp.smtp is not enough as this change will be lost when you modify the "Email" section of the server-manager. Modify the appropriate template.

Cheers,

Tim

8stargen

Fetchmail and ClamAV
« Reply #2 on: September 13, 2004, 04:20:56 PM »
One last thing... could you let me know if this is not the right way to go about it, or if I've managed to open up some mega security hole! :P

Cheers,
Tim

Offline jonroberts

  • ****
  • 111
  • +0/-0
    • http://www.westcountrybusiness.com
Fetchmail and ClamAV
« Reply #3 on: September 20, 2004, 06:45:24 PM »
8stargen - Thanks for the tip.  I just had the same problem & this set me on the right track.  However I think there's a neater solution.

The template fragment that exists for tcp.smtp checks to see if the InternalInterfacesFilter is set.  You can set this by entering:

# /sbin/e-smith/config setprop smtpfront-qmail InternalInterfacesFilter /usr/bin/qmail-queue.amavis

You then need to expand the template with:

# /sbin/e-smith/expand-template /etc/tcprules/tcp.smtp

This produces the same result as modifying the template in the way you suggest.

I must confess I wasn't sure which services to restart for this change to take effect, so I entered:

# /sbin/e-smith/signal-event email-update

which did the trick (may be an overkill though).

I would guess this also means that all internal mail is virus checked which could have performance issues.  (I haven't tested this yet as I use Lotus Domino for Internal mail)

Have you found any issues with performance?  Is all Internal Mail also scanned with this setting?

Cheers

Jon R
......