7 Replies Latest reply: Feb 10, 2013 5:31 PM by Thor HoG
tonydenson Level 1 Level 1 (0 points)
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)
  • MagicMikeUK Level 1 Level 1 (15 points)
    Try just "mydomain"

    ** Mike **
  • tonydenson Level 1 Level 1 (0 points)
    MagicMikeUK wrote:
    Try just "mydomain"

    ** Mike **


    I get the same error
  • MrHoffman Level 6 Level 6 (13,010 points)
    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.
  • tonydenson Level 1 Level 1 (0 points)
    MrHoffman wrote:
    The FQDN needs to be set in the host name field within the configuration


    Thanks for that info.
    However, is the FQDN mailserver.example.com or example.com ?
  • MrHoffman Level 6 Level 6 (13,010 points)
    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.
  • Thor HoG Level 1 Level 1 (0 points)
    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

     

    EvilThor-tiny.jpg

  • Thor HoG Level 1 Level 1 (0 points)

    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]

     

    I

    Sorry, the above should be [CurrentControlSet] not [ControlSet].

     

    t