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) »
  • PHP-based solution for the return channel
Pages: 1 [2] 3 4 5

Author Topic: PHP-based solution for the return channel  (Read 36107 times)

nocabt

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 1
Re: PHP-based solution for the return channel
October 30, 2008, 10:14:09 am
ughh...sorry, one more question.  Do we have to set the return-path somehow?  My reply-to address is r.1.5.6.6cfe28e1858839af-recipientname=recipientdomain.com@mydomain.org, which is not the IMAP account I set up, obviously.

Thanks,
Thomas

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
October 31, 2008, 04:58:51 am
Quote from: nocabt on October 30, 2008, 08:42:55 am
One more question, will this solution work on a CiviCRM 2.0.x install?

I have no idea. We develop this for CiviCRM 2.2, and offer a ‘preview’ with CiviCRM 2.1 for those willing to hack the sources (as above).

You’re free to try it out with CiviCRM 2.0, of course, and maybe it’ll work – but we haven’t tried it.
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: PHP-based solution for the return channel
October 31, 2008, 05:00:56 am
Quote from: nocabt on October 30, 2008, 10:14:09 am
ughh...sorry, one more question.  Do we have to set the return-path somehow?  My reply-to address is r.1.5.6.6cfe28e1858839af-recipientname=recipientdomain.com@mydomain.org, which is not the IMAP account I set up, obviously.

Yes, this is just a processor for the return channel, not a front to it.

CiviCRM 2.2 will introduce the possibility to use localpart+r.5.6.6cfe28e1858839af@example.com addresses, which should ease the situation (most mail servers are configured to handle plus-extended addresses by default).
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.

nocabt

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 1
Re: PHP-based solution for the return channel
October 31, 2008, 08:35:23 am
So if we wanted to test it we could set a catch-all account for the email domain for the time being? 

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
November 02, 2008, 11:11:46 pm
Quote from: nocabt on October 31, 2008, 08:35:23 am
So if we wanted to test it we could set a catch-all account for the email domain for the time being? 

Yes, for CiviCRM 2.1 you either need a catch-all account or to configure your mailserver to route mail matching certain address patterns to a dedicated CiviMail account.
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.

nocabt

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 1
Re: PHP-based solution for the return channel
November 03, 2008, 07:49:56 am
Thanks for the support, it seems to work great!

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: PHP-based solution for the return channel
November 20, 2008, 07:56:36 pm
I'm setting this up on J1.5.7 with C2.1.2

When I try to run the processor script from the browser, I get the following error:

Code: [Select]
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.
If I disable the authentication (line 137 of CiviMailProcessor.php) it runs and yields the following:

Code: [Select]
connecting to server, authenticating as username and selecting Inbox

...which I'm interpreting to be the desired response (haven't tested with actual emails yet).

Also... just confirming, the cronjob for this is ONLY for bounce handling -- we still need to setup the standard civimail cron to send the emails, correct?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: PHP-based solution for the return channel
November 20, 2008, 08:21:12 pm
Ok, so in a stroke of brilliance, I went to the referred link provided by the error message (I had originally ignored it thinking the error was session-related). So the 'key' addition to the urls is new in v2.1.2+

Still need to work out the key issue, but it doesn't appear to be a bug --- just me overlooking things.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
November 21, 2008, 02:45:55 am
Quote from: lcdweb on November 20, 2008, 07:56:36 pm
I'm setting this up on J1.5.7 with C2.1.2

When I try to run the processor script from the browser, I get the following error:

Code: [Select]
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.

Right, you need to add a key to your civicrm.settings.php file and add is as a parameter. I updated the CiviMail Processor’s wiki page.

Quote from: lcdweb on November 20, 2008, 07:56:36 pm
Also... just confirming, the cronjob for this is ONLY for bounce handling -- we still need to setup the standard civimail cron to send the emails, correct?

It’s not just for bounce handling, it’s also for SMTP-based (un-,re-)subscribes, opt-outs and replies – but yes, you still need to setup the cronjob to send the mailings.
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.

civive

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 2
Re: PHP-based solution for the return channel
December 02, 2008, 08:38:37 am
I'm trying to set this on Drupal 5 and civimail 2.05
I get an error:
Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -24
    [message] => DB Error: connect failed
    [mode] => 16
    [debug_info] =>  [nativecode=mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)]
    [type] => DB_Error
    [user_info] =>  [nativecode=mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)]
    [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)]"]
)
It looks like I made a big mistake, but i don't know where to look.[/code]

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 03, 2008, 04:27:56 am
Quote from: civive on December 02, 2008, 08:38:37 am
Code: [Select]
…
    [user_info] =>  …Can't connect to local MySQL server through socket '/tmp/mysql.sock'…
…

This means your PHP can’t connect to your MySQL server.

If the rest of your CiviCRM works, I’d guess that it means the processor can’t find the proper settings file.

How do you call (execute) the CiviMailProcessor.php file? From the command-line, with wget, with a browser?
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.

civive

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 2
Re: PHP-based solution for the return channel
December 04, 2008, 07:38:34 am
From a browser. using sites/all/modules/civicrm/bin/CiviMailProcessor.php?name=xxxxxx&pass=xxxxx&key=xxxxx
@lcdweb Did you mannage to get it working on 2.0 ?

edit: I found the problem. It was the settings of mysql,  but strange enough they worked for the rest of the site. thanks
Now I get the error "ERROR: Invalid username and/or password " Looks like an improvement to me ;)
« Last Edit: December 04, 2008, 01:26:35 pm by civive »

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 04, 2008, 10:54:26 pm
Quote from: civive on December 04, 2008, 07:38:34 am
I found the problem. It was the settings of mysql,  but strange enough they worked for the rest of the site. thanks
Now I get the error "ERROR: Invalid username and/or password " Looks like an improvement to me ;)

Definitely an improvement (of sorts).

Given the above, do make sure the code is actually using the civicrm.settings.php file you believe it’s using. (Also, the user in the user/password combo above is required to have CiviMail privileges.)
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.

civive

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 2
Re: PHP-based solution for the return channel
December 05, 2008, 04:24:40 am
Rome was not made in one day.

Making an account for the user did help. thanks. No more invalid username and or password. Todays error:
Fatal error: Call to undefined method CRM_Core_BAO_Domain::getdomain() in ***/sites/all/modules/civicrm/bin/CiviMailProcessor.php on line 41
There was no function getdomain() in Domain.php, I changed getdomain() into GetCurrentDomain() in CiviMailProcessor.php
result: one step in the good direction ?:
error message:
connecting to **server** and authenticating as **@**.** and selecting Inbox 
Fatal error: Class 'ezcBaseRepositoryDirectory' not found in /**/sites/all/modules/civicrm/ezc/Base/src/base.php on line 440
I guess the ez components are not properly installed.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 08, 2008, 07:17:26 am
Quote from: civive on December 05, 2008, 04:24:40 am
Fatal error: Call to undefined method CRM_Core_BAO_Domain::getdomain() in ***/sites/all/modules/civicrm/bin/CiviMailProcessor.php on line 41
There was no function getdomain() in Domain.php, I changed getdomain() into GetCurrentDomain() in CiviMailProcessor.php
result: one step in the good direction ?:

This is very strange – the CRM_Core_BAO_Domain::getDomain() is definitely there: http://svn.civicrm.org/civicrm/branches/v2.1/CRM/Core/BAO/Domain.php

Quote from: civive on December 05, 2008, 04:24:40 am
Fatal error: Class 'ezcBaseRepositoryDirectory' not found in /**/sites/all/modules/civicrm/ezc/Base/src/base.php on line 440

Ditto; the ezcBaseRepositoryDirectory class is in packages/ezc/Base/src/structs/repository_directory.php, which should be autoloaded by ezcBase. Are you sure you’re using CiviCRM 2.1.x?
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.

Pages: 1 [2] 3 4 5
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • PHP-based solution for the return channel

This forum was archived on 2017-11-26.