Eko wrote:
>> Try: [EMAIL PROTECTED],[EMAIL PROTECTED]
>
>Sorry, but that won't help either.... :(
>
>Bernie, Clarence, Glenn: Is there anything about this
>mentioned in the source?

Of course, in sendmail.c

>Try look at CORE, SMTP module.
>Or perhaps all the comments are still in Czech? ;-)

What are "comments"? ;-)
Seriously there are comments, but I dont think many of them are needed.
 while(string[i]==' ') //cut spaces
  i++;
I think I knew what it did anyway ;-)

Anyway, the problem is with the variable "ptr" - I think that this would
work (currently my ISP is down so I can't test anything)
TO:[EMAIL PROTECTED]
TO:[EMAIL PROTECTED]

A bad fix (well a guessed one anyway):

Count the numbers of "@"'s in the TO/CC/BCC line, set this value to the
variable "field". The reason why this fix is bad is that someone can have
an @ in the name, for example:
"Bill G@es" <[EMAIL PROTECTED]> ;-)
will not be so good since there's a @ in the name.

In "while(field!=0)" change 
 if(field == 1)
  field=0;
to
 if(field != -1)
  field--;

And change ptr so that it points after the old address.
 oldptr = ptr;
 lengthOfEmail = cutaddress(ptr);
 ...
 ptr = oldptr + lengthOfEmail;

Of course cutaddress must return the variable "i" then.

And fixing the bad part of this would be made by making sure that we don't
go outside of the memory allocated to ptr (well actually that's str).

A better option would be to use an approach like the one in cutadress() to
count them (and set field to this value), and voila we have a good fix (if
it works is another thing entirely but it should in theory <g>).
Additonally I think the variable str should be getting more room - 128
bytes isn't enough for several addresses, 4*128 should be enough for
everyone, if you are sending to more than that often you should probably
get a mailinglist instead (or a file with the addresses in).

Reply via email to