Clamav issues Base 1GB Linode with UBUNTU 20.04

Hi,

I was looking to move from a virtual web/email host to Linode as I liked the idea of building and maintaining a server from scratch. At USD5pm, the price point is about the same at a half decent virtual webhost.

On top of the LAMP stack, I installed Postfix, Dovecot, Portgrey, Clam, Amavis, Spamassassin, openDKIM. There were some issues with SSL/TLS certificates, but all resolved once my nameservers were pointed to the Linode nameservers.

It looks like the 1GB RAM on the base Linode isn't sufficient to run Clam (clamav/clamav-daemon) and they get killed by the OS. There doesn't seem to be way of increasing the swap size.

I realise that Clam is a resource hungry beast, but I don't want to be running an incoming mail server without some sort of anti virus, and the option of moving to a bigger Linode doesn't seem cost effective.

Has anyone else come across this and have a solution or workaround?

Many thanks

Gordon

2 Replies

Hi Gordon,

You can increase swap size by resizing your disk. You can increase swap if you reduce the size of your system disk.

Also, there's a nice workaround a colleague put together that will make a swap file for you if you'd rather not resize:

https://bits.linode.com/gist/bfuller/fc9e38bcce709dd493657fab830fe3d8#file-clamav-sh-L11

To give you an alternative to ClamAV, when it comes to scanning I personally use RKHunter - it's pretty easy to install and runs very well. Here are the steps to install:

apt update
apt install rkhunter -y
sed -i 's/WEB_CMD="\/bin\/false"/#WEB_CMD="\/bin\/false"/' /etc/rkhunter.conf
sed -i 's/UPDATE_MIRRORS=0/UPDATE_MIRRORS=1/' /etc/rkhunter.conf
sed -i 's/MIRRORS_MODE=1/MIRRORS_MODE=0/' /etc/rkhunter.conf
sed -i '542 i USER_FILEPROP_FILES_DIRS=/media/sda/*' /etc/rkhunter.conf
mkdir -p /media/sda
mount -o barrier=0 /dev/sda /media/sda
rkhunter --update
rkhunter --propupd
rkhunter --check --sk.

You can check for scan info in /var/log/rkhunter.log

Just wanted to give you some options. Let us know how this all works for you.

Use https://sourceforge.net/projects/assp/ for spam and virus scaning.

ClamAV use like 1gb ram on my server.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct