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 »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Processing Bounces With PHP
Pages: 1 [2] 3

Author Topic: Processing Bounces With PHP  (Read 12300 times)

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: Processing Bounces With PHP
September 15, 2008, 12:04:40 pm

A PHP version that will replace imap2soap.pl will be a great community contribution. Anyone willing to step up and do the needed work? We can help out a bit here. Hop into IRC and dive in :)

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

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Processing Bounces With PHP
September 15, 2008, 12:16:14 pm
I'll certainly help.  I'm more of a system's analyst than a programmer. 

I'll start looking into this and see what I can find.  Does anyone know of any documentation that discribes what imap2soap is supposed to do?

Thank you for considering this !

Dave Bean
303-777-3095

clearlytechnical

  • Guest
Re: Processing Bounces With PHP
September 15, 2008, 03:07:48 pm
Quote from: Donald Lobo on September 15, 2008, 08:40:36 am

yes, i did read the post before replying :P

however not sure if u've setup civismtp, but it is fairly trivial to set up and does BOTH inbound and outbound processing for a pretty low price (note that we have no incentive to plug that service). typically shared hosts also have issues with high volumes of outbound mail also and a more complete service like CiviSMTP makes more sense, IMO. Running a 24x7 service is a pretty intensive operation and a bit more involved than having an available resource

lobo


Hmm, then it might make sense for the company you recommend to offer a basic and a delux version. A basic would be a free or minor flat rate for the imap2soap service and delux for the complete package to include smtp.

It just seems like this is a service that has slowed a lot of installs down. I can see why a lot of installs might not want to go through CPAN pain, etc. Anyway, I will wait for feedback and am ready to provide some hardware and bandwith if the interest is there.

Also, shameless plug for my imap2soap posts. Look for help with Civic mails getting thrown to junk. Please have look if you know anything about this issue.


Thank you.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Processing Bounces With PHP
September 25, 2008, 05:46:41 am
To return (briefly?) to this thread’s original topic, I’ll be implementing a PHP solution of the return channel (that will replace AMaViS/imap2soap) as part of our CiviMail tasks for CiviCRM 2.2 (with  CRM-3616 being the particular issue to track).
« Last Edit: September 25, 2008, 01:32:49 pm by Dave Greenberg »
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.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Processing Bounces With PHP
September 25, 2008, 06:38:04 am
Thanks Piotr 

As individual building block techniques are developed with PHP to deal with returned email, could they be identified and made available as we go along.   

For example a more efficient routine to read the pop3 email box than I used - see beginning of this thread - I think this might read the entire message body into the array for each email message, which is not necessary, because I'm only looking at the first few items in the array. 

Also, it has been mentioned that the CiviCRM PHP PHP routines may be already available to do things like delete the email record from the box if it has been determined to have been handled, but I don't know how to do this.

There has been limited discussion of when an email address is flagged as on hold - perhaps not on the first bounce, maybe depending on the type of bounce - returned non deliverable, as opposed to mailbox full.  Manually, I'm collecting a half dozen for an address and then mark as on hold.

I may be mistaken, but I don't think the email on hold indicator is a field that can be marked in a spreadsheet of potential on hold email addresses and uploaded (can't find a field to upload into in the upload routine).

Any discussion about how people are dealing with bounces when they are not using imap2soap would be appreciated.  In theory we are deleting from the return mailbox manually and manually marking the record on hold with the assistance of the php generated listing that is imported to a spreadsheet.  In practice, returned emails are accumulating.

Thank you for looking at a php option for handling returned emails.

Dave

ronald

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 5
Re: Processing Bounces With PHP
September 25, 2008, 07:10:17 am
This is great news, Piotr - thanks for doing it and thanks for letting us know.
I'm looking forward to it!  :)

Cheers,

Ronald
« Last Edit: September 25, 2008, 07:16:35 am by ronald »

clearlytechnical

  • Guest
Re: Processing Bounces With PHP
September 25, 2008, 10:03:07 am
I agree. PHP Version would provide a better solution because then you don't have to worry about offering your username/pass for your email to a 3rd party.

The idea behind the service was to make something turn key within the admin panel of Civic so you could enter your imap account name and password and click go. Done.

Likewise, if we did it in php, we could still provide the same service from the control panel. So count me in if there is anything I can do to help. As it stands, we can't use civic and I have it on 3 clients sites. I was looking into that 3rd party service, but they are a metered service and that could get costly pretty quick. Not a big fan of a metered service. Personally, I would prefer to play a flat rate. But I understand they have to make money and they have to make sure the have some level of control in place to keep people from slamming their server.

Anyway, the email is absolutely the biggest issue I have run into with Civic. So for now, I am waiting and hoping they come up with a better solution for those who are struggling with dependency and security rights issues.

clearlytechnical

  • Guest
Re: Processing Bounces With PHP
September 25, 2008, 10:07:40 am
Quote from: Piotr Szotkowski on September 25, 2008, 05:46:41 am
To return (briefly?) to this thread’s original topic, I’ll be implementing a PHP solution of the return channel (that will replace AMaViS/imap2soap) as part of our CiviMail tasks for CiviCRM 2.2[url=http://(with [url=http://issues.civicrm.org/jira/browse/CRM-3616]CRM-3616] (with [url=http://issues.civicrm.org/jira/browse/CRM-3616]CRM-3616 being the particular issue to track).

Piotr,

I will be happy to contribute some cash and time (I could help beta test. Running Joomla). If you can move this up on the priority list, I would gratefully paypal a donation.



Thanks.

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: Processing Bounces With PHP
September 25, 2008, 06:10:03 pm

the 2.2 tentative schedule is here: http://wiki.civicrm.org/confluence/display/CRM/CiviCRM+v2.2

you can watch the issue and potentially backport it to 2.1 if critical to your org

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

clearlytechnical

  • Guest
Re: Processing Bounces With PHP
September 26, 2008, 09:12:13 am
Donald,

Good stuff! Thank you for replying and doing your best to help. It is truly appreciated.

I went to the link. I couldn't find the issue to follow as it relates to the imap2soap/verp, etc.

Any direction would be appreciated.

Also, Just a thought. And maybe you did it already.

CiviCRM is a tool for non-for-profits (and other uses of course). It has a contribute module. It has a membership module, etc. What I found ironic, is that I couldn't find anywhere to donate?

I know there is a demo system, but it would be nice to see a setup running live and helping to raise money for this community.

We could also setup of "Events" that cost money and spearhead projects that are of interest. Example: I want to get this imap2soap.php dilio off the ground asap. If we could start an event for this, users could subscribe and we could all donate to the event or whatever. Just a thought. Have not thought it out in detail, but I guess what I am saying is that we should have the software running beyond a "demo" level and actually use it for real time purposes? Something like that. Just trying to share.



Quote from: Donald Lobo on September 25, 2008, 06:10:03 pm

the 2.2 tentative schedule is here: http://wiki.civicrm.org/confluence/display/CRM/CiviCRM+v2.2

you can watch the issue and potentially backport it to 2.1 if critical to your org

lobo


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: Processing Bounces With PHP
September 26, 2008, 11:33:50 am

piotr posted the issue number early on in the thread: http://issues.civicrm.org/jira/browse/CRM-3616

We've stayed away from accepting donations (so far), but will introduce them shortly. In addition to the software, you need to have someone responsible for the database and some business process's that go along with usage. So far, that has not been a priority for us. We used to run CiviCRM on the main site sometime ago, but it was neglected, hence we turned it off

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

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Processing Bounces With PHP
October 16, 2008, 04:00:40 pm
Brave alpha-testers of the new return channel PHP processor, please check out this thread.
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.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Processing Bounces With PHP
October 16, 2008, 11:49:52 pm
Just adding my $.02, based on what we've done on phplist:

- one single mailbox for the bounce
- the emails contains to extra headers X-mailing=id and X-contact=cid (not sure of the name, but that's the idea)

a php called from a cron fetch the emails and parse to find the ids and process them (no need from soap, that's on the same machine)

I'm using it for mailing with over 50k contacts, it works.

A couple of points: the php cron is called from the shell (php-cli), not from a wget of a webpage. It allows both to avoid the extra layer of the webserver, the timeout/memory problem, and let you set a lower priority on these batches (I nice -19 them). As for the login/pwd, the "cron" user(s) is defined in the config as a user that has the special privilege to authenticate from a cron/php-cli AND to do that without having to put a password (so you don't have passwords in clear text in the shell/cron)

As for the header fields vs. envelope, we have indeed problems from time to time with mail servers that strip the bounces from these extra header fields, so having a VERP is no doubt better from a technical point of view.

Moreover, with most of the mail servers accepting the name+whatever notation, that'd be easier to still have one mailbox eg bounced@domain, and use bounced+mailingID-userID@domain as the envelope.

Last but not the least, the major problem is with crap out of office systems, that sends that to the envelope address instead of the sender one, and are seen as spam. Not much we can do about it to my knowledge.

Dave, did you move further on the php version of it ?

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

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Processing Bounces With PHP
October 17, 2008, 09:27:30 am
Quote from: xavier on October 16, 2008, 11:49:52 pm
- one single mailbox for the bounce
- the emails contains to extra headers X-mailing=id and X-contact=cid (not sure of the name, but that's the idea)

a php called from a cron fetch the emails and parse to find the ids and process them

So you parse the body of the reply and hope that the bouncer included the headers, right?

Quote from: xavier on October 16, 2008, 11:49:52 pm
A couple of points: the php cron is called from the shell (php-cli), not from a wget of a webpage. It allows both to avoid the extra layer of the webserver, the timeout/memory problem, and let you set a lower priority on these batches (I nice -19 them). As for the login/pwd, the "cron" user(s) is defined in the config as a user that has the special privilege to authenticate from a cron/php-cli AND to do that without having to put a password (so you don't have passwords in clear text in the shell/cron)

Hm, that’s a nice solution. I think we’ll handle both – i.e., if the user/pass is not passed in the $_REQUEST, then fall back to check the UNIX username.

Quote from: xavier on October 16, 2008, 11:49:52 pm
As for the header fields vs. envelope, we have indeed problems from time to time with mail servers that strip the bounces from these extra header fields, so having a VERP is no doubt better from a technical point of view.

Moreover, with most of the mail servers accepting the name+whatever notation, that'd be easier to still have one mailbox eg bounced@domain, and use bounced+mailingID-userID@domain as the envelope.

This is exactly what we’re implementing for 2.2. :) Even GMail handles the +-extended email 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.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Processing Bounces With PHP
October 17, 2008, 12:54:15 pm
Quote
So you parse the body of the reply and hope that the bouncer included the headers, right?

Yes, it kind of mostly work, but as said, not as good as the verp.

As for putting php-cli as a first class citizen: really, that's soo much better than wget?curl...

I just saw your post about the 2.2. going to try and let you know.

thanks!

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

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Processing Bounces With PHP

This forum was archived on 2017-11-26.