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) »
  • setting up CiviMail Processor on 2.1.2
Pages: [1]

Author Topic: setting up CiviMail Processor on 2.1.2  (Read 5336 times)

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
setting up CiviMail Processor on 2.1.2
January 26, 2009, 01:30:53 am
I'm trying to get the CiviMail Processor set up on my 2.1.2 installation.

I have created an IMAP mail account and set up a catchall to redirect all incoming mail into that account.

I have set the account credentials in Mailstore.php

I have created a site key - 19 characters in length.

I have created a cron task to call CiviMailProcessor.php every 10 minutes using my admin credential and the key.
If I use the URL in the browser (i.e. http://www.domain.com/sites/all/modules/civicrm//bin/CiviMailProcessor.php?name=user&pass=password&key=key) then I get the following response:
"connecting to mail.domain.com, authenticating as [user] and selecting Inbox" (details altered to protect the innocent) but using the same url in a cron task I get the following error:
"ERROR: You need to send a valid key to execute this file. More info at: http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration."

My cron task is of the form:
wget --output-document=- --quiet http://www.domain.com/sites/all/modules/civicrm/bin/CiviMailProcessor.php?name=user&pass=password&key=key

I have sent a some test messages to the IMAP account, and regardless of how I am calling CiviMailProcessor.php these messages are just sitting in Inbox. I'm guessing that if the script is working I should see at least the creation of CiviMail.ignored plus one or messages being moved, and maybe more information coming back to me via the debugging tool in the browser window when CiviMailProcessor.php is called manually.

I guess I must be missing something. Any pointers most welcome.

Regards
Graham


Graham Mitchell
http://mc3.coop

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: setting up CiviMail Processor on 2.1.2
January 26, 2009, 07:59:39 am

1. what happens when you run the wget line from the shell prompt

2. if i had to guess, i suspect your key or name or pass  contains a character that needs to be escaped for a shell script. Ensure that they dont contain a character or you escape it properly

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: setting up CiviMail Processor on 2.1.2
January 26, 2009, 08:49:06 am
Donald, thanks for the response.

Sadly all three (username, password and key) are all simple alphanumeric strings with nothing that might cause offence. I'm testing from the command line to see what I get back, and will feed this in.

Regards
Graham
Graham Mitchell
http://mc3.coop

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: setting up CiviMail Processor on 2.1.2
January 26, 2009, 09:03:35 am
Well, running the command on my Mac using curl (cos for some reason wget is not installed by default, and i get:
"connecting to mail.domain.com, authenticating as user and selecting Inbox" which seems a good thing. I'll try using curl in the cron task and see if that improves things.

OK. I've modified the cron task to use curl rather than wget, and I getting a more positive outcome, as above. however, I would expect CiviMail Processor to be doing its thing, creating IMAP folders and moving messages, and I am seeing none of this.

Further update, 23:00 GMT, Jan 26:

Having re-read various bits of information on this in wikis, forum posts and the CiviMail documentation, I have tried further options:

1. Modified my mail account username as entered into MailStore.php from user to user@domain.com. This engendered a fuller response from the CivMail Processor, but still did not enable the processor to create the ignored and processed mail folders. My IMAP server is Courier, and as the code appears only to have been tested with Gmail, I'm guessing that this is the problem.

2. So I've created a Gmail account and configured for that, and hey presto - it works, or at least it looks like it works. Except of course I can't find any information about how to sort out the VERP email addresses so that Gmail will accept these mails into the designated target account. Is there any documentation on this?

Before the civimail processor goes live it needs to be able to cope with a wider range of IMAP systems, of which I think courier is probably one of the more common. Until then we will work with Gmail.

Regards
Graham
« Last Edit: January 26, 2009, 04:28:06 pm by Upperholme »
Graham Mitchell
http://mc3.coop

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: setting up CiviMail Processor on 2.1.2
January 26, 2009, 11:27:20 pm
Quote from: Upperholme on January 26, 2009, 09:03:35 am
1. Modified my mail account username as entered into MailStore.php from user to user@domain.com. This engendered a fuller response from the CivMail Processor, but still did not enable the processor to create the ignored and processed mail folders. My IMAP server is Courier, and as the code appears only to have been tested with Gmail, I'm guessing that this is the problem.

It might well be the case. Are you aware of any free IMAP service using Courier?

Quote
2. So I've created a Gmail account and configured for that, and hey presto - it works, or at least it looks like it works. Except of course I can't find any information about how to sort out the VERP email addresses so that Gmail will accept these mails into the designated target account. Is there any documentation on this?

It’s upcoming. :) CiviMail in 2.2 supports the localpart field, which you can set to be something like username+, and then CiviMail will prepend that to the outgoing messages. Gmail supports this by default, so anything mailed to username+foo@gmail.com will end up in username’s inbox.

Thanks a lot for your testing and your valuable input!
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: setting up CiviMail Processor on 2.1.2
January 27, 2009, 03:03:20 am
A bit more on the Courier front. I manually created the two folders and when CiviMail Processor is run it recognises the mailboxes, but is not processing any messages. I'm sure I can make an email account available on this server if that would be helpful. Let me know.

So for the time being I'm stuck it seems: I can only get the processor to work with a gmail account, but can't configure CiviMail to format the return path addresses to the form username+foo@gmail.com until 2.2 is released?

Ho hum.
Graham
Graham Mitchell
http://mc3.coop

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: setting up CiviMail Processor on 2.1.2
January 27, 2009, 05:40:47 am
Quote from: Upperholme on January 27, 2009, 03:03:20 am
I'm sure I can make an email account available on this server if that would be helpful. Let me know.

That would be most helpful! Please create an account and send the credentials to shot@civicrm.org (if you want to encrypt them, my GPG key is D128F14A).

Quote
So for the time being I'm stuck it seems: I can only get the processor to work with a gmail account,

Can you try applying r19545 to your 2.1 install? This tries to use Inbox subfolders rather than ones in IMAP root; I doubt it’s the reason behind the Courier issue, but that’s one thing to rule out.

Quote
but can't configure CiviMail to format the return path addresses to the form username+foo@gmail.com until 2.2 is released?

Yes, and I’m sorry about it; CiviMailProcessor was itself released as a last-minute addition to CiviCRM 2.1 (and should be assumed alpha in 2.1), and the localpart fixes for the CiviMail sending part were a bit too invasive to put them in 2.1 that late in the release cycle.

We should release 2.2.alpha4 (or beta1) later this week, which you can use for testing (but if I get the Courier account I’ll do my best to test myself and fix anything that needs fixing before the release).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: setting up CiviMail Processor on 2.1.2
February 04, 2009, 05:03:24 am
Piotr
Apologies for not responding sooner - been away/busy.
I have now sent the details vai email for the test account.

Regards
Graham

Graham Mitchell
http://mc3.coop

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: setting up CiviMail Processor on 2.1.2
February 04, 2009, 06:01:58 am
Got them, thanks. I’ll test and fix CiviMailProcessor by the end of the week so it works with that server.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: setting up CiviMail Processor on 2.1.2
February 05, 2009, 06:25:39 am
Hmmm, I made a test run against that account (with CiviMailProcessor from the v2.2 branch) and it seems to have worked. The webmail’s tree doesn’t show the sub-Inbox CiviMail folder, but the drop-down in top-right seems to operate properly.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: setting up CiviMail Processor on 2.1.2
February 11, 2009, 09:13:05 am
Which suggests that if I replace CiviMail Processor in my 2.1.2 install with the same file from the 2.2 codebase it would work? Or are there other issues that I need to be aware of?

Regards
Graham
Graham Mitchell
http://mc3.coop

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: setting up CiviMail Processor on 2.1.2
February 11, 2009, 10:46:32 am

no, the codebases have diverged a bit and we've also upgraded the underlying ezComponents library.

your best bet will be to upgrade to 2.2 beta

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • setting up CiviMail Processor on 2.1.2

This forum was archived on 2017-11-26.