So I set up a server using iRedMail and ran in to an issue: I started out with 768MB of memory and it was GONE!!! If you are going to install iRedMail and want to use all of the functionality, you need to start out with 2GB of memory at a minimum. It will use every bit of your available memory at that level! I could barely log into SSH to maintain my server at 768MB of memory.
iRedMail will still work after removing the spam component…but it will allow spam through. Since all my emails are forwarders to Gmail, I wasn’t really concerned about any spam getting through as I plan to rely on Gmail for that anyway.
Disable Amavis and ClamAV
Disabiling AmavisD and ClamAV will, by extension disable SpamAssassin since iRedMail does not invoke SpamAssassin itself but rather through AmavisD.
Step 1
Comment out the below lines in Postfix config file /etc/postfix/main.cf
content_filter = smtp-amavis:[127.0.0.1]:10024 receive_override_options = no_address_mappings
If you don’t have the second line in your file, it’s not a problem.
Step 2
Comment out the following line from Postfix config file /etc/postfix/master.cf
-o content_filter=smtp-amavis:[127.0.0.1]:10026
Step 3
Restart Postfix for the changes to take effect.
Step 4
Disable AmavisD and ClamAV services (Debian/Ubuntu)
sudo /etc/init.d/clamav-daemon stop sudo /etc/init.d/clamav-freshclam stop sudo /etc/init.d/amavis stop
Step 5
Prevent AmavisD and ClamAV services from booting on reboot
sudo update-rc.d -f clamav-daemon remove sudo update-rc.d -f clamav-freshclam remove sudo update-rc.d -f amavis remove
The normal mail functions should all work after these changes, but it disables all spam and virus filtering! Only do this if you know what you are doing! This gives me about 500MB of ram on my server and it runs considerably better now that this is gone!