AV scanning on all email using free Virtualmin

Howdy,

Okay, that’s a bit different than the default one these days – if you installed in some manner other than using the install.sh script, you’ll need to double-check that all the programs in use below exist on your system.

However, this is what my procmailrc looks like on my system:

LOGFILE=/var/log/procmail.log TRAP=/etc/webmin/virtual-server/procmail-logger.pl :0wi VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME :0 * ?/usr/bin/test "$VIRTUALMIN" != "" { INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN } ORGMAIL=$HOME/Maildir/ DEFAULT=$HOME/Maildir/ DROPPRIVS=yes :0 $DEFAULT

Howdy,

Okay, that’s a bit different than the default one these days – if you installed in some manner other than using the install.sh script, you’ll need to double-check that all the programs in use below exist on your system.

However, this is what my procmailrc looks like on my system:

[code:1]
LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

  • ?/usr/bin/test "$VIRTUALMIN" != ""
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    ORGMAIL=$HOME/Maildir/
    DEFAULT=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT
    [/code:1]
Oh, is working already, and I don't even remember how I installed it in the first place. Anyway, coming back to the issue: What do I have to do now to enable the spam&virus check?

You’re not making any sense. You say it’s working? But then you ask how?

So confusing for my tired old brain.

But, I’m guessing you want to use the Virtualmin standard tools for processing mail rather than the stuff you setup yourself in Webmin’s SpamAssassin module.

If so, get rid of procmailrc, and replace it with this:

LOGFILE=/var/log/procmail.log
TRAP=/usr/libexec/webmin/virtual-server/procmail-logger.pl
VERBOSE=true

:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

  • ?test "$VIRTUALMIN" != ""
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    DROPPRIVS=yes
    DEFAULT=$HOME/Maildir/
    ORGMAIL=$HOME/Maildir/

Then you should be able to use the spam/AV features of the GUI to turn on/off the stuff you want. I’m not sure if anything else needs to be done (it’s been years since I’ve setup a system manually, I always use the install script). But fix that, and we’ll tackle whatever other problems come up.

ok guys after doing alot of reading,ESPICALY THIS POST!! i now could enable spam filtering and virus in virtualmin!!this is what happens when i do rechekc and config check.look below

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active …

  Mail server Postfix is installed and configured.

  Logrotate is installed.

  SpamAssassin and Procmail are installed and configured for use.

  ClamAV is installed and assumed to be running.

  Using network interface eth0 for virtual IPs.

  Default IP address for virtual servers is 196.41.26.105.

  Quotas are not enabled on the filesystem / which contains email files under /var/spool/mail. Quota editing for email has been disabled.

  All commands needed to create and restore backups are installed.

… your system is ready for use by Virtualmin

What need i need info on now is.Ho do i know if it is acualy working?Where do i see what is beign blocked.And hows does spamassin decide what to block and let through?And where can i see what is begin blocked?Pls i think i am so close!

spoke to soon,no mails get deliverd i think it sgo to do with the mailbox_command in mail.cf which is set to
/usr/bin/procmail.any help pls what should it be for virtual servers?any ideas?

I did the install through the install.sh script and ran in the same problem.

If you go to Webmin > Servers > Procmail Mail Filter and remove the 2 lines regarding ClamAV and Spam, then you’ll be able to enable Spam and A/V protections in the plugins list of Virtualmin.