Why does postfix mail server throw error 502 when testing email from Drobo Dashboard?

25,824

Yes, it's STARTTLS that the SMTP server is objecting to. The fact that it doesn't advertise STARTTLS in its response to the EHLO is a good indication that it doesn't support it.

This suggests that you need to tell the Drobo not to try using a SSL secured SMTP connection (but if you're not using authentication I wouldn't have thought you would be). If there's a "use ssl" tick box try unticking it.

Does sound like a broken SMTP client implementation (especially given the response from Drobo support).

Share:
25,824

Related videos on Youtube

morgant
Author by

morgant

Design, development, discourse.

Updated on September 18, 2022

Comments

  • morgant
    morgant almost 2 years

    I'm configuring a Drobo on a Mac OS X 10.5 Leopard Server file server and am trying to configure email notifications. Unfortunately, when doing so, both our primary mail server and the local Mail service on the server throw a "502 5.5.2 Error: command not recognized" error when attempting to send the test message.

    Both our primary mail server and the local Mail service on the file server are Mac OS X 10.5 Leopard Server and so are postfix-based. The primary mail server is set to allow relaying from the local network and the local Mail service is set to only allow relaying from 127.0.0.0/8 and it's IP address and to relay through our primary mail server. This has all worked well for years until now.

    Drobo Dashboard's Email Settings cannot send through either the primary mail server or localhost without authentication without getting the aforementioned error, although all our other scripts on the server continue to send email normally.

    I've set debug_peer_level = 3 & debug_peer_list = 127.0.0.1 in /etc/postfix/main.cf on the file server. When attempting to send the test message from Drobo Dashboard, I get the following debug info in /var/log/mail.log:

    May 10 13:32:58 eeg postfix/smtpd[7320]: connect from localhost[127.0.0.1]
    May 10 13:32:58 eeg postfix/smtpd[7320]: match_hostname: localhost ~? 127.0.0.0/8
    May 10 13:32:58 eeg postfix/smtpd[7320]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 220 host.domain.tld ESMTP Postfix
    May 10 13:32:58 eeg postfix/smtpd[7320]: watchdog_pat: 0x109998
    May 10 13:32:58 eeg postfix/smtpd[7320]: vstream_fflush_some: fd 9 flush 36
    May 10 13:32:58 eeg postfix/smtpd[7320]: vstream_buf_get_ready: fd 9 got 23
    May 10 13:32:58 eeg postfix/smtpd[7320]: < localhost[127.0.0.1]: EHLO host.domain.tld
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-host.domain.tld
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-PIPELINING
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-SIZE
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-VRFY
    May 10 13:32:58 eeg postfix/smtpd[7320]: match_list_match: localhost: no match
    May 10 13:32:58 eeg postfix/smtpd[7320]: match_list_match: 127.0.0.1: no match
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-ETRN
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-ENHANCEDSTATUSCODES
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250-8BITMIME
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 250 DSN
    May 10 13:32:58 eeg postfix/smtpd[7320]: watchdog_pat: 0x109998
    May 10 13:32:58 eeg postfix/smtpd[7320]: vstream_fflush_some: fd 9 flush 116
    May 10 13:32:58 eeg postfix/smtpd[7320]: vstream_buf_get_ready: fd 9 got 10
    May 10 13:32:58 eeg postfix/smtpd[7320]: < localhost[127.0.0.1]: STARTTLS
    May 10 13:32:58 eeg postfix/smtpd[7320]: > localhost[127.0.0.1]: 502 5.5.1 Error: command not implemented
    May 10 13:32:58 eeg postfix/smtpd[7320]: watchdog_pat: 0x109998
    May 10 13:32:58 eeg postfix/smtpd[7320]: vstream_fflush_some: fd 9 flush 42
    

    Is it the 'STARTTLS' command that's not implemented? Any thoughts on why this fails on both our mail servers while other software doesn't have issues?

  • morgant
    morgant about 13 years
    That's what I was afraid of. This is with the SSL checkbox unchecked (it's actually disabled when authentication is disabled, but I've tried it a couple of ways to make sure they didn't have the state reversed or something). It actually times out when attempting to use port 587 (which is configured and is our preference).
  • morgant
    morgant about 13 years
    Drobo just replied to my support ticket saying they require STARTTLS. Does that make any sense for non-SSL SMTP communications?
  • Paul Haldane
    Paul Haldane about 13 years
    No, this requirement doesn't make much sense. Answer to your current question is "because Drobo's SMTP client doesn't play nice". I guess you have a new question which is "how do I enable TLS on a postfix server?" (which is outside my experience but I'm sure others/web can help with if asked).
  • Paul Haldane
    Paul Haldane about 13 years
    Alternative solution (if you don't want to mess with your mail servers) would be to use gmail's SMTP servers - see for example blog.fosketts.net/2009/11/30/…
  • morgant
    morgant about 13 years
    Okay, I've only looked at TLS support in postfix for purposed of authentication, but I guess Drobo wants the email to be sent securely (seems somewhat silly to me). I was able to enable SSL support w/the self-signed cert for the Mail service in Server Admin and it can now send through localhost (which is acceptable since it relays through our primary mail server). So, it's working. Thanks!