This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

How to forward all root server security emails to outside email address?
#4
RE: How to forward all root server security emails to outside email address?
Hi everyone,

I posted this question on stackoverflow to get more visibility and was able to solve this problem quickly with just the modification of the main.cf file of postfix.

Basically, the issue is that postfix ignores the .forward file because it thinks it's sending this email to an external address/domain. Hence the error message:

95706148387 2588 Mon May 4 03:41:22 MAILER-DAEMON
(mail for panel.myrealdomain.com loops back to myself)
root@panel.myrealdomain.com

So basically you need to inform the server that the panel.myrealdomain.com is, in fact the internal domain or local hostname. Not sure why this doesn't get setup by default with Sentora as it would seem this should be something that is configured when installing the server.

So if I run hostname in the terminal, the output is panel.mydomain.com. So emails being sent to root@panel.mydomain.com get stuck in this loop in the mailq as deferred because they can't be sent. The .forward file gets ignored because it thinks it's an external domain, only internal (local) domains reference the .forward file.

So all you have to do is edit the file /etc/postfix/main.cf

search for mydestinations, you will see something like this:
mydestination = localhost.$mydomain, localhost

now edit this line to include your domain/hostname:
mydestination = panel.mydomain.com, localhost.$mydomain, localhost

Save the file and you should be good to go. Do a test by sending a test mail to user root. It should arrive into the inbox of the email address you listed in .forward file for the root user. Bam!

check here for additional information: http://stackoverflow.com/questions/30021...S#30021216>
Reply
Thanks given by:


Messages In This Thread
RE: How to forward all root server security emails to outside email address? - by americanninja - 05-04-2015, 07:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Email has suddenly stopped coming through rsthomas 4 6 ,056 10-12-2022, 09:29 PM
Last Post: rsthomas
Why can i not send emails from my site phabeon8 3 7 ,540 04-20-2021, 06:29 AM
Last Post: sparkrack
External mail client cannot connect to server iraqiboy90 2 7 ,017 02-28-2021, 11:34 AM
Last Post: iraqiboy90

Forum Jump:


Users browsing this thread: 3 Guest(s)