CONTEXT
-------

On a typical Apache configuration, e-mail messages sent by content management
systems (CMS) such as Drupal/Wordpress/Spip are sent by a user such as www-data.

It often happens that such mails sent bounce. For example, spammers may be trying
to register to the website with a fake address, or a simplist newsletter feature
that does not manage bounces will not automatically unsubscribe users with 
addresses that no longer exist (or users that registered to the newsletter with
a typo in their address).

In typical configurations, such bounces are sent to the root alias of the system.
The administrators should check those e-mails regularly in order to notice if
there is a spam-run from an account (ex: compromised Joomla abused by spammers).

WHAT alternc-bounces DOES
-------------------------

It fetches the e-mails in a specific POP/IMAP mailbox and processes them in
order to extract the X-RealFrom and store the message in a database so that
the user from whom the bounce originated from may review the bounce.

INSTALLATION
------------

1- Create a fetchmailrc file in /etc/alternc/fetchmailrc-bounces

Example:

poll imap.example.net
        protocol imap
        user bounces@example.net
        password "myverysmartpassword"
        ssl
        mda "/usr/bin/alternc_bounces_process"

2- Add a cron entry for
  /usr/bin/alternc_bounces_process_wrapper

The script runs fetchmail one message at the time (because I did not
figure how to fetch many at the time and still parse where a new
message starts). It runs as many times as there are messages.

You might want to run the cron only once or twice a day.

AUTHOR
------

Mathieu Lutfy (Reseau Koumbit) mlutfy@koumbit.org