18

When I install sendmail from the debian repos, I get the following output:

Disabling HOST statistics file(/var/lib/sendmail/host_status).
Creating /etc/mail/sendmail.cf...
Creating /etc/mail/submit.cf...
Informational: confCR_FILE file empty: /etc/mail/relay-domains
Informational: confCT_FILE file empty: /etc/mail/trusted-users
Updating /etc/mail/access...
Updating /etc/mail/aliases...
WARNING: local host name (ixtmixilix) is not qualified; see cf/README: WHO AM I?

Can someone please tell me what this means, what I need to do to qualify my hostname?

0

5 Answers 5

12

It's referring to this page from the readme, which tells you how to specify your hostname. It's warning you that your hostname won't work outside your local network; sendmail attaches your hostname as the sender of the message, but it's going to be useless on the other end because people outside your local network can't find the machine ixtmixilix. You should specify a hostname that can be resolved from anywhere, like ixtmixilix.example.com

4
  • Where should I put the line suggested in the docs? (Dmbar.com define(confDOMAIN_NAME', $w.$m')dnl) Is it in /etc/mail/sendmail.mc?
    – Throoze
    Apr 21, 2014 at 21:47
  • 1
    in /etc/mail/sendmail.cf , then .mc will be updated automatically after running : sendmailconfig cmd Jul 17, 2014 at 13:22
  • 2
    @AbdennourTOUMI You sure that’s not the other way around? Edit sendmail.mc, and .cf will be updated? Mar 17, 2015 at 23:58
  • @JezenThomas It does seem like it's the other way. It only fixed it for me when I edited sendmail.mc.
    – igneosaur
    Jan 2, 2017 at 20:28
11

For me on Ubuntu 14.04 that solved the problem:

$ sudo nano /etc/hostname

Change your host name to something like my-domain.XXX

Where XXX = .com OR .net OR .some

Then sudo sendmailconfig updated all the rest You can test your configuration so:

$ sendmail -v [email protected] < test.mail

I used my private domain email box as services such as gmail block these kind of email: 050 550-5.7.1 [87.68.229.9 12] Our system has detected that this message is 050 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 050 550-5.7.1 this message has been blocked. Please visit 050 550 5.7.1 https://support.google.com/mail/answer/188131 for more information. u3si25544809wje.160 - gsmtp

Where test.mail is a file containing whatever message you wish to send

9
  • didn't worked for me
    – PJunior
    Jul 20, 2015 at 19:44
  • @PJunior, thank you for the remark, fixed! it was test.mail - file name
    – Jadeye
    Jul 20, 2015 at 20:10
  • I was talking about the edition on /etc/hostname/
    – PJunior
    Jul 20, 2015 at 20:12
  • @PJunior, its a file, not a folder, hence /etc/hostname - usually holds your machine name. Try this command: cat /etc/hostname, if you get your machine name as: XXX, just edit this file and rename your machine to XXX.com or XXX.some or any other FQDN
    – Jadeye
    Jul 20, 2015 at 20:16
  • Yes, i'v edit it. Didn't worked :/ but emails are being sent
    – PJunior
    Jul 20, 2015 at 20:17
7

On Debian 8 (Jessie) works:

$ sudo hostnamectl set-hostname yourdomain.com

Then test it this way:

$ hostname yourdomain.com

2
  • This also worked for me on Ubuntu 16.04 Jan 17, 2021 at 17:36
  • Also Ubuntu 22.04
    – sureshvv
    Oct 1, 2023 at 6:22
1

This output refers to a Fully-qualified domain name (FQDN). Which is either an IP address or a domain name (something with a dot in it).

-1

Just edit your hostname by editinig:

sudo vim /etc/hostname

And also update your env:

export HOSTNAME=yourhostname.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .