LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Not able to get system mail logs in mutt after changing hostname. (https://www.linuxquestions.org/questions/linux-networking-3/not-able-to-get-system-mail-logs-in-mutt-after-changing-hostname-4175634667/)

nicedreams 07-22-2018 01:22 PM

Not able to get system mail logs in mutt after changing hostname.
 
I'm kind of new to linux email. Ran MS Exchange for a few years though which is an entirely different beast.

I made a change to my home linux server to make it more organized with other linux devices I have. So I changed my hostname from kenserver to kenserver.berfam.local. I have other devices set to theirhostname.berfam.local.

I have snapraid installed on this server and used to get the logs mailed to root which was aliased to ken and I would use 'mutt' program and see the logs. I'd get other system logs also that way.

After changing my hostname from kenserver to kenserver.berfam.local I am no longer able to see those local system mails from snapraid or any other local logs I would get. For the root user I do see a file called '/root/sent' that shows the snapraid logs and can read them with 'cat /root/sent', but how do I get it working in 'mutt' again or forwarding to user ken like before?

This has been going on for couple months. Yesterday I installed Exim4 so I can start using Logwatch. That is working fine sending out to gmail smarthost and was hoping would change something for system mail but didn't.

I'm hoping someone can explain how local system mail works for users? Is local user mail different from using Exim? Is there a different mail agent between local user log mail and external email? Do I need to configure Exim4 so user ken can get local logs in 'mutt' again? After I understand how this work, should help me understand how to fix issue.

Maybe I'm doing hostname incorrectly? Do I even need .local?

nicedreams 07-22-2018 01:27 PM

Posting files for reference since will probably be asked for.

-----------------------------------------
cat /etc/hostname
-----------------------------------------
kenserver.berfam.local

-----------------------------------------
cat /etc/hosts
-----------------------------------------
127.0.0.1 localhost
127.0.1.1 kenserver.berfam.local kenserver

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

-----------------------------------------
cat /etc/aliases
-----------------------------------------
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: ken

nicedreams 07-23-2018 12:02 AM

I was able to fix my issue.

Within /etc/exim4/update-exim4.conf.conf

Change dc_other_hostnames='kenserver' from dc_other_hostnames='kenserver.berfam.local'

Seems Exim was seeing and routing out to internet. After removing FQDN and just putting hostname it's working fine now.


All times are GMT -5. The time now is 05:28 AM.