Emil CHERICHES

Emil CHERICHES

ClamAV Milter

September 16, 2014 Emil C
1 Comment

CentOS 7 – still discovering it. ClamAV & ClamAV Milter related things have changed a bit.

First of all, install what you need

yum install clamav-milter-systemd clamav-scanner-systemd

Then, there’s no configuration file.

cp /usr/share/doc/clamav-server-0.98.4/clamd.conf /etc/clamd.d/clamd.conf

Now edit the file, like so:

# Example
LogSyslog yes
DatabaseDirectory /var/lib/clamav
TCPSocket 3310
TCPAddr 127.0.0.1
User clamscan
AllowSupplementaryGroups yes

Start it with

systemctl restart clamd@clamd.service

Now ClamAV Milter, edit config file /etc/mail/clamav-milter.conf

# Example
MilterSocket inet:8894
User clamilt
AllowSupplementaryGroups yes
ClamdSocket tcp:127.0.0.1:3310
LogSyslog yes
OnClean Accept
OnInfected Reject
OnFail Defer

Add the 8894 port to SELinux cnfiguration

semanage port -a -t milter_port_t -p tcp 8894

Then restart ClamAV Milter

systemctl restart clamav-milter

And configure your MTA to use it. In Postfix, edit /etc/postfix/main.cf and to your smtpd_milters line add inet:127.0.0.1:8894 and restart Postfix.

Don’t forget to install freshclam, to be able to update your antivirus:

yum install clamav-update

Then edit /etc/sysconfig/freshclam and comment the line

# FRESHCLAM_DELAY=disabled-warn # REMOVE ME

In /etc/freshclam.conf comment the line Example

# Example

Now just run once:

freshclam
Mail Server Series ClamAVMilterPostfix
Previous Post

Hosting a Virtual Machine With a Public IP (proxy_arp)

Next Post

Quick TIP: Postfix Reverse lookup

  1. Bill P. December 4, 2014 at 8:42 am Reply

    2 things I hate:

    1. A blog that makes you fill in a bunch of garbage just to be able to comment.

    2. Making something like this seem easy when it’s not.

    I keep getting the “Please configure the MilterSocket directive” error message even though I’ve done it your way, my way and ten other ways besides. Any other ideas?

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts
  • DokuWiki a simple solution to sorting documentation
  • High Availability Load Balancer
  • Chasing Ads
  • Quick TIP: Postfix Reverse lookup
  • ClamAV Milter
Categories
  • from the web
  • just blog
  • linux
    • Mail Server Series
  • phones
  • Phones & Tablets
  • programing
  • security
  • Tips & Tricks
  • Uncategorized
  • Web development
  • Windows
Blogroll
  • cheriches.fr
Subscribe by Email
Recent Posts
  • DokuWiki a simple solution to sorting documentation
  • High Availability Load Balancer
  • Chasing Ads
  • Quick TIP: Postfix Reverse lookup
  • ClamAV Milter
Categories
  • from the web (3)
  • just blog (1)
  • linux (17)
    • Mail Server Series (1)
  • phones (1)
  • Phones & Tablets (2)
  • programing (1)
  • security (1)
  • Tips & Tricks (14)
  • Uncategorized (1)
  • Web development (1)
  • Windows (1)
Blogroll
  • cheriches.fr
Tags cloud
12.04 adb ADS Android Apache apt-get backports BlackBerry CentOS Chrome ClamAV Cluster CSS debian Dell dotdeb Eee PC Firefox FPM GNOME Hardware High Availability internet explorer javascript KVM linux MariaDB Milter MPM MySQL OpenVPN php piwik Postfix Proxy_ARP RedHat release RHEL Samba ubuntu VRRP wifi windows xp Youtube
Recent Comments
  • caviru on OpenVPN and Android
  • High Availability Load Balancer | Emil’s bits | LUG Mureş on High Availability Load Balancer
  • Bill P. on ClamAV Milter
  • Apache+Nginx+PHP на Debian 7 | tol1k's blog on Hosting Websites with Apache and Nginx on Debian Wheezy
  • tdreyer1 on OpenVPN and Android
Proudly powered by WordPress | Theme: Fmi by Forrss.
Manage Cookie Consent
We use cookies to optimize our website and our service.
Functional cookies Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}