501 Syntax: HELO hostname - Postfix

Added by Mitch Pirtle almost 11 years ago

I have Postfix configured on the same machine hosting a redmine site. I am now using Postfix and Courier for IMAP/POP/SMTP services, and all is well. However, for the life of me I cannot coax redmine to send email messages, and also cannot get meaningful information to the logs to facilitate debugging.

When I try to send a test email, that is all I get in the postfix log:

Jun  5 22:26:34 myserver postfix/smtpd[21236]: [ID 197553 mail.info] connect from localhost[127.0.0.1]
Jun  5 22:26:34 myserver postfix/smtpd[21236]: [ID 197553 mail.info] lost connection after HELO from localhost[127.0.0.1]
Jun  5 22:26:34 myserver postfix/smtpd[21236]: [ID 197553 mail.info] disconnect from localhost[127.0.0.1]

Adding insult to injury, this is all I get in logs/production.log:

Processing AdminController#test_email (for 72.2.118.36 at 2009-06-05 22:26:34) [GET]
  Parameters: {"action"=>"test_email", "controller"=>"admin"}
Redirected to actioneditcontrollersettingstabnotifications
Completed in 41ms (DB: 0) | 302 Found [http://projects.jetsetter.com/admin/test_email]

Can someone help me figure out what to enable to get error messages that make it possible to debug?

  • I can send email from that machine to external addresses
  • I can send email to that machine from external addresses
  • I have configured redmine to use my email account for From:
  • I have tried many variations on email.yml:
    • just using hostname and no auth
    • using hostname and my own auth credentials
    • using FQDN for mail host and no auth
    • using FQDN for mail host and my own auth credentials

Running out of ideas, and Google is running out of internet ;-)

Replies (10)

RE: 501 Syntax: HELO hostname - Postfix - Added by Joe Clarke almost 11 years ago

Did you try putting in localhost for the address field in the email.yml along with your smtp login and password? Sometimes when sending from the same host as the smtp server it only works if you specify localhost.

RE: 501 Syntax: HELO hostname - Postfix - Added by Mitch Pirtle almost 11 years ago

Tried that too, tried 127.0.0.1 AND localhost, with the exact same result.

What makes me crazy is that all other ways of sending and receiving email on that host work just fine, it is just redmine - but yet I cannot seem to coax any details out of the logs for postfix OR redmine, so I really have no idea what is not working. sniff

RE: 501 Syntax: HELO hostname - Postfix - Added by Joe Clarke almost 11 years ago

What do you have in the domain field? It should be the domain this mail server is setup for.

RE: 501 Syntax: HELO hostname - Postfix - Added by Eric Davis almost 11 years ago

Mitch Pirtle wrote:

What makes me crazy is that all other ways of sending and receiving email on that host work just fine, it is just redmine - but yet I cannot seem to coax any details out of the logs for postfix OR redmine, so I really have no idea what is not working. sniff

You can bump up postfix's logging in the master.cf file. Just look for the line with smpt inet .... and change smtpd to smtpd -v for more verbose output.

Eric

RE: 501 Syntax: HELO hostname - Postfix - Added by Randy Syring over 10 years ago

Was this solved? I am having the same problem.

RE: 501 Syntax: HELO hostname - Postfix - Added by Randy Syring over 10 years ago

Here are my log files from postfix in relation to sending a test redmine email:

Sep 30 10:29:54 vms01 postfix/smtpd[19777]: connect from localhost[127.0.0.1]
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_list_match: localhost: no match
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_list_match: 127.0.0.1: no match
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_list_match: localhost: no match
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_list_match: 127.0.0.1: no match
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_hostname: localhost ~? 127.0.0.0/8
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: > localhost[127.0.0.1]: 220 vms01.rcslocal.com ESMTP Postfix (Ubuntu)
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: < localhost[127.0.0.1]: EHLO
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: > localhost[127.0.0.1]: 501 Syntax: EHLO hostname
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: < localhost[127.0.0.1]: HELO
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: > localhost[127.0.0.1]: 501 Syntax: HELO hostname
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: smtp_get: EOF
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_hostname: localhost ~? 127.0.0.0/8
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: lost connection after HELO from localhost[127.0.0.1]
Sep 30 10:29:54 vms01 postfix/smtpd[19777]: disconnect from localhost[127.0.0.1]

RE: 501 Syntax: HELO hostname - Postfix - Added by Randy Syring over 10 years ago

Found this post:

http://www.redmine.org/boards/2/topics/789

And solved the problem by adjusting my email config in conf/email.yml to "delivery_method: :sendmail" instead of using smtp:

production:
  delivery_method: :sendmail
  smtp_settings:
    address: 127.0.0.1
    port: 25

RE: 501 Syntax: HELO hostname - Postfix - Added by Clay Walker almost 10 years ago

@Randy Syring

Thanks, that worked for us as well.

RE: 501 Syntax: HELO hostname - Postfix - Added by Peter Lee over 9 years ago

Regarding the 501 error, we were successful keeping the delivery_method: :smtp using postfix by adding an extra "domain:" option to the email.yml config file.

production:
  delivery_method: :smtp
  smtp_settings:
    address: "localhost" 
    port: 25
    domain: yourdomain.com

It no longer complains about 501 Syntax: EHLO hostname or HELO hostname.

RE: 501 Syntax: HELO hostname - Postfix - Added by Peter Sanchez about 8 years ago

I had the same result as Peter Lee. Adding domain to the config solved my 501 error.

(1-10/10)