This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

AMaViS

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.2 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Introduction

Our patched version of AMaViS was the official way to handle CiviMail's return channel up until CiviCRM 2.2 - for CiviCRM 2.2+, the official solution is CiviMail Processor.

Still, the AMaViS solution is supported for those who want to have a realtime-like solution for CiviMail (un-, re-)subscribes, bounces, etc.

Installation

Install AMaViS on your system; for Debian/Ubuntu systems, this is as easy as apt-get install amavisd-new (other systems with package managers should work similarly). For other systems, refer to the AMaViS home page.

Once installed, overwrite the main 'binary' with the appropriate version from our repository (note that on Debian/Ubuntu systems this binary is called /usr/sbin/amavisd-new).

Configuration

Debian/Ubuntu Systems

Copy the config file to /etc/amavis/conf.d and edit to your liking. The login and password for the SOAP interface must be your Drupal/Joomla login for a user with CiviMail access privileges. Also, make sure you point $civicrm_soap_proxy to the proper CiviCRM instance.

Other Systems

If your copy of AMaViS installed with the conf.d directory (under /etc/amavis or /usr/local/etc/amavis), copy the config file there and edit to your liking. The login and password for the SOAP interface must be your Drupal/Joomla login for a user with CiviMail access privileges. Also, make sure you point $civicrm_soap_proxy to the proper CiviCRM instance.

If your copy of AMaViS did not install with the conf.d directory (under /etc/amavis or /usr/local/etc/amavis), append the contents of the config file file to your amavisd.conf file and adjust to your liking. The login and password for the SOAP interface must be your Drupal/Joomla login for a user with CiviMail access privileges. Also, make sure you point $civicrm_soap_proxy to the proper CiviCRM instance.

Postfix

Install Postfix as per your distribution (Debian/Ubuntu: install the postfix package).

Create a user in your system (for example, civimail).

Configuration Paths

In the below examples, adjust the configuation path to your system's specifics (for example, /usr/local/etc/postfix instead of /etc/postfix).

virtual

Create an /etc/postfix/virtual file that will forward the CiviMail-targeted email to the civimail account:

/etc/postfix/virtual

Compile the file with the `postmap virtual` command.

main.cf

Append the following to the main.cf file to make Postfix use the virtual aliases and pass emails through AMaViS listening on port 10024:

/etc/postfix/main.cf

master.cf

Append the following to the master.cf file to make Postfix listen on port 10025 and not pass the mails received there to AMaViS (for outbound mail):

/etc/postfix/master.cf

Restart Postfix and AMaViS

Debian/Ubuntu Systems

Restart Postfix and AMaViS with the `/etc/init.d/postfix restart` and `/etc/init.d/amavis restart` commands.

Other Systems

Restart Postfix and AMaViS according to their scripts in your system (for example, use `/usr/local/etc/rc.d/postfix.sh restart` and `/etc/rc.d/amavisd restart`).

Setting Up the Cron Job

To have your mailing actually send, set up a cron job that will periodically poke CiviMail to send all of the mailings that are past their scheduled date. An example cron job can be found in our repository. This file should also be in your civicrm distro: look for bin/civimail.cronjob.php.

Since CiviCRM 1.8 the scripts in the bin/ directory are authenticated against a valid CMS user account before running the script. If your preference is to run the scripts from the command line, you'll need to pass or hard code a username and password.  Starting with versions 2.0.7 and 2.1.2, you will also need to configure a site key to run this script (learn more...).

You can call the script with wget like this:

The user and password values must be the user name and password of a Drupal/Joomla user that has permissions to access CiviCRM and CiviMail.

Note, if you are using Joomla, the com_civicrm that you might have created in your webroot while uploading and/or installing the component IS NOT the path/to/civicrm, which should look something like:

For testing, you should be able to get this URL to fire off any pending jobs by running it in your browser. If that works, the easiest way to get cron firing is to just put the wget in front and add the quotes around the URL.

If you use cPanel, this is really easy. Click Cron jobs on the cPanel home page, and put the wget string, just like above, but with your user and pass, and path, into the Command to run: field, and set the time preferences below for how often you want the cron to run.

You can also trigger CiviMail to send scheduled mailings by navigating to this URL with your browser:

Changing the Outgoing SMTP Port

If you don't want your outgoing mail to go through AMaViS (which is undesirable), you may now change the outgoing SMTP port. Go to Administer CiviCRM → Global Settings → SMTP Server and insert 10025 as the SMTP Port value.

Labels:

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.