Advanced

Configure Postfix to use Gmail as a Mail Relay

Posted by bob on · 1 comment
Howtoforge Linux Howtos und Tutorials
Mail this story
Print this story

If you have a Gmail account, you can configure your MTA to relay outgoing mail through Gmail. This gives you the benefit of Gmail's reliability and robust infrastructure, and provides you with a simple means of sending email from the command line. In this tutorial, we will use Postfix as our MTA. Postfix is a free, open-source, actively maintained, and highly secure mail transfer agent.

Full Story

  Nav
» Read more about: Groups: Linux; Story Type: News Story

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (1)

Just because something is possible doesn't mean it should be done.

There is so much wrong with the idea of storing your gmail password in plain text and in the same file as your gmail address.

Please don't do this.

I'm not sure what the use case might be for sending email through gmail in this manner.

If an individual wishes to send through gmail and the platform is a user's GNU/Linux box --- then there are many ways to accomplish this from the command line.... mutt is a really good example.

If a domain owner wishes to send an email, and is going through the hassle of setting up Postfix -- don't half-ass the thing, just complete the installation, along with at least Reverse DNS and SPF... It's not that difficult, and will help keep the ol' grey matter nice and wrinkled.

If a domain owner wishes to send an email using gmail, then a proper IMAPS connection can be setup... again this can be accomplished using 'mutt' ... and here is a much more secure method for doing that sort of configuration:

http://xmodulo.com/mutt-email-client-encrypted-passwords.html

****BTW:

For my mail servers, I typically authenticate against a Courier IMAP server and store passwords encrypted in postgresql.

In order to actually use the various sasl authentication methods, you'll need to enable saslauthd in:

/etc/default/saslauthd

Here's the Postfix SASL page with all the neat configuration options:

http://www.postfix.org/SASL_README.html

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post