[sork] Patch for vacation, concerns PEAR address list parser
Espen Jürgensen
espen at hhkol.dk
Mon May 24 13:24:40 PDT 2004
Since I upgraded PEAR_Mail to version 1.13, I have had a couple of
problems with Vacation. In the new version of PEAR_Mail the behaviour of
parseAddressList has changed, so strings which contain addresses without
domains (a local mailbox) and vacation strings ("|/bin/vacation xxx")
result in PEAR errors.
The new behaviour might be sensible from an RFC point of view, but it
affects Vacation in two ways:
1) _makeEmailAddress fails when $realm = 'default'
2) _parseForward fails because the vacation string gives an error
The attached patch deals with 2). It exchanges PEAR_Mail with
imap_rfc822_parse_adrlist, since PEAR_Mail isn't suitable for parsing
.forward strings any more. I am aware that .forward files and RFC822 are
not entirely the same matter, so PEAR_Mail isn't to blame, it just isn't
suitable.
Using imap_rfc822 should be pretty safe. I have used it for this purpose
since PHP3, and its behaviour hasn't changed, so it's a 'stable target'.
The patch also addresses a couple of other issues (preserving
backslashes, sanity check of makeEmailAddress output and removes the
change from cvs 1.29 to 1.30 since it no longer applies).
Kind regards,
Espen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forwards.php.patch
Type: text/x-patch
Size: 2751 bytes
Desc: not available
Url : http://lists.horde.org/archives/sork/attachments/20040524/fa1c55fb/forwards.php.bin
More information about the sork
mailing list