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

 

Fix error Bitdefender on Linux

Fix error Bitdefender on Linux

As many BitDefender Antivirus Scanner for Unices users have noticed, attempting to run the command line tool (bdscan) or the GUI application will result in an unexpected segmentation fault. The issue is caused by an incompatibility between the latest antivirus engines retrieved through update and the their platform specific component (bdcore.so) which currently cannot be updated. Until a new build of the packages is made, the solution is to grab the latest bdcore.so library and use it to replace the existing one.  In order to accomplish this task you will need run the following comands as root:
# cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* | \
      awk ‘/bdcore.so.linux/ {print $3}’ | \
      while read bdcore_so; do
          touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
          bdscan –update;
          mv /opt/BitDefender-scanner/var/lib/scan/bdcore.so \
              /opt/BitDefender-scanner/var/lib/scan/bdcore.so.old;
          ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
              /opt/BitDefender-scanner/var/lib/scan/bdcore.so;
          chown bitdefender:bitdefender \
              /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
      done
We apologize for any inconvenience created by this issue. Thank you.

#
cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* |awk ‘/bdcore.so.linux/{print $3}’|while read bdcore_so;do touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;bdscan –update;ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so /opt/BitDefender-scanner/var/lib/scan/bdcore.so;done