Closed (fixed)
Project:
Mail Comment
Version:
6.x-2.0-beta1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 May 2011 at 16:30 UTC
Updated:
18 Jun 2011 at 19:11 UTC
Hello,
First I would like to say if I need to have this issue in Mailhandler or Mailcomment - I'm not sure where things are going wrong. I was following the directions here: http://drupal.org/node/1045918.
I'm not sure what details I should provide that would make this the most useful. Here are a few details:
Drupal version: 6.19
Mail comment version: 6.x-2.0-alpha6
OS: Centos 5.5
PHP: 5.2.13
Here is the export from my mailcomment feed parser:
$feeds_importer = new stdClass;
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'board_list_comments';
$feeds_importer->config = array(
'name' => 'Board List Comments',
'description' => 'Board list comment feed importer',
'fetcher' => array(
'plugin_key' => 'MailhandlerFetcher',
'config' => array(
'filter' => 'comments',
),
),
'parser' => array(
'plugin_key' => 'MailhandlerParser',
'config' => array(
'if_auth_fails' => 'remove',
'default_commands' => 'status:1
taxonomy: [155]',
'command_plugin' => array(
'MailhandlerCommandsDefault' => 'MailhandlerCommandsDefault',
),
'authenticate_plugin' => 'MailhandlerAuthenticateDefault',
),
),
'processor' => array(
'plugin_key' => 'FeedsCommentProcessor',
'config' => array(
'input_format' => 0,
'update_existing' => 0,
'expire' => -1,
'mappings' => array(
0 => array(
'source' => 'parent_nid',
'target' => 'nid',
'unique' => FALSE,
),
1 => array(
'source' => 'parent_cid',
'target' => 'pid',
'unique' => FALSE,
),
2 => array(
'source' => 'subject',
'target' => 'subject',
'unique' => FALSE,
),
3 => array(
'source' => 'origbody',
'target' => 'comment',
'unique' => FALSE,
),
4 => array(
'source' => 'authenticated_uid',
'target' => 'uid',
'unique' => FALSE,
),
),
'author' => 0,
),
),
'content_type' => '',
'update' => 0,
'import_period' => '0',
'expire_period' => 3600,
'import_on_create' => 1,
);
Right now, every email that is imported gets created as a new node instead of a comment for an existing node.
Any help is appreciated. Thanks!
Sean
Comments
Comment #1
danepowell commentedI'm assuming that you're getting a notification (message) from the website, and replying to that message. You expect this reply to be posted as a comment, but it's posted as a new node. Is that right?
Does the notification message that you receive contain a Mail Comment signature in the body and/or threading information in the headers? A Mail Comment signature looks like "reply above this line to post attachments", and at the bottom of the body there should be a long URL that has the corresponding parent node ID, comment ID, and user ID encoded in it. The threading information should also be in an in-reply-to header, with this same encoded URL as a value.
Comment #2
pyrello commentedDane,
Your assessment is correct.
Here is the raw output of the email (with identifiying details changed or omitted):
I think that the items that you mention are included, but I am not sure.
Thanks for the prompt reply!
Sean
Comment #3
danepowell commentedWhen you reply to the message, what address are you replying to? I.e., what is the address of your Mailhandler mailbox? admin@example.com or something@dev.example.com? Note that in the Mail Comment configuration, the 'server string for message id' must match the domain of the receiving address.
Comment #4
pyrello commentedDoes that include sub-domains? So, if my mailbox is at list@mail.example.com, my 'server string for message id' should be set to mail.example.com?
Thanks!
Comment #5
danepowell commentedThat's exactly right. If your mailbox is mail.example.com, but your server string is example.com, that could be the cause of the failures.
Comment #6
danepowell commentedComment #7
pyrello commentedI changed it so that the server line domain and the mailhandler email address match up. The do not match the domain that the server is on (dev version). Any chance this is what is causing the issue?
Sean
Comment #8
danepowell commentedActually, as I'm looking through the code, I realize that it's not utterly imperative that the 'Server string for Message ID' (Server String) match your domain name.
The Server String variable is used to create the Message-ID header, which, according to RFCs, should be universally unique. That's why you want to use a Server String that's unique to your Drupal installation- in most cases, that would be the domain name.
Thus, the Server String is embedded in all outgoing messages. Upon reply, the Server String is verified to ensure that the message is part of a thread that originated with your site. If you've changed the Server String variable in the meantime, note that this could cause messages to be handled incorrectly!
In conclusion: you should set your Server String to be the actual URL by which you access your Drupal installation, but keep in mind that changing this setting will invalidate any previously-sent Mail Comment emails.
Comment #9
Jhef.Vicedo commentedHi,
I get the email notification and retrieval to work, but comment via email fails. But I dont think retrieved messages contain the comment ID required for threading. I see this Message ID from the email headers:
In-Reply-To: <1.1401.0.1304762785.975670fd7a74c8abbb6edd4ee7900ce4@example.com>
I think that zero (0) is supposed to be the Comment ID.
Any help is much appreciated.
Thanks,
Comment #10
danepowell commentedJhef.Vicedo- please open a new issue. We are only dealing with the 6.x-2.x branch here. FYI, you are correct, the format is uid.nid.cid.time.signature@server string.
pyrello- I assume you're still having trouble? Have you tried beta1? Based on the message that you posted above, can you confirm that there is a user with uid 5789, node with nid 7211, and comment with cid 79? If so, then we can at least say that the problem is on the receiving side, not the sending side.
Comment #11
scarr commentedSubscribing
Comment #12
pyrello commentedOkay, so I have tried running the import just using my comment feed importer. I get the following error:
Unable create comment with empty NIDI don't know if this helps or not.
Thanks!
Sean
UPDATE: After a little digging, I have discovered that this error is generated from FeedsCommentProcessor.inc which is part of the feed_comment_processor module.
Another thing that I noticed is that when the message comes from the site, it has a message id like this:
Message-ID: <5789.7426.0.1307081625.c58f54a7623bfd2c8321376e26068745@mail.cgin.coop>But the message that gets sent out from my email client (gmail), it looks like:
Message-ID: <BANLkTimtpEmcTUVuwXHymHMANJMbs8Ek-w@mail.gmail.com>And the original message id is contained in a references section:
References: <5789.7426.0.1307081625.c58f54a7623bfd2c8321376e26068745@mail.cgin.coop>Is that as it should be?
UDPATE #2: I have finally gotten this to work. It still does not work for all of my use cases, but I have gotten an email to be correctly added as a comment both in response to a node creation notification and a comment creation notification, but only in response to running the import for the comment feed processor. I'm going to open a separate issue for why it doesn't work when you run all the importers together during cron.
Thanks so much for all the help!
Comment #13
pyrello commentedSetting to fixed because it appears to just be my own confusion in setting this up as opposed to an actual issue.