Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to configure Postfix with a mail server that I programmed in C. The main.cf is set in this way :
Code:
relayhost = [myMailServer.localhost]
smtp_sasl_auth_enable = no
smtp_use_tls = no
disable_dns_lookups=yes
smtp_never_send_ehlo = yes
The problem arise when I launch mail command. This is what I wrote:
Code:
manugal@manugal-desktop:~$ mail -v -s "Subject" Manugal@myMailServer.localhost
Hello world!
.
EOT
Mail Delivery Status Report will be mailed to <manugal>.
manugal@manugal-desktop:~$
Mail doesn't arrive on my mailbox and if I check mail.log I found this:
I don't know why it doesn't receive response after HELO. In fact if I debug my mail server with gdb, I can see it sends a 250 response code. Moreover, I've tested my server both with traditional mail clients, as Thunderbird, and through telnet session and it works very well.
Sounds like your SMTP server isn't working properly - I'm assuming Postfix is working OK.
Try using telnet to debug your remote server to see what the problem is. Try
Code:
telnet myMailServer.localhost 25
Then attempt to send an email by entering appropriate data. Use Google to search for EHLO communications, but if you've built your own server, it sounds like you know what the servers send to each other. Using telnet might show you more clearly where it is failing.
Can you post the output of "postconf -n", and is your Postfix server able to send email directly (i.e. is it working?).
Should "smtp_never_send_ehlo = yes" be the other way around? Either "smtp_never_send_ehlo = no" or "smtp_always_send_ehlo = yes". My Postfix server uses my ISP to relay outbound email, and I don't use either of these setting (i.e. I use the defaults values which are the opposite to your settings).
Last edited by blacky_5251; 04-10-2010 at 06:52 PM.
Hi! I've discovered a strange thing. To do an attempt I've tried to send, as a response, this string "\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:
I don't know why replies must be sent in this way. Something is wrong.
However, in reply to you, I've used smtp_never_send_ehlo only for test, because I thought it was the reason of my problem. Moreover, my mail server is RFC821-compliant, so if I send a 502 response code to Postfix, it sends me HELO in place of EHLO, right?
I'm curious as to why your log shows "relay=none" on the first line of the log, when it should say "relay=myMailServer.localhost[ip.address.x.x]:25". Is it valid syntax to put the name of the relay server inside square brackets? My main.cf just has "relayhost = hostname.domain.com".
Perhaps that line, where there's relay=none, is a line from a previous try that I made. In fact smtp process ID in that line is different, as you can see. Ignore that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.