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) »
  • Pipe to a Program with Cpanel ?
Pages: [1]

Author Topic: Pipe to a Program with Cpanel ?  (Read 9061 times)

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Pipe to a Program with Cpanel ?
January 11, 2008, 10:07:40 pm
I just noticed that one of my hosts uses Cpanel 11 and there is an option when setting up email forwarders to "Pipe to a Program".  Is this of any use, maybe in place of imap2soap?

Just thought I'd ask.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Pipe to a Program with Cpanel ?
January 14, 2008, 02:46:44 am
Hmmm, this could actually work. I’m not sure whether AMaViS or imap2soap can process their standard input instead of running in daemon/multi-email modes, but if not, hacking them (especially imap2soap, I think) shouldn’t be too complicated.

I don’t think this solution would scale, but maybe for smaller sites/mailings it could be both a viable and easy-to-setup solution.

Can this setting be applied to a catch-all address?
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: Pipe to a Program with Cpanel ?
January 14, 2008, 08:49:53 am
I think that a catch-all address forwarder could be used.  Unfortunately, this feature seems to be only on one of my hosts that has cpanel 11 (I'm not sure if this is related).  I'll contact the host that has my civicrm to see if the program processing for a forwarder is available.

Meanwhile, on the host with the forwarder, is there a relatively simple test that I could do to test the capability.  For example, when I was not sure if my shared host could do smtp out there was a simple script that I used to send email and verify I could send. 

We have fairly few bounces maybe 100 out of 2000 emails and will have much less if we clean them up by putting the emails on hold.  It is feasible for us to handle bounces manually, working on that, but would be nice to have the automatic capability (I think).

« Last Edit: January 14, 2008, 11:12:42 am by Denver Dave »

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Pipe to a Program with Cpanel ?
January 14, 2008, 11:01:45 am
This all sounds very interesting and I would love to be able to do mailings directly from site. I'm running on cPanel 11 too but don't see the option. I'd like to get all excited and get my host to enable it, so am watching this post with much interest.


Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Pipe to a Program with Cpanel ?
January 14, 2008, 12:00:37 pm
Let's connect by phone 303-777-3095

It could be a coincidence that the host that allows the email forwarding to a program is also my only host on Cpanel 11.  Seems like a very nice option.

When I add email forwarders on the host that has the feature:
(1) In Cpanel in the mail section - click on forwarders
(2) In the Email Account Forwarders Section - click on "Add Forwarder" Button
(3) Then in the Add Forwarder page there is a radio button for:

"Pipe to a Program"

"When piping to a program, you should enter a path relative to your home directory. If the script requires an interpreter such as perl or php, you should omit the "/usr/bin/perl, or /usr/bin/php portion." Make sure that your script is executable and has the appropriate Hashbang at the top of the script. If you do not know how to add the Hashbang, just make sure to name your script file with the correct extension and you will be prompted to have the Hashbang added automatically."

I don't have any idea what a hashbang is or if this is a standard feature of Cpanel 11 or something special that the host has setup.

Screen shot:
healthcareforallcolorado.org/images/pipe.jpg

I'm also not sure why php can't read the email directly:
http://www.phpit.net/article/read-email-php-pop3/



« Last Edit: January 14, 2008, 12:05:37 pm by Denver Dave »

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Pipe to a Program with Cpanel ?
January 15, 2008, 12:42:57 am
Quote from: Denver Dave on January 14, 2008, 08:49:53 am
Meanwhile, on the host with the forwarder, is there a relatively simple test that I could do to test the capability.

The best way would be to contact the good folks behind imap2soap (e.g., through our civicrm-mail mailing list) and ask them how much work would it be for imap2soap to handle messages coming from its standard input. (I’m not a Perl coder, but I assume for a Perl coder it would be in the a-couple-of-hours-tops range.)

Note that your host would have to have all the Perl modules imap2soap uses installed; from a quick look at the source, that’d be SOAP::Lite, Mail::IMAPClient, Mail::Verp, HTTP::Cookies, MIME::Entity, Getopt::Std and Fcntl.

Another note: I’m not sure imap2soap handles resubscribes – which were added in CiviCRM 1.9 – so it might be a good idea to ask for that too; the relevant changes are not extensive.

Quote from: Denver Dave on January 14, 2008, 08:49:53 am
We have fairly few bounces maybe 100 out of 2000 emails and will have much less if we clean them up by putting the emails on hold. It is feasible for us to handle bounces manually, working on that, but would be nice to have the automatic capability (I think).

Note: this approach would work only for bounces that come to the bounce…@… email address, not SMTP-level bounces. It still would be better, though.

Quote from: Denver Dave on January 14, 2008, 12:00:37 pm
I don't have any idea what a hashbang is or if this is a standard feature of Cpanel 11 or something special that the host has setup.

Wikipedia to the rescue. :) On Unices, if you make a text/script file executable, the system check the file’s first line to see what program should be executed to run it. It’s a standard approach; if you look into the imap2soap sources, the first line says, ‘run me with the Perl interpreter’: #!/usr/bin/perl -w

Quote from: Denver Dave on January 14, 2008, 08:49:53 am
I'm also not sure why php can't read the email directly

Because nobody wrote a PHP-to-SOAP gateway for CiviCRM (nor any other PHP script that would register the incoming emails with CiviCRM/CiviMail); the Perl solution we use (AMaViS) is known to work and cope with large amounts of email traffic. Code contributions are more than welcome. :)
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: Pipe to a Program with Cpanel ?
February 25, 2008, 06:03:58 pm
Some of my hosts offer the pipe to a program with cpanel and some don't.  Because of this and because php seems to read the pop3 email catch all account just fine, I'm not looking at the cpanel approach anymore, but looking at using php to process the email bounces directly.  See this discussion:
http://forum.civicrm.org/index.php/topic,2505.msg10681.html#msg10681

Thought I'd leave a trail
« Last Edit: February 25, 2008, 06:20:14 pm by Denver Dave »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Pipe to a Program with Cpanel ?

This forum was archived on 2017-11-26.