2

Is there any way I can "relay" mail traffic? To explain better, lets say the server that will relay the mail is 10.0.0.1, and the proper mail server containing the mail is Gmail, is there any way I can make the mail client connect to 10.0.0.1, but send all the traffic to Gmail? This is because in the circumstance I have, I can only connect directly to this server, with no direct connection to the internet, so to use mail I have to forward/relay it.

Is there any way this is possible, and if so how?

3 Answers3

7

Is there any way I can "relay" mail traffic?

Yes.

Is there any way this is possible, and if so how?

This is generally known as a mail "smarthost", and it is a very frequent use case.

You'll need to choose an MTA (choose postfix), and then consult that MTA's documentation for how to set up a smarthost relay.

EEAA
  • 109,363
  • 18
  • 175
  • 245
2

What you need is an SMTP server with so called "smarthost" configuration entry. Here is an example, using postfix:

http://www.certdepot.net/smtp-configure-a-mta-with-a-smart-host/

The particular specifics of your configuration will depend on the specifics of your requirements :)

0

If your only problem is not reaching the real mail server, setting up a relay is a waste of resources and adds problems with authentication. Why don't you simply use port forwarding (iptables or rinetd)?

Steffen Heil
  • 114
  • 7