Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Hello I am trying to set up a mail account on a new macbook air (Lion 10.7.5 Build 11G63B). I have gone through all the steps but it will not connect to the smtp server. I am using straight SMTP (not SSL) with a username and password that I have verified are correct.

The connection doctor shows that the connection is being rejected due to the HELO that is sent to it:

HELO mymac.mydomain\.co\.uk
501 HELO requires valid address

I have reproduced the above error with a telnet to the SMTP server. With mymac.mydomain\.co\.uk I get the above error. With mymac.mydomain.co.uk it authenticates correctly.

How do I stop the macbook sending a garlbed HELO ?


Further detail on the SMTP setup. I have set the following:

  • Description
  • Server Name = the fqdn of the smtp server (definately correct)
  • Use custom Port 25 (only while trying to get it to work - I expect the 'use default ports' option would be ok)
  • Use SSL is unchecked (don't use SSL)
  • Username set to known correct username
  • Password set to known correct password

There are no other settings available. The smtp bit of this site: http://www.plus.net/support/email/setup/mail-107-smtp.shtml reflects what I was doing.

share|improve this question
1  
At first glance this looks as if you configured the mail account wrongly. Can you add screenshots of the configuration from within Mail.app? –  patrix Apr 1 '13 at 14:53
    
It's on a different machine that isn't mine. I am not really a mac person -just helping someone else - I don't even know how to take a screen-shot! I have set it up to use smtp port 25, no ssl with a user name and password. I enabled "mail and notes" in icloud settings then added another smtp server (my ISP's) through the mail app's preferences->accounts screen so I can send mail using an address other than the @icloud.com one. –  starfry Apr 1 '13 at 15:07
    
Shift-Cmd-4 allows you to make a screenshot of a screen region, Ctrl-Shift-Cmd-4 stores it into the clipboard instead of a file. –  patrix Apr 1 '13 at 15:39
    
Wow - we might need to see the full transmission chain for that account. You'll want to make a new account on the Mac and just enter that one account, since connection doctor doesn't sort different accounts easily. I don't get a single HELO message on any of my 5 mail accounts, so I'm not able to reproduce the issue. Also - I would try replacing the string for the mail server in Mail. Those escaped periods look odd - hopefully it's an encoding issue and not something you need to hack the Mail program to accomplish. –  bmike Apr 1 '13 at 16:16
    
I've put a transcript up at pastebin.com/3bMjuQf5. I am not sure how to "try replacing the string for the mail server in Mail". Also a transcript of reproducing the error with telnet: pastebin.com/mqzauTgn –  starfry Apr 1 '13 at 19:05
show 1 more comment

2 Answers 2

There are several good resources available on how to set up mail accounts in OS X:

If you are using an non-iCloud mail account, there is no need to even configure iCloud settings for getting it to work with an ISP.

share|improve this answer
    
I am using an iCloud account but I need to set up a different SMTP server so that I can send mail from me@mydomain.com but the identification that the mail app is sending to the SMTP server is in a format that the server does not like. –  starfry Apr 1 '13 at 19:15
add comment

(I apologize in advance for the wishy-washiness of this answer, but while I hope I'm on the right track, I do have some gaps in my knowledge.)

The SMTP HELO message, while something of a relic, is supposed to allow the client to identify itself to a server. It is still required for the protocol and is generally expected to at least be a syntactically valid hostname (which yours is not.) Your SMTP server appears to be complaining because it is indeed invalid.

Mail uses the name of your Mac, or the hostname assigned by the DHCP server on your network. DHCP servers don't always assign a hostname. OS X prefers a DHCP assigned hostname over using the computer's name as the hostname.

Based on this, the first place I'd look is my network configuration. I wonder, if you opened a terminal and typed hostname -f, what would you get? Possibly

$ hostname -f
mymac.mydomain\.co\.uk

If you do get this, the next step is to identify where it's coming from. A likely source could be a misconfigured DHCP server. You can try

$ sudo hostname mymac.mydomain.co.uk

to temporarily change the hostname for testing, or

$ sudo scutil --set HostName mymac.mydomain.co.uk

to set it permanently.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.