Re: Header fields & Exim
Mark Overmeer <[email protected]> Tue, 31 Aug 2004 14:21:19 +0200
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Mike Mimic ([email protected]) [040828 23:27]: > I think that "Received" header field should be wraped > differently into lines than other fields when adding > it with Mail::Box. As I searched RFCs there are > nothing about that there but it is some kind of common > practice that wrapped lines start with \t and not with > space. So I propose adding some option which would > control what is first character in wrapped lines. > Maybe for generating field objects in general (so that > some custom fields could also use this). The rules are that folding may add a newline before a tab or blank... it's not the tab or blank which is inserted. So: if you add: (all on one line) $head->add(Received => "from ns.ATComputing.nl (atcmpr.ATComputing.nl [192.84.30.69])\tby atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA27804\tfor <[email protected]>; Mon, 28 Jun 1999 19:20:45 +0200 (MET DST)"); you may get lucky, and accidentally folded on the tabs. The only other option is $head->add(Received => <<_RECEIVED); from ns.ATComputing.nl (atcmpr.ATComputing.nl [192.84.30.69]) \tby atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA27804 \tfor <[email protected]>; Mon, 28 Jun 1999 19:20:45 +0200 (MET DST) _RECEIVED > I know that I could specify wrapping by myself but the > problem is that than I have to check lines lengths and > everything by myself too and why should I do this if > Mail::Box already does this. Either you want automatic folder, or you don't. > And it should be added to the top of the header and > not at the end (this is according to RFC) - or is > there some other method which already does this? The RFC says that it should be added "in reverse order", which means that new received headers must be added above existing ones. It does not specify where they should end-up. > $message->send(via=>'exim', from=>'<>'); > > > Can't call method "isa" without a package or object > reference at /usr/share/perl5/Mail/Transport/Exim.pm > line 35. Patched: - $from = $from->address if $from->isa('Mail::Address'); + $from = $from->address if ref $from && $from->isa('Mail::Address'); -- Thanks MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net