CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Recipe for a Return Channel on Drupal/Google Apps/CentOS
Pages: [1]

Author Topic: Recipe for a Return Channel on Drupal/Google Apps/CentOS  (Read 1606 times)

GingerFeet

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 4
  • CiviCRM version: 3.4.6 / 3.4.7
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5.3.6
Recipe for a Return Channel on Drupal/Google Apps/CentOS
February 22, 2011, 12:53:28 pm
I thank everyone for their help.
I struggled with the order of things in the manual--I've set up a logical order (to me) of steps. I haven't included troubleshooting each step, because that adds too many words. If you get stuck, troubleshoot by reading the manual.

Here is my recipe:

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
         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'
   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

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
         2. 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
         3. 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
   5. 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)

    * You can read more about SPF at http://www.openspf.org

8. Troubleshooting

    * http://wiki.civicrm.org/confluence/display/CRMDOC33/CiviMail+Installation
    * http://wiki.civicrm.org/confluence/display/CRMDOC33/CiviMail+Processor
    * http://en.flossmanuals.net/CiviCRM/Email
    * http://en.flossmanuals.net/CiviCRM/SystemConfiguration
    * http://forum.civicrm.org/index.php?topic=16184.0
    * http://www.google.com


Jake

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Recipe for a Return Channel on Drupal/Google Apps/CentOS
February 22, 2011, 01:21:16 pm
Very nice, thanks!

Could you create a page "step by step" in the wiki and put it there ?

Part of the difficulty in the book was to try to cover a lot of different cases (different ways of running the cronjob, catch all vs. + ...

Could you remember what wasn't fluid and what step was missing ? I'd want to take that into account next time we update the book .

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

GingerFeet

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 4
  • CiviCRM version: 3.4.6 / 3.4.7
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5.3.6
Re: Recipe for a Return Channel on Drupal/Google Apps/CentOS
February 22, 2011, 04:07:16 pm
OK, I stuck it here:
http://wiki.civicrm.org/confluence/display/CRMDOC33/Step-by-step+Return+Channel+on+Drupal+-+Google+Apps+-+CentOS

Do whatever you want with it ;D

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Recipe for a Return Channel on Drupal/Google Apps/CentOS
February 22, 2011, 07:15:17 pm
Hey GingerFeet -  great work - added a couple of notes on wiki about

a/ 1.1 - saves time to just give the Drupal civimail user an existing Role but understand your point

b/ 1.1.4.d - civi record will usually be created at this point

c/ suggested doing step 5/ during 1.2.5 - ie add the Spam rule when logging in to the G account the first time?

 
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

mirrorstage

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 1
  • CiviCRM version: 4.6.7
  • CMS version: Drupal 6.37
  • MySQL version: 5.6.23
  • PHP version: 5.4.42
Re: Recipe for a Return Channel on Drupal/Google Apps/CentOS
July 13, 2011, 07:08:04 pm
This was really a tremendous help. Thanks!!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Recipe for a Return Channel on Drupal/Google Apps/CentOS

This forum was archived on 2017-11-26.