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:

relayhost = [myMailServer.localhost]
smtp_sasl_auth_enable = no
smtp_use_tls = no
disable_dns_lookups=yes
smtp_never_send_ehlo = yes
Then I try to send an email through mail command:

manu...@manugal-desktop:~$ mail -v -s "Subject" manu...@mymailserver.localhost
Hello world!
.
EOT
Mail Delivery Status Report will be mailed to <manugal>.
manu...@manugal-desktop:~$
But mail doesn't arrive. Analyzing mail.log I've discovered that Postfix doesn't receive 250 response (but receive a blank line). Nevertheless, if I debug my server with gdb, I can see that it sends the string "250 OK\r\n". To do an attempt, then I've tried to send, as a response, "\r\n250 OK\r\n" (so a 250 response code preceded by a CRLF). And now response seems arrive at the other side. Look at mail.log:

Apr 10 22:05:36 manugal-desktop postfix/pickup[2846]: 70F9E21BDD: uid=1000 from=<manugal> Apr 10 22:05:36 manugal-desktop postfix/cleanup[2859]: 70F9E21BDD: message-id=<20100410200536.70f9e21...@manugal-desktop.localdomain> Apr 10 22:05:36 manugal-desktop postfix/qmgr[2847]: 70F9E21BDD: from=<manu...@manugal-desktop.localdomain>, size=488, nrcpt=1 (queue active) Apr 10 22:05:40 manugal-desktop postfix/smtp[2850]: < myMailServer.localhost[192.168.1.11]:25: 220 myMailServer.localhost SMTP Service ready Apr 10 22:05:40 manugal-desktop postfix/smtp[2850]: > myMailServer.localhost[192.168.1.11]:25: HELO manugal-desktop.localdomain Apr 10 22:05:46 manugal-desktop postfix/smtp[2850]: < myMailServer.localhost[192.168.1.11]:25: Apr 10 22:05:46 manugal-desktop postfix/smtp[2850]: < myMailServer.localhost[192.168.1.11]:25: 250 OK Apr 10 22:05:46 manugal-desktop postfix/smtp[2850]: server features: 0x1000 size 0 Apr 10 22:05:46 manugal-desktop postfix/smtp[2850]: > myMailServer.localhost[192.168.1.11]:25: MAIL FROM:<manu...@manugal-desktop.localdomain>
...

I don't know why replies must be sent in this way. Something is wrong. I'm sorry for length.

Reply via email to