LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   change root@localhost.domain.com when sending email. (https://www.linuxquestions.org/questions/linux-newbie-8/change-root%40localhost-domain-com-when-sending-email-631072/)

Ryan@Matraex.com 03-27-2008 01:12 PM

change root@localhost.domain.com when sending email.
 
I am sending all my root email into one account. I am then setting up filters so that each servers email goes into it's own folder.

The problem is, some servers send their mail as, for example server "maple" in domain "matraex", will show as "FROM: root@maple.matraex.com". While others will come in as "FROM: root@localhost.domain.com." Of course I can't filter that cause 10 servers are coming in not actually showing localhost as "maple" which is the server name.

I also have logwatch emails coming in as "logwatch@localhost.domain.com" instead of "logwatch@maple.matraex.com."

I checked /etc/sysconfig/network & /etc/hosts/ but I'm not sure if these are places I want to be and if they are, what to add, remove, edit, etc.

So how do I change this so the actual name shows up, not "localhost"

Thanks guys!

bigrigdriver 03-27-2008 06:31 PM

If you are using postfix, check /etc/postifx/main.cf. Look for this: mydestination = $myhostname, localhost.$mydomain

danger89 07-17-2011 03:42 PM

It should be:
Code:

nano /etc/postfix/main.cf

Treikayan 07-14-2013 03:05 AM

How about for Sendmail? All my messages headers have "root@localhost.localdomain" in them. Thank you.


All times are GMT -5. The time now is 12:15 AM.