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 »
  • Standalone Installations (Moderator: cap10morgan) »
  • Successful Installation of and conversion to CiviCRM and Civimail Standalone
Pages: [1]

Author Topic: Successful Installation of and conversion to CiviCRM and Civimail Standalone  (Read 2272 times)

Will Brownsberger

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 2
Successful Installation of and conversion to CiviCRM and Civimail Standalone
August 31, 2009, 10:26:33 pm
Just writing to contribute some of my experiences in getting CiviCRM and CiviMail Standalone to work.  I’m writing as a rank amateur hoping that my notes are helpful to other rank amateurs.  They specifically apply to Standalone, but are probably also mostly relevant to Drupal and Joomla.

If you are struggling with Civimail in a standalone install, you are not alone.  You will get through it, but, as to Civimail, unless you are fortunate with the way your host has set up email processing, you will probably need to have your own private or virtual private server to tweak things right.  I didn't do this whole thing linearly enough to offer a good checklist, but here are a few small and larger things that were hard for me to figure out.

 The hardest part for me (starting from scratch on mailing software) was the VERP processing configuration with my host’s emailer.  For a knowledgeable user this might be a nothing.  But nothing works without it.

Notes re basic configuration

    From e-mail

The from e-mail setting appears at three different points in the Administer panel – under “domain information”, and in two different places under “from e-mail”.  If you are not going to set up multiple “from” settings then these all set the same value.

    Mail Account

This group of settings is entirely about return processing, but you need to configure it fully even if you don’t plan to do return processing, because your mailer will probably test return addresses for your mail on the way out.  See further below.

    Mailer Settings

I never was able to update this group of settings (explained at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Mailer+Settings)

I found that I just kept getting dropped out of civicrm to my web root directory when I clicked on this menu item; it appears to be absent from the menu table.  Hoping that these settings don’t really matter.  They don’t seem to for short mailings.  I haven’t gotten to testing larger jobs.

Getting tokens to work in Civimail

Civimail won’t let you get through mailing step three without putting the {domain.address} token into the e-mail some place, but there is no obvious place to assign a value for this token.

My problems with this token may have arisen from my earlier migration from test to production, during which I may have blown up some records established in the first user processing for CiviCRM.  Whether by my own fault or as glitch in Standalone, I couldn’t find anyway to assign a physical street address to my domain.  I had to use PhpMyAdmin to point the locblock record (in the locblock table which turns out to be where civimail looks) at an address record.

Otherwise, the tokens worked fine for me from the start.


Configuring Civimail – VERP Processing has to work with your host’s mailer to get even a test message out of Civimail


The documentation is conflicting as to requirements – at several points, it indicates that Postfix and certain PHP extensions are necessary for Civimail, but Lobo says elsewhere in this forum that the latest version of Civimail should work with other common mailing programs like Exim.  This seems to be true.

Exim and Postfix are among the common open source software programs that web hosting providers use to run SMTP mail delivery.  The trick in getting Exim or any other mailer to work is to configure it to  accept Variable Envelope Return Path addresses.  You need to worry this regardless of how you are going to configure civimail, because, as fair as I can tell, civimail always sends VERP’d return path addresses (even if you override VERP processing in mailing step 3).

The return path (the place that a message should be bounced to) will be tested by a mailer in several postures, as the mailing goes out, if a recipient mailer asks for a verification and if there is a bounce.  If you don’t have the mailer configured to pass the VERP on either of the first two verify steps, the messages won’t go out or won’t be accepted by the recipient.  So, you need to get your mailer to accept VERP.

In Exim, it’s very easy to make the configuration change.  You have to put in to the Exim.conf file (and access to this file is only possible in a VPS or private server where you can get root access to edit files outside your user domain) the lines local_part_suffix = +* and local_part_suffix_optional into the router line of the con file.  I put it in all of them that seemed like they might have any user testing in them, but that may have been overkill.

What this setting does is allow a VERP return path like user+a.123j.gobbledygookd@yourdomain.org to be read by the routers as user@yourdomain.org (it considers the stuff after the + to be an optional suffix).  Routers are basically instructions that Exim reads as to where messages should go; routers are read successively until Exim finds one that either bounces or routs a message.  See the documentation at Exim.org.

So, for example now my last router, the local_user router now reads:
 localuser:
   driver = accept
   local_part_suffix = +*
   local_part_suffix_optional
   headers_remove="x-spam-exim"
   check_local_user
   domains = ! +user_domains
   transport = local_delivery

You want the local part in the Administer CiviCRM>Mail Accounts panel to read “user+” (without the quotes) where user is a user with an account in your domain to whose mailbox you will have the bounces deposited.

I got this far, which was necessary to get outgoing mailings to work, but did not actually get the bounce processing working, but we are just running one list of a few thousand members so we can and probably should review bounces manually and work them out. 

Until you get the above VERP processing to work, even your test messages in step 4 of the submit mail sequence in civimail will disappear (they won’t pass the address checking in the outgoing stage of the mail processes, even if your SMTP settings are testing correctly in the Outgoing Mail configuration panel).


Getting multiple messages to actually go out


Once you can check through to step 5 of the outgoing mail process, you need to set up a background job to read the database, pick up mailings and send them.  The job is /civicrm/bin/civimail.cronjob.php.  I had to modify this job by adding the following lines before the require lines to fix the path access:

    $pathcivicrm = '/home/youruser/public_html/civicrm';
    set_include_path(get_include_path() . PATH_SEPARATOR . $pathcivicrm);

You’ll be able to sort out what lines are necessary, if any in your installation.  You may also need to comment calls to Drupal/Joomla for authentication of the user running the script.  (I believe I did this, but lost track of the change; in any event, I did not have to follow the stuff in the documentation about putting in user and password to run the job.  The job gets smtp access from the settings you already have made in the setup and any script authentication is superfluous)

Finally to get the job to run automatically, you need to go in to CPANEL and go set up a crontab entry with an instruction to invoke php and feed it the script something like so:

/usr/local/bin/php -q /home/youruser/public_html/civicrm/bin/civimail.cronjob.php

Hope that some of this is helpful to someone sometime. :)

Good luck, friend.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Standalone Installations (Moderator: cap10morgan) »
  • Successful Installation of and conversion to CiviCRM and Civimail Standalone

This forum was archived on 2017-11-26.