Hi folks,

Nice work on og2list. I'm using it on http://sany-ip.eu for internal communication, and we had to fix a couple of bugs. The last one I just encountered concernes the "From:" header parsing in mail-in.pl script, somewhere around line 320. Here is the new code:

($from_name, $from_address) =
($head->get("From",0) =~ /^\s*(.*?)\s*<?(\S+?\@\S+?)>?\s*$/);

if (!$from_name) {
($from_name) = ($from_address =~ /^(.*)\@.*$/);
$from_name =~ s/[\.\_\-]/ /;
}

($to_name, $to_address) =
($head->get("To",0) =~ /^\s*(.*?)\s*<?(\S+?\@\S+?)>?\s*$/);

I needed to change the regexp because one of the partners uses Lotus notes, and sends headers of the form "From: name@domain".

Hope this helps.

kindest regards
Denis

Comments

Amazon’s picture

Denis, it is preferred is you follow these guidelines when posting improvements.

http://drupal.org/diffandpatch

Thanks for your contribution.

Kieran

killes@www.drop.org’s picture

Denno, can you please post the From: header of that mail exactly as it was in the mail? (of coure replace name and address)

gerhard killesreiter’s picture

Status: Active » Postponed (maintainer needs more info)