
Sudo security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain > /System/Library/OpenSSL/certs/cert. Generate the certificate (this was copied from post above) The content of /etc/postfix/sasl_passwd file is Smtp_tls_per_site = hash:/etc/postfix/smtp_tls_sites Smtp_tls_CAfile = /System/Library/OpenSSL/certs/cert.pemĪs you can see I didn't use parameter, which appears to be not required for gmail. Smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd I found this hint very useful and wanted to illustrate its use based on the example of gmail as your outgoing SMTP server. Open Mail app.Select Preferences.In the Accounts tab, choose the account which is Outgoing Mail Server (SMTP) labeled as Offline.Click the SMTP server and choose Edit SMTP Server List from the list.Enter the right username and password. I make no guarantees, but I hope it helps someone. I pieced this information together from lots of useless searches and several useful how-to's and postings. Only the root user should be able to read it.
#Mac mail gmail smtp offline password#

If that's the case, try: printf "Subject: TestnHello" | sendmail -f second test form specifies the "from" address as you, but can be changed to anything you want as long as it passes muster with your provider's server.
#Mac mail gmail smtp offline Offline#
However, I cannot move the synchronised Gmail IMAP folders into offline 'On My. This should now work until you revoke the password.Relayhost = # (you can use :port, such as :587)smtp_sasl_auth_enable = yessmtp_use_tls = yessmtp_enforce_tls = yessmtp_sasl_security_options =smtp_sasl_tls_security_options =smtp_sasl_tls_verified_security_options =smtp_tls_loglevel = 2 # optional if you wan to see what's going on with the TLS negotiation in /var/log/mail.logsmtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_passwordssmtp_tls_per_site = hash:/etc/postfix/smtp_tls_sitestls_random_source = dev:/dev/urandomCreate /etc/postfix/smtp_sasl_passwords with the following contents: username:passwordCreate /etc/postfix/smtp_tls_sites with the following contents: MUST_NOPEERMATCHThen run the following commands: $ cd /etc/postfix$ chmod go-rx smtp_sasl_passwords$ postmap smtp_sasl_passwords$ postmap smtp_tls_sitesTo test, try: echo "Hello" | mail -s "Test" above test may not work if your provider requires a valid source e-mail address. I marked ALL Gmail folders for offline use, so the messages are downloaded on the Mac. Set Authentication to "Password" enter your Google user name then the app-specific password you generated in the password field. Click on the "Gmail" one and then click on "Advanced". This will open a list of the SMTP servers you have set up for sending mail. Incoming server should be:, your username should be the start of your email address without the section and your password should be the app-specific password, NOT the account password that was previoulsy used) (This accounts area is where you paste in your 'recieving' password under 'incoming mail server'. At the bottom of the right hand pane it will say "Outgoing Server (SMTP):" and should have "Gmail" selected/ Click on this and you get a pop up menu and select "Edit SMTP Server List". Now open Mail and go to Preferences > Accounts and select your Google account.

Go to Google and generate an app-specific password on this page. (Note: There are two locations you must paste you app-specific password, these instructions are for the 'sending' server, not the 'receiving' server')
