Logwatch return email address

Issues related to applications and software problems and general support
Post Reply
wolfrR1der
Posts: 18
Joined: 2020/04/13 17:42:58

Logwatch return email address

Post by wolfrR1der » 2021/06/02 14:43:15

This is probably an easy on that I can't seem to find nor can I find search results for it.

We exported a CentOS8 VM to use as another, similar server and for the most part this works fine. However there's one little annoying thing that I can't find an answer to. When Logwatch sends out it's email the return address is for the previous server. The email shows it's from Server1@company.com but it's the report for Server2.company.com. Note that Logwatch sends email to "root" and root's email is then forwarded via alisas to me.

Where do I find this address at? It's not in the Logwatch, not in aliases, not in postfix's main.cf.

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Logwatch return email address

Post by tunk » 2021/06/02 14:49:11

No experience with logwatch, so this is just guessing: did you change the hostname?

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Logwatch return email address

Post by lightman47 » 2021/06/02 14:50:05

I suspect it's from the machine name itself. Did you change it to server2 after you cloned it?

What shows up when you sudo hostnamectl in server2?

wolfrR1der
Posts: 18
Joined: 2020/04/13 17:42:58

Re: Logwatch return email address

Post by wolfrR1der » 2021/06/02 15:35:35

Yeah, hostname was changed. After reboots it reports the correct hostname. When I just ran the "hostname" command it reports the new hostname. I am at a loss.

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Logwatch return email address

Post by lightman47 » 2021/06/02 16:12:01

does the configure section in this help you?

https://devops.ionos.com/tutorials/inst ... -logwatch/

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Logwatch return email address

Post by TrevorH » 2021/06/02 16:20:43

And you don't have "mydomain =" in /etc/postfix/main.cf or a line in /etc/postfix/generic that tells it to translate e.g.

@thisbox.company.com @company.com
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply