server to server emails

Hi, now I have managed to get my emails working on my first server how can I get my second server to send emails to it. This is my setup;

Server 1 ip 123.456.789.123
Set up as server1.domain.com as hostname with ns1.domain.com as nameserver. Main www.domain.com site is on this server with email account server@domain.com

Server2 ip 234.567.890.123
Set up as server2.domain.com as hostname with ns2.domain.com as nameserver.

Now server2 obviously can’t host www.domain.com as this is already on server1.
Server1 has DNS records for server2 and is working ok.

What I want to do is for any root emails or webmin emails on server2 to be sent to the server@domain.com email address, so where do I set this up as everything on server2 is backing up in the mail queue.

Is it because port 25 will need unblocking on server2 (server1 already is) or do I just need to add an email address somewhere.

Hi,

If I understand correctly, you’d just need to setup email forwarding so that messages reaching the root user on server #2 would be forwarded to the root (or another user) on server #1.

If that’s what you’re after, and you can’t figure out how to do so, let me know.

Best Regards, Peter Knowles TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com

Hi, yes that is exactly correct. I want server emails which should normally go to root on server 2 forwarding to server 1.

At present all email sent to root on server 1 is then mail aliased to server@server1.com I know want to set up server 2 so that all servers emails go to root as per normal which is then forwarded onto server@server1.com as per server 1.

I have changed the mail alias on server 2 so it is identical to server 1 but at present everything is stacking up on server 2. Am I missing something or does port 25 need unblocking on server 2?

anybody???

Howdy,

After sending an email, take a peek in the email logs to see what exactly is happening. If there is an error, or other problem, the email logs should help you identify what is going on.

Those are in /var/log/maillog, or /var/log/mail.log, depending on your distro.

-Eric

thats ok but have I set it up right in the first place? I can’t check email logs if nothing is set up correctly, please read my first post as to see what I want to achieve.

sauron,

  1. Go to: Webmin > Servers > Postfix Mail Server > Mail Aliases

  2. Locate and click on the “root” alias.

  3. Change “Enabled” to “Yes”

  4. Change “Alias to” to “Email Address”

  5. Enter your email address next to “Email Address” field.

  6. Click “Save”

Give that a try, and let us know if it meets your needs.

Best Regards, Peter Knowles TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com

tried that, as thats what I thought nice and simple
but getting the following error in maillogs

jul 31 12:55:36 server3 postfix/error[17707]: 81BBF5C82534: to=root@somedomain.com, orig_to=, relay=none, delay=45455, delays=45407/47/0/0.04, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 123.123.123.123[123.123.123.123]:25: Connection timed out)

which would suggest the receiving server has port25 blocked but it doesn’t as emails sent from elsewhere arrive at server1

also just checked config and getting this error;

Your Postfix configuration is missing the system’s mail hostname somedomain.com from the mydestination line, which will cause mail to bounce.

bearing in mind that somedomain.com is hosted on server1 what do I add on server2??

Sorted FINALLY