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.

CommentFileSizeAuthor
#9 parenth5x.patch817 bytesmarcp
#8 parenth.patch843 bytesz.stolar
#5 mailhandler.diff544 bytescbguder

Comments

grub’s picture

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.

grub’s picture

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.

moshe weitzman’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

cbguder’s picture

Version: 6.x-1.3 » 6.x-1.5
Category: support » bug
Status: Closed (fixed) » Active
StatusFileSize
new544 bytes

This bug still exists in 1.5.

The attached patch fixes it.

marcp’s picture

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.

marcp’s picture

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;
  }
z.stolar’s picture

Status: Active » Needs review
StatusFileSize
new843 bytes

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

marcp’s picture

StatusFileSize
new817 bytes

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

z.stolar’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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

marcp’s picture

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?

mr.j’s picture

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