Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"need fully-qualified hostname" error

Can someone please help me with a basic problem with setting up the mail server, I can't seem to get to first base. The following is a Terminal session using telnet to do some basic testing (with personal info substituted for generic names) -

==============================
mbp-5:~ Tony$ telnet mailserver.mydomain 25
Trying 82.7.140.46...
Connected to mailserver.mydomain.
Escape character is '^]'.
220 mailserver.mydomain ESMTP Postfix
helo me
250 mailserver.mydomain
Mail from:myaddress@somedomain
250 2.1.0 Ok
Rcpt to:mygmailaddress@gmail.com
504 5.5.2 <me>: Helo command rejected: need fully-qualified hostname
=============================================

In my Server Admin/Mail/General settings I have the host name set to mailserver.mydomain

Can anyone give me a pointer please

13" MacBookPro, Mac OS X (10.6.6)

Posted on Feb 3, 2011 2:36 AM

Reply
7 replies

Feb 3, 2011 5:15 AM in response to tonydenson

The FQDN needs to be set in the host name field within the configuration

Server Admin > select server > Mail > Settings > General > host name

Your [external forward and reverse DNS translations|http://labs.hoffmanlabs.com/node/1594] and your external MX must also all match, too.

Mismatched addresses are assumed to be spam engines by receiving mail servers.

In the OP's case, the reverse DNS for the address goes to a Virgin Media address, which means receiving mail servers will often assume this is a spam engine. It's usually best to have Virgin hosting your forward DNS and your MX, as that's one less bunch to deal with, and (for the purposes of SMTP) nobody other than Virgin can set up your reverse DNS with that static IP address. (The ISPs have the reverse DNS controls for all IP address within their respective IP address allocations.)

For completeness, yes, you can potentially tunnel to another IPv4 or IPv6 static IP internet connection, if your ISP does not offer static IP. That's more complex, though there can be options here.

When posting, please use example.org, example.net and/or example.com domains, as these are reserved by RFC for masking domain names for postings and for documentation and related. Or post your real domain, and we can check the settings directly. Using one of the example domains or using your real domain is less ambiguous and less confusing (at least to me) than is a made-up name; made-up names can tend to be ill-formatted intentionally, but ill-formatted names can also arise accidentally.

Feb 3, 2011 12:36 PM in response to tonydenson

However, is the FQDN mailserver.example.com or example.com ?


For the literal answer for your organization, I do not know. You've obfuscated your settings, after all. (Had those details been posted, I'd have looked up the MX for the domain.)

As for the theoretical or general answer, I usually have mail.example.com or an analogous host name as the host as the MX record, and the mail.example.com host with matching forward and reverse DNS records for the IP address. The MX wants to point to a translation with an A (machine) record.

I don't prefer to use the domain name as a host address, as (in my experience) that tends to get tangled as hosts and servers are added.

Feb 8, 2013 3:27 PM in response to tonydenson

Thanks for that info.
However, is the FQDN mailserver.example.com or example.com ?


Hey guys - old thread, but was poking about and came across this. I'll assume you've fix this, but the reason for the behavior (in case others find this) is that Postfix's default configuration requires a FQHN at HELO. This helps with spam and reverse DNS. If you want to turn this behavior off, then change this line in main.cf from:


[smtpd_helo_restrictions = reject_non_fqdn_helo_hostname reject_invalid_helo_hostname]

To:

[smtpd_helo_restrictions = reject_invalid_helo_hostname]


Personally, I do NOT like changing this. However, mail clients on Windows (Outlook, OE and maybe others) pull the hostname off the TCP/IP stack. So if your machine is named FOO, even if you have a domain suffix of "bar.com" which is forced, or if you force it in the "Computer Name" tab with the "More" button, Win7 will only send FOO to Outlook or OE which is sloppy. RFC1123 states you MUST send FQHN, but MSFT doesn't allways care about RFC. And actually, it is a lack of communication between OS and Apps.


Many people have asked how to force Outlook to send the FQHN. This is a misnomer as it is the OS that sends it. Regardless, once can force the hostname by editing the registry. Note this regards the TCP/IP parameters only. These two values can be changed:


In [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\services\Tcpip\Parameters]


For the [Hostname] value, you would change [FOO] to [foo.bar.com]

Likewise for the [NV Hostname] value, you would change [FOO] to [foo.bar.com]


If you have many systems, you could always write a .reg file to do it for you.


In this way, you can leave your server more secure and provide functionality to your Windows clients.


Hope this helps.


t


User uploaded file

"need fully-qualified hostname" error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.