Turnkey Linux: changing from address for system notifications

Easy question on "Turnkey Linux core" appliance (sometimes called TKL core).

It's sending out system alerts and notification to root@localhost which is forwarded to my email address in the postfix Mail server config. But in those messages that it is sending I want to see some kind of reference to the system it is sending the mails from.

Now it just says:

From: <root@core>
Subject:[core] system alerts and notifications enabled

This server is configured to send you system alerts and notifications.


Open in new window

Any idea how I can change the config to mention it's hostname?
J ZSysAdminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dr. KlahnPrincipal Software EngineerCommented:
Side note:  Normally these kinds of things are logged via syslog or rsyslog to a central logging server rather than via email.  This, imo, would be preferable to sending alerts via email as you then don't need to run an MTA on the system.
J ZSysAdminAuthor Commented:
You are completely right. I am aware of that. But it's out of scope for this question on why this was chosen.

So the question remains how can the hostname be included?
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
There should be some header which tells you this info...

Likely the first in time Received: header will tell you this answer, as this will be set to the hostname (machine/container) initiating the email.

Tip: If you have many machines or LXD containers to track, best set the hostname of each to something descriptive... well... if you have many machines/containers to track.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.