From: Emanuele on
Ok, I've attached tcp dump. It contains only 8 packets because after HELO
message, as you can see from log file previously posted, there's no more
communication.

Thanks in advance.
From: Wietse Venema on
Emanuele:
> Ok, I've attached tcp dump. It contains only 8 packets because after the
> HELO message, as you can see from logfile previously posted, there's no more
> communication.

Your server replies end in

<CR><LF><NULL>

That is not SMTP compliant.

Wietse

From: Emanuele Gallo on
I don't think that it's the problem. My mail server is developed in C
language and replies that I send to Postfix are strings. As I think you
know, all strings in C are NULL terminated and there's no chance for
create string that aren't NULL terminated. Moreover, as previously
mentioned, my server works well with Mozilla Thunderbird. If
<CR><LF><NULL> were the guilty, neither the first string ("220
myMailServer.localhost SMTP service ready") would arrive.

Il 11/04/2010 22:48, Wietse Venema ha scritto:
> Emanuele:
>
>> Ok, I've attached tcp dump. It contains only 8 packets because after the
>> HELO message, as you can see from logfile previously posted, there's no more
>> communication.
>>
> Your server replies end in
>
> <CR><LF><NULL>
>
> That is not SMTP compliant.
>
> Wietse
>

From: mouss on
Emanuele Gallo a �crit :
> I don't think that it's the problem. My mail server is developed in C
> language and replies that I send to Postfix are strings. As I think you
> know, all strings in C are NULL terminated and there's no chance for
> create string that aren't NULL terminated.

1- data sent over the network has nothing to do with C, java, or
whatever language. In particular, when you talk SMTP, you must obey SMTP
protocol specs.

2- Even in C, char* does not need to be NULL terminated.

if this isn't clear, try
$ man 2 write
$ man sendto
....

PS. "Unix Network Programming" by W. Richard Stevens is an excellent
reading.


> Moreover, as previously
> mentioned, my server works well with Mozilla Thunderbird. If
> <CR><LF><NULL> were the guilty, neither the first string ("220
> myMailServer.localhost SMTP service ready") would arrive.
>
> [snip]

From: Emanuele Gallo on
Thanks a lot. In fact I've tried to send string not NULL-terminated and
now Postfix replies me correctly. I would never understand. I'll change
all reply strings in my program (hoping I'm not compromise the
functioning with other mail clients).

Bye.

Il 12/04/2010 12:40, mouss ha scritto:
> Emanuele Gallo a �crit :
>
>> I don't think that it's the problem. My mail server is developed in C
>> language and replies that I send to Postfix are strings. As I think you
>> know, all strings in C are NULL terminated and there's no chance for
>> create string that aren't NULL terminated.
>>
> 1- data sent over the network has nothing to do with C, java, or
> whatever language. In particular, when you talk SMTP, you must obey SMTP
> protocol specs.
>
> 2- Even in C, char* does not need to be NULL terminated.
>
> if this isn't clear, try
> $ man 2 write
> $ man sendto
> ...
>
> PS. "Unix Network Programming" by W. Richard Stevens is an excellent
> reading.
>
>
>
>> Moreover, as previously
>> mentioned, my server works well with Mozilla Thunderbird. If
>> <CR><LF><NULL> were the guilty, neither the first string ("220
>> myMailServer.localhost SMTP service ready") would arrive.
>>
>> [snip]
>>
>