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 »
  • imap2soap - Flagged as Junk Mail when it's not.
Pages: [1]

Author Topic: imap2soap - Flagged as Junk Mail when it's not.  (Read 4442 times)

clearlytechnical

  • Guest
imap2soap - Flagged as Junk Mail when it's not.
September 15, 2008, 08:46:16 am
Ok, after much effort, I have the script processing correctly. It's accessing IMAP, it's scrubbing the mail, but instead of seeing the mail as a civicrm mail, it's saying it's junk.

I read the other posts relating to a similar situation, but I was unable to find anything in those posts that fit my problem.


First, I followed these instructions: http://wiki.civicrm.org/confluence/display/CRMDOC/Alternative+configuration+with+imap2soap.pl+-+no+Amavis+or+root+access


I got the script from here: https://svn.civicactions.net/repos/civicrm/scripts/

I am running Joomla 1.5.6, more importantly, I am running the 2.01 version of CiviCRM. As per my xml file for the install component:
<install type="component" version="2.1">
  <name>CiviCRM</name>
  <creationDate>04/01/2008</creationDate>
  <copyright>(C) CiviCRM LLC</copyright>
  <author>CiviCRM LLC</author>
  <authorEmail>info@civicrm.org</authorEmail>
  <authorUrl>civicrm.org</authorUrl>
  <version>2.1</version>
  <description>CiviCRM</description>
  <files>

To be clear. I do not feel this has anything to do with PHP, SOAP, or the kitchen sink. I think it has to do with the version of CiviCRM I am running and my pl script. Particularly because when I looked at the script, more specifically the regex section which scrubs for Junk mail, it is referencing whole words like "subscribe | unsubscribe" etc., which in the new version of CiviCRM that I am running, has been reduced to single letters to be compliant with 64 char RFC issue (must be less than 64 chars in the to: address).

Here is what my to string looks like that is provided to the email receipient where DOMAIN_NAME is of course the domain:
mailto:u.1.8.50.0bca88abcc346587@<DOMAIN_NAME>.com

So I tried going to this line in the script (line 303)

Line: 303 here-->    unless ($to =~ m/^\s*<?(bounce|confirm|optout|reply|subscribe|unsubscribe|resubscribe)/i)
      {
This is the message I am getting when processing mail-->        junk($imap, $msg, "Not a CiviMail message $n -- To: $to");
        next;
      }


I tried to change line 303 to include a "u" see below prior to "bounce":
unless ($to =~ m/^\s*<?(u|bounce|confirm|optout|reply|subscribe|unsubscribe|resubscribe)/i)

I have no clue what I am doing when it comes to regex, but I thought I would give it the college try. It didn't seem to help so I put it back.

Ok, this is about where I am and the problem I am having. If there is ANYONE ! who can offer ANYTHING! that might HELP! lol, I would be mighty grateful.


Thank you in advance.




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: imap2soap - Flagged as Junk Mail when it's not.
September 19, 2008, 08:46:00 pm
Hi -

I still don't have a CiviCRM 2.1 install to play with so I have to ask: does the "To:" address for a bounce or unsubscribe really look like: "mailto:u.1.8.50.0bca88abcc346587@<DOMAIN_NAME>.com"?

I haven't seen anything in the docs that suggests that (bounce|confirm|optout|reply|subscribe|unsubscribe|resubscribe) is no longer being used, and I did just look at the Amavis docs and they appear to still expect these values.  So the initial "u" is confusing me.

Your regualr expression would have caught the "u" but there's no processing for it in the rest of the code.

Maybe someone else on the list can confirm the format of CiviCRM/CiviMail 2.1 mail addresses?

=Fen

PS: I just released a new imap2soap.pl that handles multiple '<' chars at the beginning of a To: line as I've seen some that look like "To: <<bounce...."

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: imap2soap - Flagged as Junk Mail when it's not.
September 20, 2008, 07:54:46 am
Fen,

Please check out issue CRM-2574 (http://issues.civicrm.org/jira/browse/CRM-2574) which explains the changes to the format of CiviMail addresses.

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: imap2soap - Flagged as Junk Mail when it's not.
September 20, 2008, 08:18:29 am
Fen,

The following changes to the AMAVIS logic should illustrate the changes you need to make to imap2soap.pl ...

http://fisheye.civicrm.org/browse/CiviCRM/trunk/tools/amavisd-new/amavisd-new-2.5.2/amavisd?r1=14014&r2=14485

Ken

clearlytechnical

  • Guest
Re: imap2soap - Flagged as Junk Mail when it's not.
September 21, 2008, 05:45:06 pm
Quote from: fen on September 19, 2008, 08:46:00 pm
Hi -

I still don't have a CiviCRM 2.1 install to play with so I have to ask: does the "To:" address for a bounce or unsubscribe really look like: "mailto:u.1.8.50.0bca88abcc346587@<DOMAIN_NAME>.com"?

I haven't seen anything in the docs that suggests that (bounce|confirm|optout|reply|subscribe|unsubscribe|resubscribe) is no longer being used, and I did just look at the Amavis docs and they appear to still expect these values.  So the initial "u" is confusing me.

Your regualr expression would have caught the "u" but there's no processing for it in the rest of the code.

Maybe someone else on the list can confirm the format of CiviCRM/CiviMail 2.1 mail addresses?

=Fen

PS: I just released a new imap2soap.pl that handles multiple '<' chars at the beginning of a To: line as I've seen some that look like "To: <<bounce...."

Fen,

Thank you for the reply. Yes, it does indeed look like the sample I provided.

I may change the emails to match the script, rather than making the script match the email. Our to: string should stay under the 64 char limit. Anyway, going to look at Ken's idea and if you have any information, by all means, please provide it. I too will do the same!


Thanks,




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: imap2soap - Flagged as Junk Mail when it's not.
September 22, 2008, 07:02:20 am
Guess I should review all the emails before posting.  Thanks for the links.  The changes look simple enough and I will update imap2soap.pl asap (by mid-week or sooner).

=Fen

clearlytechnical

  • Guest
Re: imap2soap - Flagged as Junk Mail when it's not.
September 25, 2008, 10:10:03 am
I made the changes and still no luck. The changes were very simple, but for some reason it's still not seeing the mail as Civic mail :-(

I'm here to help if I can. I'll test or do whatever. I really want to get Civic off the ground.

Btw, I appreciate everyone's help and contributions!



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: imap2soap - Flagged as Junk Mail when it's not.
October 05, 2008, 09:12:15 pm
I've updated trunk but I haven't tested this on 2.1 as I don't have a live 2.1 site right now.

It's at https://svn.civicactions.net/repos/civicrm/scripts/imap2soap.pl - if you can test this and report back, I'd appreciate it!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using IMAP2SOAP »
  • imap2soap - Flagged as Junk Mail when it's not.

This forum was archived on 2017-11-26.