LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2021, 01:36 AM   #1
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Rep: Reputation: Disabled
Domain of sender address does not exist


I am trying to send an email logged in as root to user@localhost but haven't been successful.

Checking the email log file I see the notification: domain of sender address does not exist.

I can't seem to find a consensus online so far that clearly explains what the issue is and so how to resolve it.
 
Old 08-07-2021, 08:09 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by iulinux View Post
I am trying to send an email logged in as root to user@localhost but haven't been successful.

Checking the email log file I see the notification: domain of sender address does not exist.

I can't seem to find a consensus online so far that clearly explains what the issue is and so how to resolve it.
You should stick at your other thread with the same problem and not start a new one.

Anyway make sure you have the following in /etc/hosts
Code:
127.0.0.1   localhost localhost.localdomain
::1         localhost localhost.localdomain
 
Old 08-07-2021, 08:17 AM   #3
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thanks. I'll try that now. Would I need to restart sendmail as well?
 
Old 08-07-2021, 08:27 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by iulinux View Post
Thanks. I'll try that now. Would I need to restart sendmail as well?
Nope.
But you need to have "files" before "dns" in /etc/nsswitch.conf hosts line, like this:
Code:
hosts:  files dns

Last edited by bathory; 08-07-2021 at 08:29 AM.
 
Old 08-07-2021, 08:39 AM   #5
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
Presently I have this inside /etc/hosts
Code:
127.0.0.1       localhost
127.0.0.1       vboxslack.  vboxslack
Am I replacing this whole code with what you sent or do I just include it to this?
 
Old 08-07-2021, 08:52 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by iulinux View Post
Presently I have this inside /etc/hosts
Code:
127.0.0.1       localhost
127.0.0.1       vboxslack.  vboxslack
Am I replacing this whole code with what you sent or do I just include it to this?
No need to do something. You can leave /etc/hosts as is.
 
Old 08-07-2021, 09:00 AM   #7
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
No need to do something. You can leave /etc/hosts as is.
So my /etc/hosts file was not the issue?
 
Old 08-07-2021, 10:37 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by iulinux View Post
So my /etc/hosts file was not the issue?
I guess not!

You should know that mail is heavily dependent on dns. If you use the order "files dns" in /etc/nsswitch.conf, then your system will use first /etc/hosts in order to resolve a domain/hostname and if doesn't succeed it will use a dns resolver.

Anyway, did you try to send an email to user@localhost and see what happens. And you can always omit the @localhost part since you're mailing to a local account.
 
Old 08-07-2021, 10:47 AM   #9
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
I tried. But no luck.
 
Old 08-07-2021, 11:17 AM   #10
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
Domain of sender address root@vboxslack does not exist
 
Old 08-07-2021, 11:37 AM   #11
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Deleted, misread the OP.
 
Old 08-07-2021, 11:39 AM   #12
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
It is a local user
 
Old 08-07-2021, 11:59 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by iulinux View Post
Domain of sender address root@vboxslack does not exist
Run as root:
Code:
mail -s Test user@localhost < /dev/null
and post here the relevant part of maillog
 
Old 08-07-2021, 12:35 PM   #14
iulinux
Member
 
Registered: Jul 2021
Posts: 34

Original Poster
Rep: Reputation: Disabled
Please see the attached screenshot. I can't copy from my virtual machine
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2021-08-07 133232.jpg
Views:	185
Size:	174.3 KB
ID:	36904  
 
Old 08-07-2021, 12:51 PM   #15
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
"vboxslack" is the hostname of the VM. sendmail expects a valid FQDN.

What does hostname -d and hostname -s report?

Last edited by Ser Olmy; 08-07-2021 at 12:52 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sendmail, messages bouncing, Domain of sender address does not exist mfoley Linux - Server 1 03-19-2019 05:56 PM
sendmail domain of sender does not exist paulbond Linux - Networking 3 06-15-2009 08:19 AM
external: domain of sender address does not exist talking to my server eagleone Linux - Networking 1 11-02-2005 08:54 AM
Sendmail: Domain of sender address does not exist 360 Linux - Networking 1 02-02-2003 08:40 PM
Sendmail Domain of sender address does not exist mantiev Linux - Networking 0 05-08-2001 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration