Code Monkey home page Code Monkey logo

postfixconf's Introduction

postfixconf - Configure Postfix for Gmail (or any other) SMTP on Mac OSX

OSX - send email from command line

This script will enable and configure command line email on OSX. It basically does what is described here.

Install/Run

$ sudo bash -c "$(curl -sSL https://raw.github.com/roubles/postfixconf/master/postfixconf.sh)"

Note: This must be done as sudo.

Sample output

$ sudo ./postfixconf.sh 
Type the SMTP hostname and port (example: smtp.gmail.com:587): smtp.gmail.com:587
Type the full username (example: [email protected]): [email protected]
[email protected]'s Password: 
Confirm [email protected]'s Password: 


Working...
That relay host smtp.gmail.com:587 is already in /etc/postfix/main.cf. Attempting to update.
That relay host is already in /etc/postfix/sasl_passwd. Attempting to update.
Configuring gmail smtp
Updating /etc/postfix/main.cf
Updating /etc/postfix/sasl_passwd
NOTE! For gmail you must enable less secure apps for postfix to work: https://www.google.com/settings/security/lesssecureapps
Restarting postfix
Sending test email to [email protected]
You are done. Check [email protected]'s email.
Do you want to tail /var/log/mail.log [y|n]:n 

Now what?

You should now be able to send emails as such:

$ echo "42" | mail -s "The answer to life the universe and everything" [email protected]

Trouble in paradise

If you are having issues, checkout /var/log/mail.log

$ tail -f /var/log/mail.log

You can see your outgoing mail queue as follows:

$ mailq

postfixconf's People

Contributors

roubles avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.