Maintenance Scripts

Maia Mailguard is mostly PHP-based, but it does rely on a few Perl scripts to run on the machine(s) where amavisd-maia and SpamAssassin are installed. Additionally, a couple of PHP scripts installed in the /admin subdirectory on the web server help make the process of upgrading easier.

Perl Scripts

The Perl scripts all share the /etc/maia.conf configuration file. The most important settings in the /etc/maia.conf file are the ones that determine how the scripts should connect to your Maia database.

For MySQL:

# 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";

For PostgreSQL:

# Configure your Maia database DSN here
$dsn = "DBI:Pg:dbname=maia;host=localhost;port=5432";

# Your Maia database user's login name
$username = "amavis";

# Your Maia database user's password
$password = "passwd";

You'll also want to tell Maia where you installed the maintenance scripts:

# The directory where Maia's Perl scripts can be found.
$script_dir = "/var/amavisd/maia/scripts";

More detailed information about each of the scripts can be found on the individual wiki pages below:

PHP Scripts

The PHP scripts are located in the /admin subdirectory of your web server's Maia Mailguard installation, and can be invoked by visiting them with a web browser. Since these scripts are mainly intended to help you get Maia Mailguard installed in the first place, you should either delete the /admin subdirectory when you're done, or make that subdirectory a password-protected part of your website.