Victor Duchovni wrote:
> On Wed, Jun 02, 2010 at 10:46:47PM -0400, Matt Hayes wrote:
> 
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214741
>>
>> Now, I'm not all that bright on how postfix sorts out the hostname, and
>> frankly, I don't care, but I don't like people saying its a 'bug' when I
>> have no problems following configuration directives.
>>
>> Can someone PLEASE explain this in clear terms as to what they are
>> complaining about?
> 
> An MTA needs a stable set of names for the domains listed in mydestination,
> so that locally originated mail delivered locally is repliable. A laptop
> with a DHCP-based FQDN is not a good candidate for defaulting the local
> domain to the (volatile) FQDN of the host.
>
> Setting myhostname to "shortname.localdomain" is FAR preferable to picking
> up some random DHCP (or reverse DNS lookup) supplied domain and becoming
> an open relay for sub-domains of your ISP's domain or being unable to
> reply to previously delivered local email.

Said laptop should probably hardcode 'myhostname' and 'mydomainname'
in main.cf.

> In addition, Postfix operates correctly on stand-alone hosts, that
> are not networked delivering local email between local users. There
> must not be network dependencies in local mail delivery.
> 
> Operating Postfix on a laptop typically requires some of the configuration
> options listed in SOHO_README.html.
> 
> The authors of the bug report have not thought this through. The bug
> report is spurious.
> 
> If they want the O/S distribution to fully configure a SOHO Postfix during
> system installation, the Debian laptop profile would have to ask the user
> for a list of user accounts and their mappings to external ISP mailboxes,
> as well as submission server settings and passwords, ... This is a lot
> of complexity to deal with at install-time.
> 
> Far simpler to just deliver all local (cron, ...) mail locally, and
> to expect the laptop user to use Thunderbird, Evolution, ... rather
> than mutt or Pine via a local Postfix.

To clarify again: I'm not coming from the laptop angle,
I just happen to have been bitten by the same problem.

My point is: When 'myhostname' and 'mydomainname' are left out of
main.cf then postfix makes an attempt to auto-detect them.
This auto-detection does not currently follow what other tools like
'hostname' do, and not what the man-pages of gethostname()/uname(),
getdomainname() suggest.

You suggest this auto-detection is deliberately done wrong to protect
users on misconfigured hosts from themselves. I'd argue this is a bad
trade-off, as it forces people that *have* properly configured hosts to
duplicate their FQDN in main.cf - which would not be required if the
auto-detection worked as expected.

Anyways, in order not to break backwards compatibility, how about
leaving the default behaviour as is, but introducing something like
'myhostname = $auto', 'mydomainname = $auto' (or whatever magic value
that can not be a real hostname) which then does the "full" hostname
detection the same way that 'hostname -f' does?

Cheers, Moe

Reply via email to