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?

1
  • you are now able to upvote answers you find useful :-)
    – guntbert
    Oct 10, 2015 at 18:38

3 Answers 3

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.

1
  • I just looked into this and it's definitely what I was looking for, thanks for the replying so fast! Oct 9, 2015 at 22:25
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 :)

4
  • This sounds exactly like what I need, thanks for reply! Oct 9, 2015 at 22:25
  • How about voting it up, then? ;)
    – user65677
    Oct 9, 2015 at 22:25
  • I have voted it up, but it doesn't display publicly until I have 15 or more reputation, sorry. Oct 9, 2015 at 22:26
  • Ah, NP. I didn't know that.
    – user65677
    Oct 9, 2015 at 22:26
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)?

Not the answer you're looking for? Browse other questions tagged .