UNEXPECTED_DATA_AFTER_ADDRESS@.SYNTAX-ERROR and @UNKNOWN

Steeman Philip philip.steeman@kh.khbo.be
Tue, 23 Oct 2001 16:45:25 +0200 (CEST)


I think I found the error

With PHP4-CVS (phpinfo() says PHP 4.2.0-dev, and this little program:

<?php
  $val = "philip steeman <philip.steeman@kh.khbo.be>";
  $rij = imap_rfc822_parse_adrlist($val, "xx.khbo.be");
  $philip=fopen("/tmp/philip3.log", "a");
  fputs($philip, "$val\n");
  fclose($philip);
?>

The $val IS CHANGED after the call to imap_rfc822_parse_adrlist. There is
a null-char between "steeman" and "<". 

When I test it with PHP 4.0.4pl1 everything is OK.


Philip

-----------------------------------------------------------------

On Tue, 23 Oct 2001, Steeman Philip wrote:

> Hello,
> can anybody help me, or perhaps my info can help you.
> 
> I use PHP4-CVS and horde 2.1.6 and imp 2.2.6
> 
> 1) problem with UNEXPECTED_...
> 
>    when I send a message to
>      - philip.steeman@kh.khbe.be    -> no problem
>      - philip.steeman <philip.steeman@kh.khbo.be>    -> UNEXPECTED error
> 
>    I looked in the files and in horde.lib in the function "mailfrom".
>    The rcpt-parameter contains:
>    philip.steeman\0<philip.steeman@kh.khbo.be>
>                  ^^^^(a real char(0))
>    When I make a dirty fix:
>       $rcpt = strtr($rcpt, "\0", " ");
>    The UNEXPECTED error disappears !!!
> 
> 2) problem with @UNKNOWN
> 
>    When I send a mail, my saved mail in the folder sent-mail shows
>    @UNKNOWN and UNEXPECTED error.
>    But when I look in the file sent-mail (with a editor), I again see the
>    line:
>       philip.steeman\0<philip.steeman@kh.khbo.be>
>                  ^^^^(a real char(0))
> 
>    I think I can also solve this problem with that dirty fix, but I don't
>    find the place to do it.
> 
> I did not have this errors with PHP3, but when I changed to PHP4-CVS, I
> have this problem (same horde+php).
> 
> Can anybody help me?
> 
> Philip
> 
> PS: I just started with IMP2.3, and I like it, but I have to test it
> first, before my users can use it instead of IMP2.2
> 
> 
> -----------------------------------------------------------------------------
> Philip Steeman                    tel: (+32)59 56 90 16
> Zeedijk 101                       fax: (+32)59 56 90 01
> 8400 Oostende                     E-mail: philip.steeman@kh.khbo.be
> Belgium
> 
> 

-----------------------------------------------------------------------------
Philip Steeman                    tel: (+32)59 56 90 16
Zeedijk 101                       fax: (+32)59 56 90 01
8400 Oostende                     E-mail: philip.steeman@kh.khbo.be
Belgium