Re: Strange problem in SMTP communication

2010-04-12 Thread Emanuele Gallo
Thanks a lot. I'll try to do these changes. Bye. Il 12/04/2010 19:04, Wietse Venema ha scritto: Emanuele: I know that NULL is there to indicate end of a string. But why if I do: send(SMTPSocket,session->reply,strlen(session->reply)); // session->reply is where I wrote the response code

Re: Strange problem in SMTP communication

2010-04-12 Thread Wietse Venema
Emanuele: > I know that NULL is there to indicate end of a string. But why if I do: > > send(SMTPSocket,session->reply,strlen(session->reply)); // session->reply > is where I wrote the response code that ends with \r\n\0 > > it also sends '\0'? > > strlen() shouldn't count \0, but Postfix rece

Re: Strange problem in SMTP communication

2010-04-12 Thread Victor Duchovni
On Mon, Apr 12, 2010 at 06:02:49PM +0200, Emanuele wrote: > I know that NULL is there to indicate end of a string. But why if I do: > > send(SMTPSocket,session->reply,strlen(session->reply)); // session->reply > is where I wrote the response code that ends with \r\n\0 > > it also sends '\0'?

Re: Strange problem in SMTP communication

2010-04-12 Thread Emanuele
I know that NULL is there to indicate end of a string. But why if I do: send(SMTPSocket,session->reply,strlen(session->reply)); // session->reply is where I wrote the response code that ends with \r\n\0 it also sends '\0'? strlen() shouldn't count \0, but Postfix receives '\0'. However, I've

Re: Strange problem in SMTP communication

2010-04-12 Thread Wietse Venema
Emanuele Gallo: > 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 documented in RFC documents from 20 years ago, SMTP requires that lines end in . > As I think you > know, all strings in C are NULL terminated a

Re: Strange problem in SMTP communication

2010-04-12 Thread Emanuele Gallo
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: Ema

Re: Strange problem in SMTP communication

2010-04-12 Thread mouss
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 sen

Re: Strange problem in SMTP communication

2010-04-12 Thread Emanuele Gallo
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 ser

Re: Strange problem in SMTP communication

2010-04-11 Thread Wietse Venema
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 That is not SMTP compliant. Wietse

Re: Strange problem in SMTP communication

2010-04-11 Thread 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. Thanks in advance. tcpdump Description: Binary data

Re: Strange problem in SMTP communication

2010-04-11 Thread Emanuele
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.

Re: Strange problem in SMTP communication

2010-04-11 Thread Emanuele
Ok, I've attached tcp dump. tcpdump Description: Binary data

Re: Strange problem in SMTP communication

2010-04-11 Thread Wietse Venema
Emanuele Gallo: > Sorry, can you tell me how can I send binary attachments in this mailing > list? Thanks. You have a gmail address, so you would use the "attach a file" link under "Subject". If the file is large, then you should mail an URL instead of attaching the file. Wietse

Re: Strange problem in SMTP communication

2010-04-11 Thread Emanuele Gallo
Sorry, can you tell me how can I send a binary attachment? Il 11/04/2010 15:11, Wietse Venema ha scritto: Emanuele Gallo: Hi! I've developed a RFC821-compliant mail server. I want to make it clear first that my server works well either with a mail client, as Thunderbird, and with telnet se

Re: Strange problem in SMTP communication

2010-04-11 Thread Emanuele Gallo
Sorry, can you tell me how can I send binary attachments in this mailing list? Thanks. Il 11/04/2010 15:11, Wietse Venema ha scritto: Emanuele Gallo: Hi! I've developed a RFC821-compliant mail server. I want to make it clear first that my server works well either with a mail client, as Th

Re: Strange problem in SMTP communication

2010-04-11 Thread Wietse Venema
Emanuele Gallo: > Hi! > > I've developed a RFC821-compliant mail server. I want to make it clear > first that my server works well either with a mail client, as > Thunderbird, and with telnet session. I've configured Postfix to > communicate with my server modifying main.cf in this way: > > re