Debian Bug report logs - #434262
postfix cannot handle relayhost pointing to a CNAME

version graph

Package: postfix; Maintainer for postfix is LaMont Jones <lamont@debian.org>; Source for postfix is src:postfix.

Reported by: martin f krafft <madduck@debian.org>

Date: Sun, 22 Jul 2007 18:45:02 UTC

Severity: normal

Found in versions postfix/2.4.3-1, postfix/2.4.6-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#434262; Package postfix. Full text and rfc822 format available.

Message #3 received at submit@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: postfix cannot handle relayhost pointing to a CNAME
Date: Sun, 22 Jul 2007 20:44:18 +0200
[Message part 1 (text/plain, inline)]
Package: postfix
Version: 2.4.3-1
Severity: normal

While moving servers around, I had my.relay.domain.org be a CNAME to
smtprelay.domain.org. The latter had an A record as well as an MX
record pointing to the same IP. postfix cannot handle this:

  Host or domain name not found. Name service error for
  name=my.relay.domain.org type=MX: Host not found, try again)

It works fine if I set relayhost=smtprelay.domain.org instead.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages postfix depends on:
ii  adduser                  3.104           add and remove users and groups
ii  debconf [debconf-2.0]    1.5.13          Debian configuration management sy
ii  dpkg                     1.14.5          package maintenance system for Deb
ii  libc6                    2.6-2           GNU C Library: Shared libraries
ii  libdb4.3                 4.3.29-8        Berkeley v4.3 Database Libraries [
ii  libsasl2-2               2.1.22.dfsg1-13 Authentication abstraction library
ii  libssl0.9.8              0.9.8e-5        SSL shared libraries
ii  lsb-base                 3.1-23.1        Linux Standard Base 3.1 init scrip
ii  netbase                  4.29            Basic TCP/IP networking system
ii  ssl-cert                 1.0.14          Simple debconf wrapper for openssl

Versions of packages postfix recommends:
ii  mailx [mail-read 1:8.1.2-0.20070424cvs-1 A simple mail user agent
ii  mutt [mail-reade 1.5.16-2                text-based mailreader supporting M

-- debconf information excluded

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#434262; Package postfix. Full text and rfc822 format available.

Acknowledgement sent to Osamu Aoki <osamu@debian.org>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>. Full text and rfc822 format available.

Message #8 received at 434262@bugs.debian.org (full text, mbox):

From: Osamu Aoki <osamu@debian.org>
To: 434262@bugs.debian.org, 434262-submitter@bugs.debian.org
Subject: relayhost debconf question suggestion etc.
Date: Thu, 8 Nov 2007 00:36:48 +0900
Package: postfix
Version: 2.4.6-1

I just converted my workstation from exim4 to postfix after seeing
debian-devel postings.  

After learning the postfix for a while and reading BTS, I encountered
this bug report.  The bug submitter uses smart host name without [] in
his set up.  I think that is the problem.

Actually, relayhost can be CNAME but the debconf question may not be the
best to lead us to set it.  We need [] around hostname.

Let me discuss debconf template and propose new one as below.

-----------
Template: postfix/relayhost
Type: string
Description: SMTP relay host (blank for none):
 Please specify a domain, host, host:port, [address] or
 [address]:port. Use the form [destination] to turn off MX lookups.
 Leave this blank for no relay host.
 .
 Do not specify more than one host.
 .
 The relayhost parameter specifies the default host to send mail to when no
 entry is matched in the optional transport(5) table. When no relay host is
 given, mail is routed directly to the destination.
---------------------

I thought [] are there like quotation mark just by reading this.  
Mixed use of words [address] and [destination] certainly confused me.

Let's see how exim ask for smarthost:

---------------------
Template: exim4/dc_smarthost
Type: string
_Description: IP address or host name of the outgoing smarthost:
 Please enter the IP address or the host name of a mail server that
 this system should use as outgoing smarthost. If the smarthost only
 accepts your mail on a port different from TCP/25, append two colons
 and the port number (for example smarthost.example::587 or
 192.168.254.254::2525). Colons in IPv6 addresses need to be doubled.
 .
 If the smarthost requires authentication, please refer to
 the Debian-specific README files in /usr/share/doc/exim4-base for
 notes about setting up SMTP authentication.
-----------------------------

[smarthost.example] is easier to unserstand than the mix of [address]
and [destination].  Also, MX record is really irrelevant for smart host.
That only gives SMTP server accepting external mail.  Smarthost are the
host itself.  (It may be A record or CNAME)

Let me propose possible alternative text:

------------------------------
Template: postfix/relayhost
Type: string
Description: Host name of the outgoing smarthost(blank for none):
 Please enter the host name of a mail server that this system should
 use as outgoing smarthost as [smarthost.example]. If the smarthost only
 accepts your mail on a port different from TCP/25, append colon
 and the port number (for example, [smarthost.example]:587 ).
 .
 Use the form [smarthost.example] with the bracket ensures to turn off MX
 lookups. Leave this blank for no relay host.  Do not specify more than one
 host.
 .
 The relayhost parameter specifies the default host to send mail to when no
 entry is matched in the optional transport(5) table. When no relay host is
 given, mail is routed directly to the destination.
 .
 If the smarthost requires authentication, please refer to
 " Enabling SASL authentication in the Postfix SMTP client" in 
 the /usr/share/doc/postfix/SASL_README.gz .
------------------------

I removed IP address thing since I was not sure postfix accepts such
numeric values and usually ISP provides hostname.  You may add text here
on the numeric IP if it is OK.

Speeking about debconf template, the question on the 4 configurations in
postfix is a bit difficult on VT200 terminal.  (2 screens)  I think that
came from the old exim.

The current exim4 question as below in the source should replace postfix
question "Template: postfix/main_mailer_type" and "Description: General
type of mail configuration":

----------------
Template: exim4/dc_eximconfig_configtype
Type: select
# Translators beware! the following six strings form a single
# Choices menu. - Every one of these strings has to fit in a standard
# 80 characters console, as the fancy screen setup takes up some space
# try to keep below ~71 characters.
# DO NOT USE commas (,) in Choices translations otherwise
# this will break the choices shown to users
__Choices: internet site; mail is sent and received directly using SMTP, mail sent by smarthost; received via SMTP or fetchmail, mail sent by smarthost; no local mail, local delivery only; not on a network, no configuration at this time
Default: local delivery only; not on a network
_Description: General type of mail configuration:
 Please select the mail server configuration type that best meets your needs.
 .
 Systems with dynamic IP addresses, including dialup systems, should generally
 be configured to send outgoing mail to another machine, called a 'smarthost'
 for delivery because many receiving systems on the Internet block
 incoming mail from dynamic IP addresses as spam protection.
 .
 A system with a dynamic IP address can receive its own mail, or local
 delivery can be disabled entirely (except mail for root and postmaster).
-------------------

The nice thing about this is quite short and this can be displayed in 1
page.  Also choice itself is more self-explanatory.  Currently on VT200
size terminal, when you see "Satellite system", explanation was already
displayed in the previous screen. This new exem4 question does not have
this problem.

Unfortunately, under the current default install with mailname set to
your ISP (or any domain name for recieving mail) while removing that
hostname in the mailname from the mydestination list, even the mail to
root mail get forwarded to there.  This was surprized to me.  Exim does
not have this issue.  This needs to be fixed separetely to enable above
description.  Maybe pointer description to generic(5) may be good idea.

I think current configuration is aimed at server admin running postfix
on internet reachable IP.  There is some room for improvement for
workstation situation.

I found postfix itself was quite easy once you learn to use postmap
command :-)  With few debconf improvements and few place holder files in
/etc/postfix such as etc/postfix/generic etc., it may be suitable for
novice user too.

Osamu










Message sent on to martin f krafft <madduck@debian.org>:
Bug#434262. Full text and rfc822 format available.

Message sent on to martin f krafft <madduck@debian.org>:
Bug#434262. Full text and rfc822 format available.

Message #14 received at 434262-submitter@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: 434262-submitter@bugs.debian.org
Subject: Re: Bug#434262: relayhost debconf question suggestion etc.
Date: Tue, 13 Nov 2007 09:38:55 +0100
[Message part 1 (text/plain, inline)]
also sprach Osamu Aoki <osamu@debian.org> [2007.11.07.1636 +0100]:
> [smarthost.example] is easier to unserstand than the mix of [address]
> and [destination].  Also, MX record is really irrelevant for smart host.

I disagree. A smarthost with MX records is quite useful in
situations with a large number of outgoing mail. We use two priority
0 smarthosts and 2 priority 10 to handle all the mail leaving the
university, and the priority 10 mx's act as overflow buffer when the
priority 0 mxs are too busy to handle requests.

>  Use the form [smarthost.example] with the bracket ensures to turn off MX
>  lookups. Leave this blank for no relay host.  Do not specify more than one
>  host.

Why combine these three in one paragraph? They don't belong
together. Also, watch the spacing after the period..

> I removed IP address thing since I was not sure postfix accepts such
> numeric values and usually ISP provides hostname.  You may add text here
> on the numeric IP if it is OK.

Of course IPs are allowed.

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[digital_signature_gpg.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 07:16:21 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.