php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21011 imap_header() connot parse a mail with multiple To: clause
Submitted: 2002-12-14 10:04 UTC Modified: 2002-12-14 12:07 UTC
From: admin at osmium-work dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.2.3 OS: Linux 2.2.17-21mdksecure
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at osmium-work dot com
New email:
PHP Version: OS:

 

 [2002-12-14 10:04 UTC] admin at osmium-work dot com
i have nocc installed with apache 1.3.27 and php 4.2.3

apache configure options :
./configure --prefix=/home/apache \
--enable-module=setenvif \
--enable-module=mime \
--enable-module=mime_magic \
--enable-module=alias \
--enable-module=so \
--enable-module=dir \
--enable-module=access \
--disable-module=headers \
--disable-module=asis \
--disable-module=cgi \
--enable-module=status \
--enable-module=info \
--enable-module=log_config \
--enable-module=env \
--disable-module=unique_id \
--disable-module=negotiation \
--disable-module=rewrite \
--disable-module=userdir \
--enable-module=speling \
--disable-module=vhost_alias \
--disable-module=autoindex \
--disable-module=auth_anon \
--disable-module=auth_dbm \
--disable-module=auth_db \
--enable-module=auth_digest \
--enable-module=auth \
--disable-module=cern_meta \
--disable-module=expires \
--disable-module=include \
--disable-module=actions \
--disable-module=digest \
--disable-module=log_agent \
--disable-module=log_referer \
--disable-module=usertrack \
--disable-module=example \
--disable-module=imap \
--disable-module=proxy \
--disable-module=mmap_static

php configure line :
./configure  --prefix=/home/php --without-mysql --with-oci8=$ORACLE_HOME --with-oracle --with-xml --with-gettext --enable-calendar --enable-ftp --enable-magic-quotes  --without-gd  --enable-track-vars --with-apxs=/home/apache/bin/apxs --with-imap --enable-sigchild

i got in trouble whith nocc while reading a particular mailbox

i have written this little script to isolate the problem :

$mbox = imap_open ("{x.x.x.x/pop3:110}", "U", "P");
$check = imap_check($mbox);
print_r($check);

for($i=1;$i<=$check->Nmsgs;$i++){
    print_r(imap_header($mbox,$i));
}
imap_close($mbox);

and finally here's the bogus mail (i have skipped the attachment) :

From axefour@iam.net.ma  Tue Dec 10 18:24:39 2002
Return-Path: <axefour@iam.net.ma>
Received: from test (smtp-send2.iam.net.ma [212.217.54.149])
        by wanadoo.net.ma (------/------) with ESMTP id gBAIOEfe012460;
        Tue, 10 Dec 2002 18:24:19 GMT
Received: from axefour (ppp-76-135.iam.net.ma [212.217.76.135] (may be forged))
        by test (8.11.6+Sun/8.10.2) with SMTP id gBAHcxo11588;
        Tue, 10 Dec 2002 17:38:59 GMT
Message-ID: <003e01c2a074$95bac110$0200a8c0@axefour>
Reply-To: "Mohamed SAHIFA" <axefour@iam.net.ma>
From: "Mohamed SAHIFA" <axefour@iam.net.ma>
To: "U.H.S" <uhs@casanet.net.ma>,
   "ULTRA WAVE INFO P.H" <ultraweveinfo@isuisse.com>,
   "ULTRANET MULTIMEDIA" <ultranet@marocnet.net.ma>,
   "UNIDATA" <unidata@goldnet.net.ma>,
   "UNIVERS LOGICIELS" <univerlogiciel@hotmail.com>,
   "VEMAPIE" <vemapie@iam.net.ma>, "VICOB" <vicob@iam.com>,
   "VISUAL SOFT" <visoft@iname.com>,
   "VOICE TELECOMM" <infos@voice-telecomm.com>,
   "WALSMAN AND ASSOCATIATES" <swills@walsman.co.ma>,
   "WELCOM INFO" <welcom@welcom.net.ma>,
   "WHITE HOUSE" <white-housse@techno.net.ma>, "WINTEK" <wintek@iam.net.ma>,
   "X-MEDIA" <xmedia@iam.net.ma>,
   "ZENITH ENGINEERING" <zenithengineering@menara.net.ma>,
   "TALAPAC" <telepac@telepactechnology.com>,
   "TAZA INFO" <tazainfo@iam.net.ma>,
   "TECHNIC FILE" <technicfile@marocnet.net.ma>,
   "TECHNORIUM" <technorium@yahoo.fr>, "TECLISER" <ali@mtds.com>,
   "TELE SERVICES ET SOUS-TRAITANCES" <tsst@casanet.co.ma>,
   "TELEDIS" <selamrani@comway.co.ma>, "TELEDYNE" <teledyne@techno.net.ma>,
   "TELESYSTEMS" <telesys@tmis.co.ma>, "TELINFO" <telinfo5@elan.net.ma>,
   "TETOUAN WEB" <tetweb@iam.net.ma>, "THALES" <thales@casanet.net.ma>,
   "TIDET" <mantidet@iam.net.ma>, "TIMEXP" <timexp@iam.net.ma>,
   "TIPNET" <tipnet@iam.net.ma>, "TMIS" <tmis@tmis.co.ma>,
   "TODO SERVICES" <tservices@meganet.net.ma>,
   "TOP COMPUTER" <topcomputer@marocnet.net.ma>,
   "TOP MAINTENANCE" <topm@techno.net.ma>,
   "TOTEM MULTIMEDIA" <totem@wanadoo.ma>,
   "TRANSPARENCE INFO" <transparence@futurnet.net.ma>,
   "SYSTEME DISTRIBUTION" <sysdis@meganet.net.ma>,
   "SYNOPTI" <synopti@winner.net.ma>, "SWISSOFT" <swissoft@techno.net.ma>,
   "SUNNY BUREAU" <sunnybur@iam.net.ma>, "SUNCOM" <suncom@iam.net.ma>,
   "SUD ELECTRONIQUE INFO" <sei@iam.net.ma>,
   "STE AMIRALE INFO" <amirale@wanadoo.net.ma>,
   "STAR DE MAINTENANCE INFO" <star@fesnet.net.ma>,
   "SR TELECOM" <sr.telecom@wanadoo.net.ma>,
   "SOUTH SYSTEMS" <a.lamzibri@wanadoo.net.ma>,
   "SOPSI" <sopsi@futurnet.net.ma>,
   "SOPHIA CONCEPT" <aziz.gaamouz@sophiaconcept.ma>,
   "SONORAC" <sonorac@winner.net.ma>, "SOMARA" <somara@open.net.ma>,
   "SOLUTIONS INFO" <soufiani@open.net.ma>, "SOFTWIN" <soft@casanet.net.ma>,
   "SOCIETE INTER DE FOURNITURE ET D'ETUDE" <sifefahir@com.net.ma>,
   "SMEIN" <smeininf@smara.net.ma>, "SKYNET" <kazen@caramail.com>,
   "SIFEB" <sifebfakhir@com.net.ma>, "SETTANET" <settanet@settanet.net.ma>,
   "SERMIA" <sermia@atlasnet.net.ma>, "SEKA SYSTEMES" <seka@wanadoo.net.ma>,
   "SEDOF INFO" <sedofinfo@techno.net.ma>, "SEDEL" <azzedine@winner.net.ma>,
   "SEANET" <info@seanet.net.ma>, "SCOTIB" <administration@scotib.co.ma>,
   "SAS SOFTWARE" <sas@casanet.net.ma>, "SAHARA COMPUTER" <sahcomp@iam.net.ma>,
   "SAFIA NET" <safianet@iam.net.ma>, "S.F.I.B" <sfib@cyber.net.ma>,
   "ROSOTEL" <contact@resotel.net.ma>, "RODIN" <rodin@rodinmaroc.com>,
   "REPER" <reper@meganet.net.ma>, "REMOSERV" <remoserv@hotmail.com>,
   "REDAGRAPH" <redagraph@redagraph.co.ma>,
   "RAMCHAND" <ramchand@casanet.net.ma>, "RADIOCOM" <radiocom@mail.sis.net.ma>,
   "QUIK BUREAU SERVICES" <fatiq@iam.net.ma>,
   "QUICPHONE" <quicphone@wanadoo.net.ma>, "QUALISOFT" <qualisoft@elan.net.ma>,
   "ORSIA CONSULTING" <eddaoudi@atlasnet.net.ma>,
   "ORBIT TECHNOLOGY" <orbi@techno.net.ma>,
   "ORAPPLIS" <orapplis@casanet.net.ma>, "OPTIMACOM" <optimacom@iam.net.ma>,
   "OPEN TRADE" <open.trade@casanet.net.ma>,
   "OPEN SOFT" <opensoft@opensoft.co.ma>, "OLSI" <olsi@elan.net.ma>,
   "OF SU MA" <ofsuma@casanet.net.ma>, "ODISI MAROC" <odisi@iam.net.ma>,
   "OCTAVIA TECHNOLOGY" <octavia@iam.net.ma>, "NT SOFT" <ntsoft@iam.net.ma>,
   "NSE" <nse@menara.co.ma>, "NOVIBEL INFO" <novibel@hotmail.com>,
   "NOVASCO SYSTEMS" <winsoft@multimania.com>,
   "NFACTURY MAROC" <rouad@nfactury.com>, "NEXT" <nextagadir@nextagadie.com>,
   "NETWARE G.A" <NGA@AGADIRNET.NET.MA>,
   "NETOVER TECHNOLOGIE" <netover@iam.net.ma>,
   "NET INGENIERIE" <webmaster@ingenierie.net.ma>,
   "ND NET" <rbouhaddou@atlasnet.net.ma>, "NCR MAROC" <ncr@ncr-maroc.com>,
   "N.S.I" <nsi@nsi.co.ma>, "PARA INFORMATIQUE" <para-informatique@iam.net.ma>,
   "PARSIFAL" <parsifal@point.net.ma>, "PARTNET" <hlimam@mypartnet.com>,
   "PC Net" <pcnet.bl@moncourrier.com>, "PCS" <p.c.s@iam.net.ma>,
   "PCSOFT" <pcsoft@iam.net.ma>, "PIX INFO" <pix@iam.net.ma>,
   "PLAINE DE SOUSS BUREAU" <plas@iam.net.ma>,
   "PLANET COM" <aberrada@planetcom.co.ma>,
   "PLURIEL INFOET COMM" <pluriel@cybernet.net.ma>,
   "POINT NET" <ppointnet@hhotmail.com>, "POLYLOG" <wsp@allnet.net.ma>,
   "POLYSYSTEME INFO" <psi@casanet.net.ma>, "POLYTEL" <polytel@iam.net.ma>,
   "POWER POINT INFO" <ppi@wanadoo.net.ma>, "PREMAX" <premax@atlasnet.net.ma>,
   "PRESTIGE INFO" <prestige@prestige.ma>,
   "PRO SYSTEM" <prosystem@casanet.net.ma>,
   "PROCESSING TECHNOLOGIES" <processing@casanet.net.ma>,
   "PROFESSIONAL SYSTEM" <ps@techno.net.ma>,
   "PROFESSIONNEL COMPUTER" <procomputer@wanadoo.net.ma>,
   "PROLEC" <prolec@arcnet.net.ma>, "PUISSANCE 2" <puissan2@atlasnet.net.ma>,
   "MICROPLUS" <microplus@iam.net.ma>, "MICRODATA" <mdata@atlasnet.net.ma>,
   "MICRO SOS" <micro_sos@hotmail.com>,
   "MICRO SERVICES" <micser@wanadoo.net.ma>, "MICRO NAD" <micronad@aim.net.ma>,
   "MICRO INFO" <microinfo@wanadoo.net.ma>,
   "MICRO DISTRIBUTION" <M-Dist@casanet.net.ma>,
   "MICRO COM" <microcom@open.net.ma>, "MICMAC INFO" <micmac@nadornet.net.ma>,
   "MIAMI EQUIPEMENT" <iliaschafiq@hotmail.com>,
   "MERIT" <merit@casanet.net.ma>, "MEDIAPHONE" <mediaphone@iam.net.ma>,
   "MALI SOFT" <malisoft@open.net.ma>,
   "MAINFORONIC" <mainfotronic@wanadoo.net.ma>,
   "MAHA SOFT" <mahasoft@iam.net.ma>,
   =?iso-8859-1?Q?M=A7M_TECHNOLOGY?= <mmt@open.net.ma>,
   "LOGING" <halisou@techno.net.ma>, "LE BIT" <lebit@marocnet.net.ma>,
   "LAZER INFO" <lazerinfo@iam.net.ma>, "LANNET" <lannet@maghrebnet.net.ma>,
   "MTDS" <infoa@mtds.com>, "ID SOFT" <softachl@casanet.net.ma>,
   "IDESYS" <idests@atlasnet.ma>, "IDP" <idp@idp.co.ma>,
   "ILAICOM" <entreprise@ilaicom.com>, "INFELEC" <infelec@hotmail.com>,
   "INFO MAXIMALE" <infomax@aim.net.ma>,
   "INFO NETWORKS" <info@infonetworks.ma>,
   "INFO PLUS SOFTWARE" <ipsoftware@casanet.net.ma>,
   "INFO PRO" <infopro@mail-societe.com>, "INFONET" <infonet@menara.co.ma>,
   "INFORMATICA ECI" <ieci.ma@iam.net.ma>,
   "INFOVIE PLUS" <infovie@ifrance.com>,
   "INNOVATION COMPUTER" <contact@innovation.ma>,
   "INSOFT" <contact@insoft.co.ma>, "INTEGRANET" <blaghzout@hotmail.com>,
   "INTER SYSTEME ROCHE-ISYSRO" <isysro@isysro.co.ma>,
   "INTER TRONIC" <tronic@inter.net.ma>, "INTERSOFT" <intersoft@iam.net.ma>,
   "ISONET" <isonet@casanet.net.ma>, "JATEL" <jatel@techno.net.ma>,
   "JIJIF IMPEX" <abou@caramail.com>, "KAMP" <kamp@casanet.net.ma>,
   "KENZA HOUSE INFO" <info@kenzanet.net.ma>,
   "KING COMPUTER" <king.computer@casanet.net.ma>,
   "KUIK COMPUTER" <kuik@iam.net.ma>, "GNS" <gns@connectcom.net.ma>,
   "GIGERS COMPUTING" <ricom@tanja.net.ma>,
   "GENERATION MULTIMEDIA" <genmulti@open.net.ma>,
   "GCS" <service@gcs-online.com>, "FUJITSU" <malha@sni.co.ma>,
   =?iso-8859-1?Q?FOX_SOFT_=A7_SERVICES?= <foxserv@techno.net.ma>,
   "FIRST MICRO" <benmoumen@AGADIRNET.NET.MA>, "FCD" <forcondev@hotmail.com>,
   "FACE INFORMATIQUE" <fi@facenet.net.ma>,
   "HIGH TECH M.C.C" <infomcc@]hightech.edv>,
   "HORIZONS INFO" <horison@arcnet.net.ma>, "EYE TECH" <eyetech@iam.net.ma>,
   "EXTRA" <Extra@swift.ma>, "EXPERTEAM" <contact@experteam.co.ma>,
   "EXPERLEC" <mohattan@mtds.com>, "EUROMAG TECHNOLOGIES" <s-drissi@hotmail>,
   "ESPACE NET" <espacenet@maroc-oriental.com>,
   "ENIRELEC" <enirelec@fesnet.com>, "ENI" <charaibieni@iam.net.ma>,
   "EMULTEC" <emultec@casanet.net.ma>,
   "ELECTRO CONTACT" <electrocontact@marocnet.net.ma>,
   "EFM" <etablissement-freres-moussaif@usa.net>, "ECS" <ecs@ecs.net.ma>,
   "E.T.C.E INFO" <etce@etce-info.co.ma>, "D.B.M MAROC" <dbm@q-texte.net.ma>,
   "D2A SERVICES" <d2a.services@techno.net.ma>,
   "DARMAG" <darmag@arcnet.net.ma>, "DATA CONSEIL" <datacom@casanet.net.ma>,
   "DATA SEVER" <dataserver@siii.net>, "DATALINK" <datalink@open.net.ma>,
   "DCI" <dci@open.net.ma>, "DESTINATION MULTIMEDIA" <destm@microbit.net.ma>,
   "DETROIT FASHION" <dfashion@iam.net.ma>, "DIAGONE" <maildws@diagone.com>,
   "DIAGONE MEDIA" <diagone@marocnet.net.ma>,
   "DIGITEL SYSTEMS" <filali@marweb.com>,
   "DISTRILOG" <distri@cybernada.net.ma>, "DMTEC" <dmtec@casanet.net.ma>,
   "DOLEY" <doley@wanadoo.net.ma>, "DYNASOFT" <dynasoft@dsmaroc.com>,
   "BURINTEL" <burintel@wanadoo.net.ma>, "BURINFOTEL" <burinfo@iam.net.ma>,
   "BULL" <info@bull.co.ma>, "BIS" <bis@mail.sis.net.ma>,
   "BIGEC" <bigec@meganet.net.ma>, "B-DIS" <saadberrada28@hotmail.com>,
   "C.R.A.F.S" <crafs@iam.net.ma>, "CAP TECHNOLOGIE" <cap@iam.net.ma>,
   "CENTRE D'ACHAT" <camarcia@marocnet.net.ma>,
   "CENTRELEC" <centrelec@iam.net.ma>, "CIM D'EQUIPEMENT" <cim.eq@iam.net.ma>,
   "COMIFEL" <comifel@iam.net.ma>,
   "COMMUNICATION SYSTEM" <comsys@marocnet.net.ma>,
   "COMPU SERV" <compserv@iam.net.ma>, "COMPUNET" <info@compunet.co.ma>,
   "COMPUTER FUTUR INFO" <daoudi163@caramail.com>,
   "COMPUTER WORLD" <benabbes.conaho@elan.net.ma>,
   "COMSYSTEL" <comsystel@hotmail.com>, "CONNECTOM" <info@connectcom.ma>,
   "CONSULT - INFO" <ci@consult-info.net.ma>,
   "CYBER ACTION" <jt@casanet.net.ma>, "CYBER PRIMO" <contact@primo.net.ma>,
   "AB SYSTEM" <abgroupe@open.net.ma>, "ABCHIR" <abchirji@iam.net.ma>,
   "ACTION INFO" <action@casanet.net.ma>, "AFRICA WORLD" <africa.w@iam.net.ma>,
   "Africode" <africode@casanet.net.ma>,
   "AFRO AMERICAN" <teletel@global.net.ma>, "AGRO CONCEPT" <agro@iam.net.ma>,
   "ARPHOT" <arphot@iam.net.ma>
Subject: TARIF PLANET DEC 2002
Date: Tue, 10 Dec 2002 17:49:27 -0000
Organization: AXEFOUR
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_003A_01C2A074.7C938B90"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Content-Length: 94774
Lines: 1263
X-IMAPbase: 1039879354 1
Status: RO
X-Status:
X-Keywords:
X-UID: 1

C'est un message de format MIME en plusieurs parties.

------=_NextPart_000_003A_01C2A074.7C938B90
Content-Type: multipart/alternative;
        boundary="----=_NextPart_001_003B_01C2A074.7C981F70"


------=_NextPart_001_003B_01C2A074.7C981F70
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Bonjour,

Ci-joint le Tarif des produits r=E9seaux ( PLANET ) Dec 2002.

Salutations

------=_NextPart_001_003B_01C2A074.7C981F70
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Bonjour,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ci-joint le Tarif des produits =
r=E9seaux ( PLANET )=20
Dec 2002.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Salutations</FONT></DIV></BODY></HTML>

------=_NextPart_001_003B_01C2A074.7C981F70--

------=_NextPart_000_003A_01C2A074.7C938B90
Content-Type: application/vnd.ms-excel;
        name="TARIF PLANET 101202.xls"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="TARIF PLANET 101202.xls"

------=_NextPart_000_003A_01C2A074.7C938B90--

and when i delete at least 10 receipient from the To: clause it works. whithout this i got no data from the script

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-14 12:07 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 21:01:31 2024 UTC