Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Installing Maia Mailguard On Debian Lenny (Virtual Users/Domains With Postfix/MySQL)


This guide explains how to install Maia Mailguard, a spam and virus management system, on a Debian Lenny mailserver. Maia Mailguard is a web-based interface and management system based on the popular amavisd-new email scanner and SpamAssassin. Written in Perl and PHP, Maia Mailguard gives end-users control over how their mail is processed by virus scanners and spam filters, while giving mail administrators the power to configure site-wide defaults and limits.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

This tutorial is based on Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Lenny), so you should have this set up already. If your mail setup is different, this tutorial might not work out for you, or you might have to make some adjustments.

My server has the hostname server1.example.com and the IP address 192.168.0.100. I will install Maia’s web interface in Debian’s default Apache document root, /var/www, and I will use www.example.com to access the web interface. You will have to adjust this if your document root and your domain differ.

 

2 Downloading Maia Mailguard

Maia Mailguard can be downloaded from SVN only, so we have to install Subversion first:

aptitude install subversion

I want to download the sources to /usr/src/maia:

mkdir /usr/src/maia
cd /usr/src/maia

Open a browser and go to https://www.maiamailguard.com/svn/branches/1.0 to find out what the latest revision is – in my case it was 1495. Then start the download as follows:

svn -r 1495 checkout https://www.maiamailguard.com/svn/branches/1.0

(Make sure you replace 1495 with the latest revision.)

 

3 Creating A Database For Maia Mailguard

Next log into MySQL…

mysql -u root -p

… and create a database called maia:

CREATE DATABASE maia;

Leave the MySQL shell afterwards:

quit;

Import Maia’s SQL dump into the empty maia database:

cd /usr/src/maia/1.0/
mysql -u root -p maia < maia-mysql.sql

Then log into MySQL again…

mysql -u root -p maia

… and create a MySQL user called amavis:

GRANT CREATE, DROP, ALTER, SELECT, INSERT, UPDATE, DELETE ON maia.* TO amavis@localhost IDENTIFIED BY ‘passwd’;

FLUSH PRIVILEGES;

quit;

(You can replace passwd with a password of your choice, but keep in mind that you have to use that password later on in the Maia configuration!)

Next make sure you have a big enough value for max_allowed_packet in your /etc/mysql/my.cnf (in the [mysqld] section). This setting determines the size of the largest mail item you’ll be able to process with Maia, so make sure to set this value large enough to accommodate your needs.

vi /etc/mysql/my.cnf

[...]
[mysqld]
[...]
max_allowed_packet      = 16M
[...]

Restart MySQL if you have changed the value of max_allowed_packet:

/etc/init.d/mysql restart

 

4 Installing Maia’s Scripts And Templates

The home directory of the amavis user on Debian Lenny is /var/lib/amavis, and that’s where we create a subdirectory called maia. In that subdirectory we will place Maia’s scripts and templates:

mkdir /var/lib/amavis/maia
mkdir /var/lib/amavis/maia/scripts
mkdir /var/lib/amavis/maia/templates

cp -pfr /usr/src/maia/1.0/scripts/* /var/lib/amavis/maia/scripts
cp -pfr /usr/src/maia/1.0/templates/* /var/lib/amavis/maia/templates

chown -R amavis /var/lib/amavis/maia
chgrp -R amavis /var/lib/amavis/maia
chmod 640 /var/lib/amavis/maia/templates/*.tpl
chmod 750 /var/lib/amavis/maia/scripts/*.pl

 

5 Configuring Maia

Next we rename /usr/src/maia/1.0/maia.conf.dist to /etc/maia.conf:

cp /usr/src/maia/1.0/maia.conf.dist /etc/maia.conf
chown amavis /etc/maia.conf
chgrp amavis /etc/maia.conf
chmod 640 /etc/maia.conf

Open /etc/maia.conf and adjust the following settings:

vi /etc/maia.conf

[...]
# Configure your Maia database DSN here
$dsn = "DBI:mysql:maia:localhost:3306";
# Your Maia database user's login name
$username = "amavis";
# Your Maia database user's password
$password = "passwd";
# The directory where Maia's Perl scripts can be found.
$script_dir = "/var/lib/amavis/maia/scripts";
[...]
# Location to write the lock/PID files (must be writeable by your
# amavis user)
$pid_dir = "/var/lib/amavis/";
[...]
# Base URL to Maia's PHP scripts
$base_url = "http://example.com/";
# Template directory
$template_dir = "/var/lib/amavis/maia/templates/";
[...]

Make sure you fill in the correct password for the MySQL user amavis in the $password line. Also fill in the correct URL in the $base_url line.

6 Maia Mailguard Configuration Test

Now run

cd /var/lib/amavis/maia/scripts/
./configtest.pl

This script checks if all Perl modules that are needed by amavisd-maia, SpamAssassin, and Maia Mailguard’s maintenance scripts are installed. For me the output was as follows:

server1:/var/lib/amavis/maia/scripts# ./configtest.pl

MAIA MAILGUARD CONFIGURATION TEST

This script checks for the presence of applications and Perl modules
required by amavisd-maia, SpamAssassin, and Maia Mailguard’s maintenance
scripts.  Version numbers are also checked, and if a newer version of
a component is recommended, you should consider upgrading to at least
the minimum recommended version.

If you have already configured your Maia Mailguard database, the script
will also test the connection to that database.

Remember also to run the configtest.php script on your web server to
perform similar tests of your web, PHP, and PEAR environment.

Application/Module      Version   Status
========================================================================
Perl                 :   5.10.0 : OK
file(1)              :     4.26 : OK
Archive::Tar         :     1.38 : OK
Archive::Zip         :     1.18 : OK
BerkeleyDB           :     0.34 : OK
Compress::Zlib       :    2.012 : OK
Convert::TNEF        :     0.17 : OK
Convert::UUlib       :     1.11 : OK
Crypt::Blowfish      :      N/A : NOT INSTALLED (Maia Mailguard’s optional encryption feature requires this)
Crypt::CBC           :      N/A : NOT INSTALLED (Maia Mailguard’s optional encryption feature requires this)
Crypt::OpenSSL::RSA  :      N/A : NOT INSTALLED (SpamAssassin’s optional DKIM plugin requires this)
Data::UUID           :      N/A : NOT INSTALLED (required by Maia Mailguard)
DB_File              :  1.816_1 : OK
DBD::mysql           :    4.007 : OK
DBD::Pg              :      N/A : NOT INSTALLED (required if you use PostgreSQL as your Maia Mailguard database)
DBI                  :    1.605 : OK
Digest::MD5          :  2.36_01 : OK
Digest::SHA1         :     2.11 : OK
File::Spec           :   3.2501 : OK
HTML::Parser         :     3.56 : OK
HTTP::Date           :    5.810 : OK
IO::Stringy          :    2.110 : OK
IO::Zlib             :     1.07 : OK
IP::Country          :      N/A : NOT INSTALLED (SpamAssassin’s optional RelayCountry plugin requires this)
LWP::UserAgent       :    5.813 : OK
Mail::Address        :     2.03 : OK
Mail::DKIM           :      N/A : NOT INSTALLED (SpamAssassin’s optional DKIM plugin requires this)
Mail::Internet       :     2.03 : OK
Mail::SpamAssassin   :    3.2.5 : OK
Mail::SPF::Query     :      N/A : NOT INSTALLED (SpamAssassin’s optional SPF plugin requires this)
MIME::Base64         :  3.07_01 : OK
MIME::Parser         :    5.427 : OK
MIME::QuotedPrint    :     3.07 : OK
Net::CIDR::Lite      :      N/A : NOT INSTALLED (SpamAssassin’s optional SPF plugin requires this)
Net::Cmd             :     2.29 : OK
Net::DNS             :     0.63 : OK
Net::Server          :     0.97 : OK
Net::SMTP            :     2.31 : OK
Pod::Usage           :     1.35 : OK
Template             :      N/A : NOT INSTALLED (required by Maia Mailguard)
Time::HiRes          :   1.9711 : OK
Unix::Syslog         :      1.1 : OK
URI                  :     1.35 : OK
Text::CSV            :      N/A : NOT INSTALLED (required by maiadbtool.pl)

Database DSN test    : PASSED

NOTE: When upgrading Perl to version 5.10 or planning to do so, please
do not forget to add a missing /m flag to regular expressions in your existing
AV entries, as suggested in the example file amavisd.conf.dist. Perl 5.8 does
not mind missing /m flags, but with perl 5.10 the results from a virus scanner
may no longer be properly recognized.
server1:/var/lib/amavis/maia/scripts#

As you see a few modules are missing. Most of them can be installed via aptitude:

aptitude install libcrypt-blowfish-perl libcrypt-cbc-perl libcrypt-openssl-rsa-perl libmail-dkim-perl libmail-spf-query-perl libnet-cidr-lite-perl libtemplate-perl libtext-csv-perl

IP::Country and Data::UUID are not available as Debian Lenny packages, so we must install them using the Perl shell:

perl -MCPAN -e shell

install IP::Country

install Data::UUID

Type

q

to leave the Perl shell afterwards.

Run

./configtest.pl

again – output should now be as follows:

server1:/var/lib/amavis/maia/scripts# ./configtest.pl

MAIA MAILGUARD CONFIGURATION TEST

This script checks for the presence of applications and Perl modules
required by amavisd-maia, SpamAssassin, and Maia Mailguard’s maintenance
scripts.  Version numbers are also checked, and if a newer version of
a component is recommended, you should consider upgrading to at least
the minimum recommended version.

If you have already configured your Maia Mailguard database, the script
will also test the connection to that database.

Remember also to run the configtest.php script on your web server to
perform similar tests of your web, PHP, and PEAR environment.

Application/Module      Version   Status
========================================================================
Perl                 :   5.10.0 : OK
file(1)              :     4.26 : OK
Archive::Tar         :     1.38 : OK
Archive::Zip         :     1.18 : OK
BerkeleyDB           :     0.34 : OK
Compress::Zlib       :    2.012 : OK
Convert::TNEF        :     0.17 : OK
Convert::UUlib       :     1.11 : OK
Crypt::Blowfish      :     2.10 : OK
Crypt::CBC           :     2.29 : OK
Crypt::OpenSSL::RSA  :     0.25 : OK
Data::UUID           :    1.215 : OK
DB_File              :  1.816_1 : OK
DBD::mysql           :    4.007 : OK
DBD::Pg              :      N/A : NOT INSTALLED (required if you use PostgreSQL as your Maia Mailguard database)
DBI                  :    1.605 : OK
Digest::MD5          :  2.36_01 : OK
Digest::SHA1         :     2.11 : OK
File::Spec           :   3.2501 : OK
HTML::Parser         :     3.56 : OK
HTTP::Date           :    5.810 : OK
IO::Stringy          :    2.110 : OK
IO::Zlib             :     1.07 : OK
IP::Country          :     2.27 : OK
LWP::UserAgent       :    5.813 : OK
Mail::Address        :     2.03 : OK
Mail::DKIM           :     0.32 : OK
Mail::Internet       :     2.03 : OK
Mail::SpamAssassin   :    3.2.5 : OK
Mail::SPF::Query     :  1.999.1 : OK
MIME::Base64         :  3.07_01 : OK
MIME::Parser         :    5.427 : OK
MIME::QuotedPrint    :     3.07 : OK
Net::CIDR::Lite      :     0.20 : OK
Net::Cmd             :     2.29 : OK
Net::DNS             :     0.63 : OK
Net::Server          :     0.97 : OK
Net::SMTP            :     2.31 : OK
Pod::Usage           :     1.35 : OK
Template             :     2.19 : OK
Time::HiRes          :   1.9711 : OK
Unix::Syslog         :      1.1 : OK
URI                  :     1.35 : OK
Text::CSV            :     1.06 : OK

Database DSN test    : PASSED

NOTE: When upgrading Perl to version 5.10 or planning to do so, please
do not forget to add a missing /m flag to regular expressions in your existing
AV entries, as suggested in the example file amavisd.conf.dist. Perl 5.8 does
not mind missing /m flags, but with perl 5.10 the results from a virus scanner
may no longer be properly recognized.
server1:/var/lib/amavis/maia/scripts#

Since we are using MySQL and not PostgreSQL, we don’t need the DBD::Pg module.

 

7 Loading SpamAssassin Rules

Maia Mailguard needs to index all of the SpamAssassin rules you have installed on your system. This can be done as follows:

./load-sa-rules.pl –debug

This should be done again whenever your SpamAssassin rules are updated. If you’ve followed the Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Lenny) tutorial, you have the following cron job on your system:

23 4 */2 * * /usr/bin/sa-update –no-gpg &> /dev/null

Run

crontab -e

to modify that cron job so that it looks as follows:

23 4 */2 * * /usr/bin/sa-update --no-gpg && /var/lib/amavis/maia/scripts/load-sa-rules.pl && /etc/init.d/amavis restart &> /dev/null

 

8 Installing The Maia Mailguard Web Interface

I want to install Maia’s web interface in /var/www/maia so that it can be accessed via http://www.example.com/maia (please adjust the path if your document root is different from /var/www). Therefore I create that directory now and copy Maia’s web interface to it:

mkdir /var/www/maia
cp -pfr /usr/src/maia/1.0/php/* /var/www/maia/

Certain subdirectories of the /var/www/maia/themes directory must be writable by the Apache user. This can be achieved as follows:

chgrp amavis /var/www/maia/themes/*/compiled
chmod 775 /var/www/maia/themes/*/compiled
gpasswd -a www-data amavis

Maia’s web interface uses the Smarty template engine which can be installed as follows:

aptitude install smarty

ln -s /usr/share/php/smarty/libs /usr/share/php/Smarty

Next we rename /var/www/maia/config.php.dist to /var/www/maia/config.php

mv /var/www/maia/config.php.dist /var/www/maia/config.php

… and change the following settings:

vi /var/www/maia/config.php

[...]
    $maia_sql_dsn = "mysql://amavis:passwd@tcp(localhost:3306)/maia";
[...]
    $address_rewriting_type = 4;
[...]
    // Select an authentication method from one of the following:
    //
    //    "pop3"     - use a POP3 server to authenticate
    //    "imap"     - use an IMAP server to authenticate
    //    "ldap"     - use an LDAP server to authenticate
    //    "exchange" - use an Exchange Server to authenticate
    //    "sql"      - use a SQL database server to authenticate
    //    "internal" - use Maia's internal SQL database to authenticate
    $auth_method = "pop3";
[...]

Run

chmod 0640 /var/www/maia/config.php
chown root:www-data /var/www/maia/config.php

afterwards.

 

9 Testing Your PHP Configuration

Open a browser and go to http://www.example.com/maia/admin/configtest.php. This page tells you if all needed PHP modules are installed:

1

If modules are missing, you must install them now. I had to do the following to install the missing modules:

aptitude install php-pear

pear channel-update pear.php.net

pear install Mail_Mime
pear install Mail_mimeDecode
pear install Pager
pear install Net_Socket
pear install Net_SMTP
pear install Auth_SASL
pear install Net_IMAP
pear install Net_POP3
pear install Log
pear install Image_Color
pear install Image_Canvas-0.3.1
pear install Image_Graph-0.7.2

cd /usr/share/php/Image/Graph/Plot/
cp Pie.php Pie.php.original
wget http://www.maiamailguard.org/maia/raw-attachment/ticket/326/Pie.php.patch
patch -p0<Pie.php.patch

pear install Numbers_Roman
pear install Numbers_Words-0.16.1

pear channel-discover htmlpurifier.org
pear install hp/HTMLPurifier

aptitude install php5-imap php5-ldap php5-mcrypt

/etc/init.d/apache2 restart

Now reload http://www.example.com/maia/admin/configtest.php – all required modules should now be installed:

2

10 Configuring Amavisd-new

Maia Mailguard comes with its own amavisd-new configuration and amavisd binary, so we must replace our existing amavisd-new with it.

First stop your current amavisd processes:

/etc/init.d/amavis stop

We copy amavisd-maia to /usr/local/sbin/amavisd-new

cd /usr/src/maia/1.0/
cp amavisd-maia /usr/local/sbin/amavisd-new
chown root /usr/local/sbin/amavisd-new
chmod 755 /usr/local/sbin/amavisd-new

… and adjust our /etc/init.d/amavis init script as follows:

vi /etc/init.d/amavis

[...]
#DAEMON=/usr/sbin/amavisd-new
DAEMON=/usr/local/sbin/amavisd-new
[...]
#START="--start --quiet --pidfile /var/run/amavis/${NAME}.pid --name ${DAEMONNAME} --startas ${DAEMON}"
#STOP="--stop --quiet --pidfile /var/run/amavis/${NAME}.pid --name ${DAEMONNAME}"
START="--start --quiet --pidfile /var/lib/amavis/${NAME}.pid --name ${DAEMONNAME} --startas ${DAEMON}"
STOP="--stop --quiet --pidfile /var/lib/amavis/${NAME}.pid --name ${DAEMONNAME}"
[...]

Then we copy /usr/src/maia/1.0/amavisd.conf.dist to /etc/amavisd.conf

cp /usr/src/maia/1.0/amavisd.conf.dist /etc/amavisd.conf

… and edit that file:

vi /etc/amavisd.conf

[...]
$mydomain = 'localhost';
#$mydomain = 'yourdomain.tld'; # a convenient default for other settings

$MYHOME   = '/var/lib/amavis';
#$MYHOME   = '/var/amavisd';   # a convenient default for other settings
[...]
$log_level = 5;
#$log_level = 0;              # verbosity 0..5
[...]
# Database connection string
@lookup_sql_dsn = ( ['DBI:mysql:maia:localhost', 'amavis', 'passwd'] );
[...]
$myhostname = 'server1.example.com';
#$myhostname = 'host.domain.tld';  # must be a fully-qualified domain name!
[...]
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_DISCARD;
$final_spam_destiny       = D_DISCARD;
$final_bad_header_destiny = D_DISCARD;
[...]
# See https://secure.renaissoft.com/maia/wiki/VirusScannerConfig
# for more virus scanner definitions.
@av_scanners = (

### http://www.clamav.net/
['ClamAV-clamd',
   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
   qr/\bOK$/m, qr/\bFOUND$/m,
   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# NOTE: run clamd under the same user as amavisd;  match the socket
# name (LocalSocket) in clamav.conf to the socket name in this entry
# When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],

);
[...]

Make sure you fill in the correct password for the amavis MySQL user in the @lookup_sql_dsn line. In the ClamAV-clamd stanza, you must change the socket – the correct socket on Debian Lenny is /var/run/clamav/clamd.ctl.

Start amavisd afterwards:

/etc/init.d/amavis start

You should now check /var/lib/amavis/amavis.log for errors – please make sure that the database connection is working.

 

11 Log Into Maia Mailguard

You can now access Maia Mailguard under http://www.example.com/maia/ – this is where you and your users can log in with an existing email address/password:

3

If you use Maia Mailguard for the first time, you should register yourself as the Maia super-administrator. Go to http://www.example.com/maia/login.php?super=register and log in with your existing email address and password – this will automatically make you the super-administrator of the Maia system:

4

As super-administrator, you have all the privileges of administrators (e.g. “impersonating” other users, and deleting users), but also the ability to grant administrator privileges to others (and revoke them, if desired).

Should the super-administrator ever wish to give up his privileges, he has to do so by logging in at http://www.example.com/maia/login.php?super=unregister (after a super-administrator “unregisters” himself, the system effectively has no super-administrator, so the next user to login with the ?super=register argument will become the super-administrator).

After your login, you should read the notes on the welcome page:

5

At the bottom of the welcome page, you can set your protection level (this is only for the account that you used to log in – each user can set his protection level individually). High is recommended:

6

 

These are the available protection levels:

Off:

Pass viruses through? Y
Pass spam through? Y
Pass banned files through? Y
Pass mail with invalid headers through? Y
Disable virus scanning? Y
Disable spam checking? Y
Disable banned files checking? Y
Disable invalid header checking? Y
Discard viruses? N
Discard spam? N
Discard banned files? N
Discard invalid mail headers? N
Add a prefix to spam subjects? N
Add spam score headers when score is >= 999
Consider mail spam when score is >= 999
Quarantine or discard spam when score is >= 999

Low:

Pass viruses through? N
Pass spam through? Y
Pass banned files through? Y
Pass mail with invalid headers through? Y
Disable virus scanning? N
Disable spam checking? Y
Disable banned files checking? Y
Disable invalid header checking? Y
Discard viruses? N

 

Discard spam? N
Discard banned files? N
Discard invalid mail headers? N
Add a prefix to spam subjects? N
Add spam score headers when score is >= 999
Consider mail spam when score is >= 999
Quarantine or discard spam when score is >= 999

Medium:

Pass viruses through? N
Pass spam through? N
Pass banned files through? Y
Pass mail with invalid headers through? Y
Disable virus scanning? N
Disable spam checking? N
Disable banned files checking? Y
Disable invalid header checking? Y
Discard viruses? N
Discard spam? N
Discard banned files? N
Discard invalid mail headers? N
Add a prefix to spam subjects? Y
Add spam score headers when score is >= 5
Consider mail spam when score is >= 999
Quarantine or discard spam when score is >= 999

High:

Pass viruses through? N
Pass spam through? N
Pass banned files through? N
Pass mail with invalid headers through? N
Disable virus scanning? N
Disable spam checking? N
Disable banned files checking? N
Disable invalid header checking? N
Discard viruses? N
Discard spam? N
Discard banned files? N
Discard invalid mail headers? N
Add a prefix to spam subjects? N
Add spam score headers when score is >= 1
Consider mail spam when score is >= 5
Quarantine or discard spam when score is >= 5

 

You should read the help page to learn how to use Maia Mailguard:

7

Here’s the settings page for your mail account:

8

While you browse the Maia web interface, you might encounter some fatal PHP errors, such as this one:

Fatal error: Call to undefined function subtr() in /var/www/maia/wblist.php on line 190

9

I had to fix the following files to make these errors go away:

vi /var/www/maia/wblist.php

In line 190, there’s the line

if (subtr(get_database_type($dbh),0,5) == “mysql”) {

The function must be substr, not subtr:

[...]
  //if (subtr(get_database_type($dbh),0,5) == "mysql") {
  if (substr(get_database_type($dbh),0,5) == "mysql") {
[...]

Fatal error: Call to undefined function subtr() in /var/www/maia/cache.php on line 238

Again, we have this subtr error, so change subtr to substr in /var/www/maia/cache.php on line 238:

vi /var/www/maia/cache.php

[...]
        if (substr(get_database_type($this->dbtype),0,5) == "mysql") {
[...]

Fatal error: Call to undefined function response_text() in /var/www/maia/cache.php on line 406

This error can be fixed by simply commenting out line 406:

vi /var/www/maia/cache.php

[...]
        //$this->smarty->assign("actionlang", response_text($this->type));
[...]

Fatal error: Call to undefined function subtr() in /var/www/maia/maia_db.php on line 1954

Here we have the subtr error again – replace subtr with substr:

vi /var/www/maia/maia_db.php

[...]
        if (substr(get_database_type($dbh),0,5) == "mysql") {
[...]

Here are a few more screenshots of the Maia Mailguard interface. Here you can whitelist and blacklist email addresses:

10

Here’s the statistics page:

11

From the statistics page, you can access your spam and virus mails – they are quarantined, and it’s possible to rescue these mails from the quarantine (they will then be delivered to your mailbox), to delete them, or to confirm their status:

12

13

14

15

12 Creating Cron Jobs For Maia’s Maintenance Scripts

Maia Mailguard comes with some maintenance scripts that need to be run regularly. It’s best to set up cron jobs that are run by the user amavis:

crontab -u amavis -e

10 * * * * /var/lib/amavis/maia/scripts/process-quarantine.pl &> /dev/null
@hourly /var/lib/amavis/maia/scripts/stats-snapshot.pl &> /dev/null
@daily /var/lib/amavis/maia/scripts/expire-quarantine-cache.pl &> /dev/null
@weekly /var/lib/amavis/maia/scripts/send-quarantine-reminders.pl &> /dev/null
*/10 * * * * /var/lib/amavis/maia/scripts/send-quarantine-digests.pl &> /dev/null

 

13 Deleting The /var/www/maia/admin Subdirectory

Now that Maia Mailguard is up and running properly, you should delete the /var/www/maia/admin subdirectory for security reasons:

rm -fr /var/www/maia/admin

 

14 Modifying Email Templates

If you like, you can modify the email templates for emails to users whose quarantines/caches start to get large (/var/lib/amavis/maia/templates/reminder.tpl) and for new users (/var/lib/amavis/maia/templates/newuser.tpl).

The following variables are available for /var/lib/amavis/maia/templates/reminder.tpl:

Placeholder Expands To
%%VIRUSCOUNT%% Number of viruses in quarantine
%%SPAMCOUNT%% Number of suspected spam items in quarantine
%%BANNEDCOUNT%% Number of items with banned file attachments in quarantine
%%HEADERCOUNT%% Number of items with invalid mail headers in quarantine
%%VIRUSSIZE%% Total size of all viruses in quarantine
%%SPAMSIZE%% Total size of all suspected spam items in quarantine
%%BANNEDSIZE%% Total size of all items with banned file attachments in quarantine
%%HEADERSIZE%% Total size of all items with invalid mail headers in quarantine
%%MAIAURL%% URL users should visit to log into Maia Mailguard
%%ADMINEMAIL%% Email address of the mail administrator
%%EXPIRYPERIOD%% Number of days items are allowed to live in quarantine
%%OLDESTITEMTTL%% Number of days before the oldest quarantined item is deleted
%%OLDESTITEMAGE%% Age (in days) of the oldest item in quarantine

The following variables are available for /var/lib/amavis/maia/templates/newuser.tpl:

Placeholder Expands To
%%LOGIN%% The new user’s temporary login name
%%PASSWORD%% The new user’s temporary password
%%LOGINURL%% URL users should visit to login to Maia Mailguard
%%ADMINEMAIL%% Email address of the mail administrator

 

  • Maia Mailguard: http://www.maiamailguard.com/
  • Debian: http://www.debian.org/

 

Comments

comments