Linux – How to send email from non-TLS enabled client through TLS-only Gmail account

emailgmaillinuxsmtptls

I need to be able to send email from a client (an OKI document scanner) which is non-TLS capable. But my company's email service is provided by Gmail-Google Apps, which is configured to force TLS authentication. Therefore the scanner cannot connect to the Google SMTP server.

I have a local linux machine that I could use in the following way: have the scanner connect to some kind of email relay in the linux machine without TLS, and have the linux machine relay the email to Google's server under TLS.

Could you tell me if there is any kind of simple MTA that I could install in the linux machine and that would allow me to do this? I have zero experience with full-fledge MTAs of the likes of sendmail, postfix or exim, so the simplest the solution the better.

If the solution were to use a full-fledge MTA (sendmail, postfix or exim, or whatever), could you also help with the configuration? I understand these are not trivial to configure.

There is of course no need for the scanner to receive emails, just to send them.

Thanks!

Best Answer

I believe you could use something like stunnel to act as a proxy. Stunnel installed on the Linux machine can accept plaintext connection from the scanner and forward the communication using SSL connection to Google SMTP server.

You can find an example of such a configuration on http://securityconscious.blogspot.com/2011/03/setting-up-stunnel-in-client-mode-in.html.

However the communication between the scanner and stunnel will be in plaintext in this case so your scanner's Google account password will be under the risk of being compromised!