1

mail-utils did a number on my system.

I would like to get my system back to before mail-utils was installed.

I tried un-installing it and posting at other Ubuntu forums.

It is messing with my update,clean,and remove script.

postconf: warning: valid_hostname: numeric hostname: 7

postconf: fatal: unable to use my own hostname
Use of uninitialized value $destinations in scalar chomp at /var/lib/dpkg/info/postfix.config line 221.

Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: warning: valid_hostname: numeric hostname: 7
postconf: fatal: unable to use my own hostname
dpkg: error processing package postfix (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is in mail.log

Jan  3 17:08:02 7 postfix/sendmail[6178]: warning: valid_hostname: numeric hostname: 7
Jan  3 17:08:02 7 postfix/sendmail[6178]: fatal: unable to use my own hostname

I have a clone image, but it's 10 days old. :-(

I guess I am the first to have this problem.

I hope someone can help. :-)

thomasrutter
  • 36,068
  • 10
  • 86
  • 105
fixit7
  • 2,776
  • 3
  • 30
  • 70

3 Answers3

2

If Your computer doesn't belong to any domain, just clean box "Domain Search" in ethernet configuration, correct file /etc/postfix/main.cf and then run:

apt-get install postfix
galoget
  • 2,943
  • 2
  • 20
  • 24
Kamil
  • 21
  • 1
2

It appears that your system hostname is set to a number, not a name. Read /etc/hostname to check.

Depending on how postfix is configured, it may be getting this from your /etc/hostname. Try updating this with the command

sudo hostname <newhostname>

If this fixes the problem you'll need to make it permanent by editing it in /etc/hostname which contains only the hostname and /etc/hosts if you have a reference to it somewhere in that file.

Or, check your postfix configuration in /etc/postfix/main.cf to see if you have overridden anything there which may cause this issue.

thomasrutter
  • 36,068
  • 10
  • 86
  • 105
  • 7 is in hostname. What do I use for my hostname? – fixit7 Jan 05 '18 at 03:42
  • A name consisting of letters and numbers, but not starting with a number, such as "fixit7". Note that a segment of a full hostname in DNS can in theory entirely consist of a number, but not everything supports it when used as hostname for a machine like this. – thomasrutter Jan 05 '18 at 04:24
0

I had similiar problem with :

apt install mailutils

and when I receive hostname error then

  1. I've edited /etc/postfix/main.cf

  2. Go to line: myhostname=

  3. Write your domain name. For example: example.com.

  4. Run again : apt install mailutils

  5. Send mail :

Execute Linux command

 echo "This is the body of an encrypted email" | mail -s "This is the
    subject line" 3321@mailinator.com
  1. Go to public mail

https://www.mailinator.com/v4/public/inboxes.jsp?to=3321

John Tribe
  • 101
  • 1