"From header: Sender" doesn't seem to work for listserv mails

grub - August 6, 2008 - 22:19
Project:Mailhandler
Version:6.x-1.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm connecting fine and receiving posts when made manually, but when I try to receive mails sent from the listserv mails are rejected with the message "The e-mail address 'example@example.net' may not create story items." I have "Sender" in the "From header:" field and I have checked that the email header for "Sender" corresponds to the email address of a user with permissions to post stories.

If I check the logs it seems that the "From header:" command isn't having any effect, and it is using the "From:" field instead.

Any help or suggestions would be appreciated.

Cheers, Ben.

#1

grub - August 9, 2008 - 14:05

This seems to be a problem with mailman, I've tried with other mailing lists and all is working as it should. Mailman seems to append '-bounces' to the Sender field, perhaps that is what is causing the problem. If anybody knows how to make a mailman listserv compatible with mailhandler, or a possible workaround, that'd be great.

#2

grub - August 10, 2008 - 22:26

I changed the From header: field to "X-BeenThere" and everything works as it should. The X-BeenThere header references the mailing list 'example@example.net' while the drupal user account must have the email 'example-bounces@example.net' for this to work.

#3

moshe weitzman - August 10, 2008 - 23:28
Status:active» fixed

#4

Anonymous (not verified) - August 24, 2008 - 23:33
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#5

cbguder - November 15, 2008 - 12:02
Version:6.x-1.3» 6.x-1.5
Category:support request» bug report
Status:closed» active

This bug still exists in 1.5.

The attached patch fixes it.

AttachmentSize
mailhandler.diff 544 bytes

#6

marcp - November 18, 2008 - 06:06

This same issue exists in 5.x-1.4. Manually applying the patch above fixes the problem there, too. In 5.x-1.4 the fix needs to happen on line 432.

#7

marcp - November 18, 2008 - 06:10

Looking at the code again, you shouldn't need to break the thing up into the assignment and if statements. The code currently says:

  if ($fromheader = strtolower($mailbox['fromheader']) && isset($header->$fromheader)) {
    $from = $header->$fromheader;
  }

It needs some more parentheses:
  if (($fromheader = strtolower($mailbox['fromheader']) && isset($header->$fromheader))) {
    $from = $header->$fromheader;
  }

#8

z.stolar - December 8, 2008 - 21:31
Status:active» needs review

Please test the attached patch. If there are no errors, I'll commit it.

AttachmentSize
parenth.patch 843 bytes

#9

marcp - December 12, 2008 - 21:52

I'm using 5.x -- here is a patch that works.

AttachmentSize
parenth5x.patch 817 bytes

#10

z.stolar - December 25, 2008 - 13:04
Status:needs review» fixed

Committed.

#11

System Message - January 8, 2009 - 13:10
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#12

marcp - February 2, 2009 - 20:54

Thanks for committing to 5.x. The most recent 5.x release is over 4 months old. Does the bug fix in this issue qualify for an official 5.x-1.5 release?

#13

mr.j - April 20, 2009 - 07:04

I just came to post a patch for this bug on 5.x too - a 1.5 release would be good.

 
 

Drupal is a registered trademark of Dries Buytaert.