Send email unauthenticated to an internal SMTP server which then relays onto authenticated SMTP

emailsmtpsmtp-auth

I have a back-end system which only supports sending email to an UNauthenticated SMTP server, however, ultimately it needs to go via an authenticated SMTP server on the public internet.

My idea was to send it internally to a local SMTP server unauthenticated, and then have that middleman server relay to an authenticated public SMTP server (such as gmail) with the relevant credentials.

Can this be done, any recommended SMTP servers?

By the way, searching on Google with search terms "unauthenticated" and "authenticated" in the same query doesn't seem to get me far, it just gives me a load of results where people want to access SMTP servers without authentication. Nothing on relaying from unauth to auth with credentials intact. (Or something to that effect).

Cheers,
Mike.

Best Answer

In case you're a Windows guy, the IIS virtual SMTP service can be installed on most versions of Windows Server, which can be configured to accept anonymous inbound connections and forward to an authenticated smarthost, in much the same way as Matt's Heraka option:

In the vSMTP service's properties, within IIS Manager:

  • The Access tab has an Authenticaton button, from which you can tick Anonymous access -- this will allow unauthenticated inbound SMTP connections

  • The Access tab also has Connection Control and Relay buttons, which I would probably use to limit access to the SMTP to known IPs (if you are running your service from the same server, you can limit these to 127.0.0.1, for example)

  • The Delivery tab has an Advanced button, from which you can configure a Smart host, which is the hostname/IP of your authenticated SMTP server (I would turn off Attempt direct delivery here, so it always uses the smart host)

  • The Delivery tab also has an Outbound Security button, where you can define the Basic authentication username/password/TLS settings supplied by your authenticated SMTP server's administrators.

By supplying the right combination to these settings, you should be able to achieve what you are looking for.

J.

Related Topic