FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Location
    Guelph (pronounced Gwe-ELF), Ontario , Canada
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Anyone got ClamAV-milter working on F11

    I'm replacing my trusty old F5 firewall/mail server with a new(er) F11 box.
    Using yum, I have these packages installed:
    clamav.x86_64 0.95.2-3.fc11 @updates
    clamav-data.noarch 0.95.2-3.fc11 @updates
    clamav-devel.x86_64 0.95.2-3.fc11 @updates
    clamav-filesystem.noarch 0.95.2-3.fc11 @updates
    clamav-lib.x86_64 0.95.2-3.fc11 @updates
    clamav-milter.x86_64 0.95.2-3.fc11 @updates
    clamav-milter-upstart.noarch 0.95.2-3.fc11 @updates
    clamav-scanner.noarch 0.95.2-3.fc11 @updates
    clamav-scanner-upstart.noarch 0.95.2-3.fc11 @updates
    clamav-server.x86_64 0.95.2-3.fc11 @updates
    clamav-update.x86_64 0.95.2-3.fc11 @updates

    ClamAV and freshclam work as expected.
    but after replicating my old /etc/clamd.d/milter.conf into /etc/clamd.d/scan.conf, I still get a socket error:
    >service sendmail restart
    Shutting down sm-client: [ OK ]
    Shutting down sendmail: [ OK ]
    Starting sendmail: WARNING: Xclmilter: local socket name /var/run/clamav-scan/clamav.sock missing

    I'm missing clamd and clamav-milter(or clamav-scan) from /etc/init.d

    >service clamd status
    >service clamav-milter status
    >service clamav-scan status
    these all return Unknown service

    Likewise, I do not have anything named like clam in chkconfig

    Has anyone gotten ClamAV email filtering working in F11+

  2. #2
    Join Date
    Sep 2005
    Location
    Redneck Riviera
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The short answer is:

    You need the clamav-milter-sysvinit and clamav-scanner-sysvinit packages to be able to use the 'service' command.

    The -upstart package(s) work a little differently, by using:
    Code:
    start clamav-milter
    status clamav-milter
    stop clamav-milter
    I believe upstart was introduced in Fedora 9. I haven't looked at it much, since it seems to work fine.


    The 'long' answer is:
    I have it working, but it did take some fiddling with.

    /usr/share/doc/clamav-milter-0.95.2/README.fedora tells what's needed to get it set-up. Basically, I had to edit:

    In /etc/clamd.d/scan.conf:
    Remove (or comment out) the 'Example' line.
    Uncomment the 'LocalSocket' line like:
    Code:
     LocalSocket /var/run/clamd.scan/clamd.sock
    I also uncommented the 'LogFile' line. I think I also had to:
    Code:
    touch /var/log/clamd.scan                  # create the log file
    chgrp clamscan /var/log/clamd.scan         # change the file's group
    chmod g+w /var/log/clamd.scan              # make it writeable by the group
    In /etc/mail/clamav-milter.conf:
    Remove (or comment out) the 'Example' line.
    Uncomment the 'MilterSocket' line like:
    Code:
    MilterSocket /var/run/clamav-milter/clamav-milter.socket
    Add a 'ClamdSocket' line like:
    Code:
    ClamdSocket unix:/var/run/clamd.scan/clamd.sock
    The example 'ClamdSocket' line listed in the file is somewhat different from what's needed. It needs to match the 'LocalSocket' line in /etc/clam.d/scan.conf.

    I also added a line:
    Code:
    AddHeader Add
    So it adds 'X-Virus-Status:' and 'X-Virus-Scanned:' headers to the e-mails (so I would know it was working).

    Finally, in /etc/mail/sendmail.mc:
    Add a line like:
    Code:
    INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav-milter.socket, F=, T=S:4m;R:4m')dnl
    This needs to match the 'MilterSocket' line in /etc/mail/clamav-milter.conf.

    /usr/share/doc/clamav-milter-0.95.2/README.fedora gives the details if you want to run them on different machines.

    To rebuild /etc/mail/sendmail.mc:
    Code:
    cd /etc/mail
    make
    You'll also need the sendmail-cf package, if you don't already have it.

    Since I used the upstart packages, I also had to edit /etc/event.d/clamd.scan and /etc/event.d/clamav-milter (see the comments in those files) and then enter:
    Code:
    start clamd.scan
    start clamav-milter
    If you use the -sysvinit packages, you can (probably):
    Code:
    service clamd.scan start
    service clamav-milter start
    And (re)start sendmail
    Code:
    service sendmail start

  3. #3
    Join Date
    Nov 2008
    Location
    Guelph (pronounced Gwe-ELF), Ontario , Canada
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a bunch Cazo

Similar Threads

  1. clamav-milter
    By wgh in forum Using Fedora
    Replies: 3
    Last Post: 18th June 2006, 11:42 AM
  2. Clamav, clamav-milter, Sendmail
    By kafsar in forum Using Fedora
    Replies: 5
    Last Post: 28th February 2005, 04:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •