Project

General

Profile

Set up local bounce processing » History » Version 9

Joseph Lacey, 07/28/2016 03:43 PM

1 1 Jon Goldberg
h1. Set up local bounce processing
2
3
If you're setting up CiviMail, you'll need a bounce processing account on a system that supports subaddressing.  "GMail/Google Apps works for this":http://wiki.civicrm.org/confluence/display/CRMDOC/Step-by-step+Return+Channel+on+Drupal+-+Google+Apps+-+CentOS - Exchange and Office 365 do not.  So it's often desirable to set up your own server for bounce processing - it takes very little overhead, so you can run it on the same VPS that runs CiviCRM.
4
5 8 Jon Goldberg
* Create a user account: @useradd -s /dev/null -m civibounces@.  Also set the password with @passwd@.
6 1 Jon Goldberg
* Install Postfix: @apt-get install postfix@.  Select all the standard options.
7
* Make sure your DNS A and PTR records are set up properly!  You should also have an MX record, though you can get away with not having it if the domain's A record points to the server.
8
* Install Dovecot.  In theory this is unnecessary - you can specify a mailbox on localhost - but I've had less trouble with this approach.  In Debian/Ubuntu: @apt-get install dovecot-imapd@.  You can skip SSL since it's all over localhost.
9 5 Joseph Lacey
* For Debian, drop this file into /etc/dovecot/conf.d/99-mysettings.conf to configure dovecot.
10 1 Jon Goldberg
<pre>
11
protocols = imap
12
disable_plaintext_auth=no
13
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
14
mail_privileged_group = mail
15 2 Jon Goldberg
</pre>
16 5 Joseph Lacey
** For CentOS this needs to be added to the mail /etc/dovecot/dovecot.conf file.  And "the permissions need to be changed per this":http://wiki2.dovecot.org/Errors/ChgrpNoPerm.
17 7 Jon Goldberg
* (Pretty sure this is NOT required on Debian 8, but maybe on other versions/distros): @chmod g+rw /var/spool/mail/*@
18 1 Jon Goldberg
* Check @/etc/postfix/main.cf@ to ensure that @mydestination@ includes the domain you want to deliver mail to (e.g. "mysite.org").
19 3 Jon Goldberg
* Open port 25 in your incoming firewall.
20 4 Joseph Lacey
** Linode has no firewall.
21
** Amazon EC2 can be configured in the AWS Console.
22
** Blackmesh managed servers have firewall that you need to submit a ticket to to open ports.
23 1 Jon Goldberg
* You should now be able to use this account for IMAP!  Punch a temporary hole in your firewall at port 143 to access it from outside and connect Thunderbird to the account.  Send a test message, of course.
24
* Configure the Bounce Processing account in CiviCRM as you would any other IMAP-based account.
Go to top