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

Step-by-step Return Channel on Drupal - Google Apps - CentOS

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • Formatting was changed.
Commentaire: Migrated to Confluence 4.0

Return Channel with Drupal and Google Apps on CentOS

  1. Set up accounts
    1. Drupal user: CiviMail
    2. Google Apps: return@example.com
  2. Add the Google Apps return@example.com to CiviCRM
  3. Configure CiviCRM outbound email
  4. Set up 2 cron jobs to run periodically
  5. Set Filters on return@example.com
  6. Check the report
  7. Configure SPF
  8. Troubleshooting

1. Set up accounts

1.1 Drupal User: CiviMail

  1. Log in to Drupal
  2. Create a Drupal Role: civimail (alternatively use an existing role that has civimail permission)
    1. User management -> Roles
    2. Click 'Add role'
  3. Set the permissions on the new role to: access CiviMail
    1. User management -> Roles
    2. Click 'edit permissions' for the civimail role
    3. Tick the 'access CiviMail' checkbox
    4. Save
  4. Create a Drupal User: CiviMail
    1. User management -> Users -> Add user (Add user)
    2. Give the user a long password (30 characters)
      1. It is a machine and can easily remember a long password
      2. Record the password
    3. Give the new Drupal user the civimail role, so it can access CiviMail
      1. Tick the 'civimail' checkbox under 'Roles'
    4. Click 'Create new account' (this should also create the CiviCRM contact if you have a civicrm profile set for 'Drupal Registration' negating need for step at 3.4.b)
  5. Login as CiviMail to check that the new account/password works

1.2 Google Apps: return@example.com

  1. Log in to your Google Apps account
  2. Organizations & users -> Create a new user
    1. First name: Return
    2. Last name: CiviMail
    3. Email address: return (the @example.com part is filled in automatically)
    4. Give the user a long password (30 characters)
      1. It is a machine and can easily remamber a long password
      2. Record the password
    5. (This account does NOT need to be a catch-all, Google understands +)
  3. Go to your email (click 'inbox' in the upper right hand corner)
    1. Send your new return@example.com account an email
  4. Log out of Google Apps
  5. Log in to your new return@example.com Google Apps account to check that the new account/password works
    1. Check that the account received the email you sent as an admin
      (You may wish to also do Step 5 - Set up Spam Filter - at this point)

2. Add the Google Apps return@example.com to CiviCRM

  1. Log in to CiviCRM
  2. Administer -> CiviMail -> Mail Accounts
  3. Edit the default as follows:
    • Name: return
    • Server: imap.googlemail.com
    • Username: return@example.com
    • Password: (return's password for Google Apps)
    • Localpart: return+
    • Email domain: example.com
    • Return-Path: (leave blank)
    • Protocol: IMAP
    • Source: (leave blank)
    • Use SSL?: tick the box
    • Default Option?: tick the box
  4. Save

3. Configure CiviCRM outbound email

  1. You are still logged in to CiviCRM
  2. Set CiviCRM's default FROM address
    1. Administer -> CiviMail -> From Email Address
      1. Your FROM address should be an email address that works and that a human reads
      2. This will be the originating email address for CiviMail's email
  3. Select the Mailer
    1. Administer -> Configure -> Global settings -> Outbound Email (SMPT/Sendmail)
      1. Select: mail()
      2. Save
  4. Send a test email to return@example.com and confirm it arrived
    1. CiviCRM won't let you send an email to an address that is not in the DB
    2. Create a new contact named 'Return CiviMail' with return@example.com for an email
      1. Contacts -> New Individual
    3. Send return@example.com an email
      1. Contacts -> New Email
    4. Log in to Google Apps as return@example.com and confirm the email arrived

4. Set up 2 cron jobs to run periodically

  1. Log in to your server
  2. Create 2 directories
    1. /etc/cron.five
    2. /etc/cron.fifteen
  3. Edit /etc/crontab by adding 2 lines
    • */05 * * * * root run-parts /etc/cron.five
    • */15 * * * * root run-parts /etc/cron.fifteen
  4. Create 2 text files and make them executable
    1. The first file can be named emailprocessor, is placed in your new /etc/cron.fifteen directory, and contains the following:
      #!/bin/bash
      #/path/to/civicrm;nice -n19 /path/to/php /path/to/EmailProcessor.php -sDrupalWebsite -uDrupalUser -pPassword

# example.com
cd /var/www/sites/all/modules/civicrm;nice -n19 /usr/bin/php bin/EmailProcessor.php -swww.example.com -uCiviMail -pPasswordForCiviMailToLoginToDrupal >/dev/null 2>&1 

    1. The second file can be named civimail.cronjob, is placed in your new /etc/cron.five directory, and contains the following:
      #!/bin/bash
      #/path/to/civicrm;nice -n19 /path/to/php /path/to/civimail.cronjob.php -sDrupalWebsite -uDrupalUser -pPassword

# example.com
cd /var/www/sites/all/modules/civicrm;nice -n19 /usr/bin/php bin/civimail.cronjob.php -swww.example.com -uCiviMail -pPasswordForCiviMailToLoginToDrupal >/dev/null 2>&1

    1. When you add a new virtual host, add their credentials in a new line to /etc/cron.fifteen/emailprocessor and to /etc/cron.five/civimail.cronjob
  1. Test the cron job
    1. In CiviCRM create a group that is to receive test emails
      1. Contacts -> New Group
        1. Include yourself with an email you can access
        2. Include a contact with an email address you are sure will bounce (GiantRandomString@yahoo.com)
    2. Create a new mailing and send it to your new group
      1. Mailings -> New Mailing
    3. Run your cron jobs manually so you don't have to wait
    4. Go to your email and open the email
      1. Download external content if you have images turned off
      2. Forward the email to another account

5. Set filters on return@example.com

  1. Go to your return@example.com Google Apps account Spam folder
  2. Go to email
  3. Click the 4 more -> Spam link
  4. Find the the test email, select it and click the More actions -> Filter messages like these link
  5. Click 'Next Step'
  6. Tick the 'Never send it to Spam' box
  7. Click 'Create Filter'
  8. You may need to create other filters

6. Check the report

  1. Send another test mailing
  2. Rerun your con jobs manually
  3. Mailings -> Scheduled and Sent Mailings
  4. Click the Report link for your test mailing
  5. Your bounce should show in the report
  6. If you open an email, it should show in the report

7. Configuring Sender Policy Framework (SPF)

8. Troubleshooting


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.