Using postfix send email through AWS SES in Google Cloud Compute

To send email using AWS SES in Google Cloud Compute:

  1. Install Postfix (default installed) when you create GCE instance. We need install package:

#yum install cyrus-sasl-plain

2. Add lines to /etc/postfix/main.cf

#vi /etc/postfix/main.cf

relayhost = [email-smtp.us-west-2.amazonaws.com]:2587
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt

3. Create file /etc/postfix/sasl_passwd

#vi /etc/postfix/sasl_password

[email-smtp.us-west-2.amazonaws.com]:2587 SES_USERNAME:SES_PASSWORD

4. Postmap hash sasl_password file

#postmap hash:/etc/postfix/sasl_passwd

5. Secure Postfix

#rm -rf /etc/postfix/sasl_passwd

#chmod 600 /etc/postfix/sasl_passwd.db

6. Restart Postfix server and test send email through SES

#service postfix restart

#sendmail -f from@example.com to@example.com

FROM: from@example.com

Subject: TEST

TEST EMAIL FROM GCE USING AWS SES.

.

7. Check log at /var/log/maillog

 

Configure SSO between Oracle Cloud Services and Google Apps

In this post, I will introduction step by step to configure SSO between Google Apps vs Oracle Cloud Services.

Requirement:

  1. Google Apps account
  2. Registed Oracle Public cloud services at https://cloud.oracle.com

(In some countries cannot get mobile request code, just chat to oracle support to get verify code  while you registration).

Configuration:

  • At Google Apps:
  • At Oracle Cloud Services:
Login to Admin Console in Google Apps  Login to My Services in Oracle Cloud Services.
In Admin console, search SAML in Google Search, it will return Apps to configure SAML 2.0  Click to Users, SSO Configuration tab
In Apps > SAML apps, click “+” to  to create new apps.
In SAML configure screen, choose Setup My own custom app
In next steps, choose Option 2, Download IDP metadata. You will get xml file has SAML v2.0 information. Click Next to continue.  Import IDP metadata to which you download from Google Apps
In next step you can enter any information you want, click Next to continue   After configure SSO, we have some URL to configure in Google Apps.
Using URL in Configure SSO in Oracle Cloud Services

ACS URL:  Copy value of Assertion Consumer Service URL in Oracle SSO.

Entity ID: Copy value of  Provider Id URL in Oracle SSO.

Start URL: Copy value of Logout Service Endpoint URL in Oracle SSO.

Name ID: Basic information and Primary Email

Name ID Format: EMAIL

Click Next to continue

You completed configure SAML apps for Oracle Cloud Services in Google Apps.

You need turn on SSO for user in Google Apps

After configured and turned on SSO in Google Apps. We can test SSO in Oracle cloud service.

Click to Test button in Test your SSO

 Click to Start SSO to begin test SSO.
 Check SSO Operation Result. It shoud be Authentication Successful
 Enable SSO for user
 Enable Sign in to Oracle cloud Services with Identity Domain credentials
Next, you can add user account in Oracle Cloud Services has email in Google Apps Account to SSO.

Click to Users tab, Click to Add button

Enter user information and add Roles for user.

 User can access to Oracle cloud services from Google Apps

You can view full document with images here