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 »
  • Using IMAP2SOAP »
  • 403 Error when running it
Pages: [1]

Author Topic: 403 Error when running it  (Read 11150 times)

rogeringraham

  • Guest
403 Error when running it
July 23, 2008, 01:05:08 am
it's giving me a 403 error when I try to run it. Has anyone else run into this? Any ideas on what could be causing this?

root@server [/home/clearpoi/civimail]# imap2soap.pl -n /home/clearpoi/civimail/imap2soap.conf
imap2soap: Initializing http://www.clearpointadvance.com/civicrm/extern/soap.php
imap2soap: Fatal: During SOAP initialization (403 Forbidden at /usr/sbin/imap2soap.pl line 141
)

Thanks so much,

R

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: 403 Error when running it
July 23, 2008, 07:24:30 am
my line 141 is 

my $result =
    $soapClient->authenticate($SOAP_User, $SOAP_Password);

so a 403 forbidden might make sense if you have the wrong details in your conf file.

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: 403 Error when running it
July 24, 2008, 02:52:17 pm
I'm getting a 500 error on the same line.  I've tested my account a couple of times to make sure my user name and password are okay.

anyone having any luck here

below is my SOAP:LITE output

Code: [Select]
imap2soap: Initializing http://www.example.com/sites/all/modules/civicrm/extern/soap.php
SOAP::Transport::HTTP::Client::send_receive: POST http://www.exmaple.com/sites/all/modules/civicrm/extern/soap.php HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 517
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:civicrm#authenticate"

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><authenticate xmlns="urn:civicrm"><c-gensym3 xsi:type="xsd:string">user</c-gensym3><c-gensym5 xsi:type="xsd:string">pword</c-gensym5></authenticate></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.0 500 Internal Server Error
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Thu, 24 Jul 2008 22:21:05 GMT
Pragma: no-cache
Server: Apache/2.2.3 (CentOS)
Content-Length: 0
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Client-Date: Thu, 24 Jul 2008 22:21:05 GMT
Client-Peer: xxx.xxx.xxx.xxx:80
Client-Response-Num: 1
Set-Cookie: PHPSESSID=91blrvrni1e25aj4f9g0u0; path=/
X-Powered-By: PHP/5.2.6

imap2soap: Fatal: During SOAP initialization  (500 Internal Server Error at /etc/imap2soap.pl line 141
)
« Last Edit: July 24, 2008, 03:26:42 pm by jalama »
http://www.rootyhollow.com

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: 403 Error when running it
July 28, 2008, 10:28:33 am
I ended up re-compiling PHP with SOAP support, that took care of the SOAP & 500 error issues.


I know that doesn't help everyone, but got me past this hurdle

:)
http://www.rootyhollow.com

clearlytechnical

  • Guest
Re: 403 Error when running it
September 14, 2008, 02:07:56 pm
I wanted to share my findings.

After I went through the ENTIRE Soap::Lite process. It still didn't work. I was getting a 500 Internal Server error. It's not my config as I now have it working (I will share what I did) and it works fine with existing script.

I am running a plesk 8.4 server on CentOS using Scott's Art repository. If you are not familar with AtomicRocketTurtle.com and you have a plesk based server, then you will be. It's the defacto location for all things related to plesk. Pre-compiled and working packages and a smart group of users. Go there now!

Ok, so after ALL THAT dependency solving drama, I gave up. I then ran "yum install php-soap" and it installed one package and low and behold, script worked! This would confirm what jalama said and did.

Anyway, I don't know why soap::lite was not working.

If you are reading this post and you are trying to setup email, I wish you luck. It is NO SMALL task for a newbie much less an intermediate administrator. I would consider that service or contracting one of the consultants. It's no fun.

If I may, I would like to make a suggestion for imap2soap solution. From what I read, imap2soap.pl can be run on any server. You just need to provide the information necessary for the conf file.

If anyone is interested, I can setup a server which will do the imap2soap solution remotely. (I'm not the most qualified, but I would get it done). The idea is this.

Why make users go through this pain just to get their catchall email to send civic related emails back to the soap.php dilio on civicrm? I would think this is a GREAT IDEA for a SERVICE that civicrm could provide. IT WOULD HAVE TO BE MUCH LESS expensive timewise. The average virtual / shared server user is screwed.

This way a user could run their own email, visit the (just an idea) civiGate.civicrm.org/imap2soap site and enter their information after signing up. Then the imap2soap script could run for that users domain. A great way to build statistics on mail usage, and other helpful information. It would certainly help increase adoption for Joomla/Drupal users and shared hosted clients.

Anyway, I am sure there is a reason this has not been done. And I am not talking about a full blown outsourced email solution as I have seen recommended throught the boards. Rather just a simple form to fill out, capture the data for the imap2soap script, then run.

Please feel free to reply if you would be interested in such a service and I will look futher into this.

clearlytechnical

  • Guest
Re: 403 Error when running it
September 15, 2008, 10:33:22 am
This is an update to my earlier findings.

I think the reason I didn't have any luck with Soap::Lite was because I did a server based install, and not an install for the user I was setting this up for.

I am also running suPHP (google it). So I think I was getting a 500 because my user's account couldn't access the soap::lite. Just a theory, not sure of the details. But I wonder if it would have worked if I was logged in as the user when I setup the Soap::Lite instead of root ;-)

Anyway, php-soap rpm got me right. Just wanted to share this update. Oh, I do recall seeing a NICE how-to for user based SOAP::Lite install (if someone finds it, please post here as I am certain it will help others. It was a CPAN based shell install.)

Hope this helps others. You are not alone. This is a good message board and it's well organized. Just keep plugging along and you will get there.

I can assure you, as someone who has installed SugarCRM, vTiger, and many many many other PHP based projects, not one of them is really easier than the other when you get down to it. CiviCRM has a great deal of reward for anyone willing to see it through.

Don't give up!

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 403 Error when running it
September 20, 2008, 08:38:25 am
Dear Clearly Technical,

You asked for a mail service ... look at CiviSMTP at http://forum.civicrm.org/index.php/board,25.0.html

I would have used it myself except the providers want to be able to call the SOAP services on your box, using a username/password which you supply them. That's a bit risky from my point of view - particularly as I use Joomla! which has no fine-grained access control.

What I did was set up a server which filters CiviMail VERP messages and then passes them on to a single address on my CiviCRM box. I run imap2soap from there, so all the SOAP calls are local and secure.

I'm thinking of bullet-proofing this server and providing it as a service, if you're interested.

Ken

clearlytechnical

  • Guest
Re: 403 Error when running it
September 21, 2008, 05:55:39 pm
Quote from: ken on September 20, 2008, 08:38:25 am
Dear Clearly Technical,

You asked for a mail service ... look at CiviSMTP at http://forum.civicrm.org/index.php/board,25.0.html

I would have used it myself except the providers want to be able to call the SOAP services on your box, using a username/password which you supply them. That's a bit risky from my point of view - particularly as I use Joomla! which has no fine-grained access control.

What I did was set up a server which filters CiviMail VERP messages and then passes them on to a single address on my CiviCRM box. I run imap2soap from there, so all the SOAP calls are local and secure.

I'm thinking of bullet-proofing this server and providing it as a service, if you're interested.

Ken

Ken,

Actually, I was proposing to offer an imap2soap service, not looking for a full blown smtp service for civic. The logic was this. If you don't need to run the imap2soap.pl script on your local box, then it might be a great little service to offer and help get people up and running faster. They just provide their imap information and the url to their soap.php script. This way, they could setup civic, their smtp, and then use imap to process the verp emails.

It was just an idea.


Thank you for the link and follow up though. Looks like I am going to have to pretend to be a programmer and modify that script as per bgm's (don't have the post handy) post, or wait until someone who is a programmer updates the imap2soap script for CiviCRM 2.1.

If I get it working, I will post.



fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: 403 Error when running it
September 22, 2008, 06:58:41 am
Quote
Looks like I am going to have to pretend to be a programmer and modify that script as per bgm's (don't have the post handy) post, or wait until someone who is a programmer updates the imap2soap script for CiviCRM 2.1.

I still don't have a working v2.1 sandbox (though I expect to by later this week) so I don't yet know the differences in v2.1 that would affect imap2soap.pl.  If you could post them or point me to a list of them that would help ensure that any updates I make cover all the requirements.

Quote
If I get it working, I will post.

And if you do so, I will review and incorporate your updates.

Thanks!
=Fen

clearlytechnical

  • Guest
Re: 403 Error when running it
September 25, 2008, 10:13:34 am
Ken,

I have a server with 1and1 I am not using. It's a dedicated Linux box. If you want, I would like to echo your solution. I am running suPHP on my box and it's throwing authentication errors when it gets to the soap part of the exchange. I think it's a rights issue, not sure. Anyway, at this point, I could use some help. If you can get me going, I will be happy to buy you a beer and some pizza, and then some more beer after pizza! I have a budget, but it's for a non-profit, so it's not much.



Quote from: ken on September 20, 2008, 08:38:25 am
Dear Clearly Technical,

You asked for a mail service ... look at CiviSMTP at http://forum.civicrm.org/index.php/board,25.0.html

I would have used it myself except the providers want to be able to call the SOAP services on your box, using a username/password which you supply them. That's a bit risky from my point of view - particularly as I use Joomla! which has no fine-grained access control.

What I did was set up a server which filters CiviMail VERP messages and then passes them on to a single address on my CiviCRM box. I run imap2soap from there, so all the SOAP calls are local and secure.

I'm thinking of bullet-proofing this server and providing it as a service, if you're interested.

Ken

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 403 Error when running it
September 25, 2008, 08:39:20 pm
Dear Clearly,

I've never used suPHP so I'm not sure I can help there.

To clarify what I've done, so you can see whether it's what you want ...
  • My problem: CiviCRM is hosted on a shared server and my provider won't let me have a "catch all" address. So I need a way of capturing emails sent to VERP addresses and putting them in an email account where I can process them (I have no trouble running imap2soap.pl)
  • Technology set: Linux (Centos); Exim; MySQL; bash
  • Sending logic: Exim authenticates the sender; Exim verifies the sender if email address matches 'bounce' VERP pattern; store domain/job/event-queue/domain id's in MySQL [this measure allows me to prevent abuse]
  • Receiving logic: Exim verifies the recipient if email matches VERP pattern AND domain/job/event-queue/domain id's are in MySQL (ie, original message was sent from this box) AND original message was not sent too long ago [these measures protect against abuse, since I only accept responses sent out recently by me]; then Exim forwards the message to an email address where imap2soap can process it
  • Limitations: no support for CiviCRM 2.1 VERP addresses; versions of Exim and MySQL need upgrading; use of bash scripts called from Exim has a high overhead, and logic should change to use direct calls to MySQL from Exim

I get the feeling that what you are doing is processing the messages with imap2soap, and my solution doesn't even touch that. It seems that what we're doing is complementary,

Ken

clearlytechnical

  • Guest
Re: 403 Error when running it
September 26, 2008, 08:37:30 am
Quote from: ken on September 25, 2008, 08:39:20 pm
Dear Clearly,

I've never used suPHP so I'm not sure I can help there.

To clarify what I've done, so you can see whether it's what you want ...
  • My problem: CiviCRM is hosted on a shared server and my provider won't let me have a "catch all" address. So I need a way of capturing emails sent to VERP addresses and putting them in an email account where I can process them (I have no trouble running imap2soap.pl)
  • Technology set: Linux (Centos); Exim; MySQL; bash
  • Sending logic: Exim authenticates the sender; Exim verifies the sender if email address matches 'bounce' VERP pattern; store domain/job/event-queue/domain id's in MySQL [this measure allows me to prevent abuse]
  • Receiving logic: Exim verifies the recipient if email matches VERP pattern AND domain/job/event-queue/domain id's are in MySQL (ie, original message was sent from this box) AND original message was not sent too long ago [these measures protect against abuse, since I only accept responses sent out recently by me]; then Exim forwards the message to an email address where imap2soap can process it
  • Limitations: no support for CiviCRM 2.1 VERP addresses; versions of Exim and MySQL need upgrading; use of bash scripts called from Exim has a high overhead, and logic should change to use direct calls to MySQL from Exim

I get the feeling that what you are doing is processing the messages with imap2soap, and my solution doesn't even touch that. It seems that what we're doing is complementary,

Ken

Ken, no catchall? I can kind of understand that, but pretty lame. Would be nice if there was an email wild card account you could setup with a grep syntax or something. Sounds like you kind of did that manually ;-)

Ok, so here is where I am at. I am runnning 2.1 beta 6 now. I just want to get my mail working, lol. I think I have to wait for the php version of imap2soap solution.

Thank you for the feedback, and your solution is eloquent. I am sure many members of the board could use your How-To as it is much slicker than a Catch All solution. Perhaps it could be part of the php solution everyone is lobbying for?


Good stuff, great board, thank you.



ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 403 Error when running it
September 28, 2008, 12:33:10 am
Re: catch-all addresses

The problem with catch-all addresses it that spammers love them.

Mail-transfer-agents will validate the sender address of a message to ensure it's coming from a valid sender. Spammers can get past this check by using an address from a server set to accept catch-all addresses.

So I set up a VPS box to do the single function of mapping.

Ken

clearlytechnical

  • Guest
Re: 403 Error when running it
October 01, 2008, 12:01:49 pm
Ken,

I have to tell you, between RBL and Greylisting, I get next to zero emails in my catchall. Just an FYI.

Does anyone have a solution for 2.1+ for imap2soap working yet?

I would think this is an important feature, lol. You know, email?

Anyway, standing by ready to help.



Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using IMAP2SOAP »
  • 403 Error when running it

This forum was archived on 2017-11-26.