postfix fails to install with invalid hostnames or domain names

Bug #402776 reported by David Martin
100
This bug affects 21 people
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Medium
Unassigned

Bug Description

Binary package hint: postfix

During printer setup, the system properly detected by HP network printer (1320n), it requested to download a non-supported driver then crashed.

ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess post-installation script returned error exit status 75
NonfreeKernelModules: nvidia
Package: postfix 2.5.5-1.1
SourcePackage: postfix
Title: package postfix 2.5.5-1.1 failed to install/upgrade: subprocess post-installation script returned error exit status 75
Uname: Linux 2.6.28-13-generic x86_64

Revision history for this message
David Martin (dlmarti) wrote :
Mathias Gug (mathiaz)
affects: postfix (Ubuntu) → cups (Ubuntu)
Mathias Gug (mathiaz)
affects: cups (Ubuntu) → postfix (Ubuntu)
summary: - while installing HP driver, application crashed.
+ postfix doesn't install when hostnames contains only digits
summary: - postfix doesn't install when hostnames contains only digits
+ postfix doesn't install when hostname contains only digits
Revision history for this message
Mathias Gug (mathiaz) wrote :

Relevant error message:

 setting myhostname: 5400
 setting alias maps
 setting alias database
 mailname is not a fully qualified domain name. Not changing /etc/mailname.
 setting destinations: 5400, localhost.localdomain, , localhost
 setting relayhost:
 setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
 setting mailbox_size_limit: 0
 setting recipient_delimiter: +
 setting inet_interfaces: all
 /etc/aliases does not exist, creating it.
 WARNING: /etc/aliases exists, but does not have a root alias.

 Postfix is now set up with a default configuration. If you need to make
 changes, edit
 /etc/postfix/main.cf (and others) as needed. To view Postfix configuration
 values, see postconf(1).

 After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

 Running newaliases
 newaliases: warning: valid_hostname: numeric hostname: 5400
 newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 5400
 dpkg: error processing postfix (--configure):
 subprocess post-installation script returned error exit status 75
 dpkg: dependency problems prevent configuration of bsd-mailx:
 bsd-mailx depends on postfix | mail-transport-agent; however:
  Package postfix is not configured yet.
  Package mail-transport-agent is not installed.
  Package postfix which provides mail-transport-agent is not configured yet.

The failed install is due to a hostname equals to 5400. Could you confirm that your hostname is set to 5400?

Changed in postfix (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
David Martin (dlmarti) wrote : Re: [Bug 402776] Re: while installing HP driver, application crashed.

Mathias Gug wrote:
> The failed install is due to a hostname equals to 5400. Could you
> confirm that your hostname is set to 5400?

It was when this failure occured, I changed the hostname to bl5400, and
tried again same result.

Revision history for this message
Jonathan Marsden (jmarsden) wrote : Re: postfix doesn't install when hostname contains only digits

> It was when this failure occured, I changed the hostname to bl5400, and
> tried again same result.

I strongly suspect that somewhere in one or more of your system's configuration files, that old numeric host name still exists.

Please confirm that the old numeric hostname has been edited into the new hostname (that starts with a letter) from *all* configuration files on your machine under /etc, including /etc/hosts , /etc/mailname , /etc/aliases and /etc/postfix/main.cf

Revision history for this message
David Martin (dlmarti) wrote : Re: [Bug 402776] Re: postfix doesn't install when hostname contains only digits

Jonathan Marsden wrote:
>> It was when this failure occured, I changed the hostname to bl5400, and
>> tried again same result.
>
> I strongly suspect that somewhere in one or more of your system's
> configuration files, that old numeric host name still exists.
>
> Please confirm that the old numeric hostname has been edited into the
> new hostname (that starts with a letter) from *all* configuration files
> on your machine under /etc, including /etc/hosts , /etc/mailname ,
> /etc/aliases and /etc/postfix/main.cf
>

I did a "grep 5400 $(find)" from the etc directory.

Only the /etc/postfix/main.cf file was wrong (but postfix is no longer
installed), I changed it.

Its asinine to require postfix for a printer, makes no sense.

Revision history for this message
Jonathan Marsden (jmarsden) wrote : Re: postfix doesn't install when hostname contains only digits

If the driver concerned were part of Ubuntu that might be fixable. But you state it is "unsupported", so the Ubuntu community can't support it, unfortunately.

I suspect the driver does not directly need postfix, just "any way to send email out from this machine"; postfix is the default choice for many packages in Ubuntu to install to meet such a requirement. If you prefer something smaller you can install ssmtp and set that up, and many packages will then use it instead of postfix for their outbound email needs.

Why a printer driver wants to email something (perhaps registration info to HP? Perhaps alerts to an admin when the printer is low on toner or out of paper?) I don't know. Without full source code for the driver, I can't really find out, either.

Just so you know, Internet RFC 1178 (which is all about choosing hostnames) specifically advises "Don't use digits at the beginning of the name"... :)

It might be good for Ubuntu to check for this issue, when the host names is chosen during installation, and at least warn the unwary user/systemadministrator about it.

Revision history for this message
David Martin (dlmarti) wrote : Re: [Bug 402776] Re: postfix doesn't install when hostname contains only digits

Jonathan Marsden wrote:
> If the driver concerned were part of Ubuntu that might be fixable. But
> you state it is "unsupported", so the Ubuntu community can't support it,
> unfortunately.
>
> I suspect the driver does not directly need postfix, just "any way to
> send email out from this machine"; postfix is the default choice for
> many packages in Ubuntu to install to meet such a requirement. If you
> prefer something smaller you can install ssmtp and set that up, and many
> packages will then use it instead of postfix for their outbound email
> needs.
>
> Why a printer driver wants to email something (perhaps registration info
> to HP? Perhaps alerts to an admin when the printer is low on toner or
> out of paper?) I don't know. Without full source code for the driver, I
> can't really find out, either.
>
> Just so you know, Internet RFC 1178 (which is all about choosing
> hostnames) specifically advises "Don't use digits at the beginning of
> the name"... :)
>
> It might be good for Ubuntu to check for this issue, when the host names
> is chosen during installation, and at least warn the unwary
> user/systemadministrator about it.
>

I don't need postfix, the problem I have is that many packages list it
as a dependancy even though they have no need of it. When it attempts
to install it causes by 64 bit flash to stop working (no clue as to why)
and then issues tons of errors every time I try to use the apt system.

Revision history for this message
LaMont Jones (lamont) wrote : Re: postfix doesn't install when hostname contains only digits

postfix expects that myhostname is a valid fqdn, not a short hostname.

Mathias Gug (mathiaz)
Changed in postfix (Ubuntu):
status: Incomplete → Triaged
summary: - postfix doesn't install when hostname contains only digits
+ postfix fails to install with invalid hostnames or domain names
Revision history for this message
pitx (pitxsb12) wrote :

same bug here in ubuntu 9.10

my hostname file->
 pitx-ubuntu-9

my hosts file ->
127.0.0.1 localhost
127.0.1.1 pitx-ubuntu-9.10 pitx-ubuntu-9
#127.0.1.1 www.grosekoindarra.com grosekoindarra.com
127.0.0.1 www.lanzarotecamp.com lanzarotecamp.com
127.0.0.1 www.ajaxpanel.com ajaxpanel.com
127.0.0.1 www.mismapas.com mismapas.com
127.0.0.1 www.miadmin.com miadmin.com
89.248.100.78 www.pukassurfboars.com pukassurfboards.com
127.0.0.1 www.laplazatf.com laplazatf.com
//89.248.100.78 www.laplazatf.com laplazatf.com
127.0.0.1 www.lakabutzia.com lakabutzia.com

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

any idea?

Revision history for this message
Scott Kitterman (kitterman) wrote :

Postfix not configuring with an invalid hostname is a feature, not a bug. The bug seems to be an odd requirement for an. MTA where users don't expect it. This is nothing to do with Postfix.

affects: postfix (Ubuntu) → ubuntu
Changed in ubuntu:
status: Triaged → Confirmed
Revision history for this message
pitx (pitxsb12) wrote :

i fix it. The intaller script show a error mensage like: .10 is not allowed in /etc/postfix/main.cf. I search the line "myhostname = pitx-ubuntu-9.10" and i changed for this "myhostname= pitx-ubuntu-9" and i installed again and it work.
Sorry was my fault!

Revision history for this message
Mohamed Amine Ilidrissi (ilidrissi.amine) wrote :

@pitx: If this is true, I'm marking this bug as Invalid. Feel free to re-open it if you disagree.

Changed in ubuntu:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.