"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
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
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
#4
Automatically closed -- issue fixed for two weeks with no activity.
#5
This bug still exists in 1.5.
The attached patch fixes it.
#6
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
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
Please test the attached patch. If there are no errors, I'll commit it.
#9
I'm using 5.x -- here is a patch that works.
#10
Committed.
#11
Automatically closed -- issue fixed for two weeks with no activity.
#12
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
I just came to post a patch for this bug on 5.x too - a 1.5 release would be good.