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

Dedicated Mail Server Hosting Multiple Domains - Step 6 - Webmail

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
  • Flash Tasmota on the Sonoff Mini – Linux user experience
  • DokuWiki a simple solution to sorting documentation
  • I discovered Wireguard
  • Using Let’s Encrypt with CentOS (for now)
  • Let’s Encrypt is Trusted
Categories
  • from the web
  • just blog
  • linux
    • Mail Server Series
  • News
  • phones
  • Phones & Tablets
  • programing
  • security
  • Smart Home
  • Tips & Tricks
  • Uncategorized
  • Web development
  • Windows
Blogroll
  • cheriches.fr
Subscribe by Email
Recent Posts
  • Flash Tasmota on the Sonoff Mini – Linux user experience
  • DokuWiki a simple solution to sorting documentation
  • I discovered Wireguard
  • Using Let’s Encrypt with CentOS (for now)
  • Let’s Encrypt is Trusted
Categories
  • from the web (3)
  • just blog (1)
  • linux (23)
    • Mail Server Series (7)
  • News (1)
  • phones (1)
  • Phones & Tablets (2)
  • programing (1)
  • security (2)
  • Smart Home (1)
  • Tips & Tricks (15)
  • Uncategorized (3)
  • Web development (1)
  • Windows (1)
Blogroll
  • cheriches.fr
Tags cloud
adb ADS aircrack-ng Android Apache apt-get CentOS Chrome ClamAV Cluster CSS Debconf debian DKIM Dovecot EasyRSA EPEL Firefox Firewall GNOME High Availability iptables KVM linux MariaDB Milter MySQL Nginx php Postfix Postfix Admin Proxy_ARP Python release Roundcube Samba SELinux Sonoff SpamAssassin ssh Tasmota ubuntu VRRP windows Youtube
Recent Comments
  • Frank on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Andrew Schott on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Emil C on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Andrew Schott on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Emil C on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
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}