Sebelum implement pastikan kalau sendmail sudah terinstall di OS dan sudah mempunyai SES SMTP Credentials.
Buka dan edit file /etc/mail/authinfo, jika belum ada buat file tersebut.
Tambahkan di bawah ini pada file authinfo ;
AuthInfo:email-smtp.us-west-2.amazonaws.com “U:root” “I:USERNAME” “P:PASSWORD” “M:LOGIN”
Untuk USERNAME dan PASSWORD yang di
maksud adalah bukan ACCESS ID dan SECRET KEY pada user IAM, tapi SES
SMTP Credential yang sebelumnya di buat.
Simpan dan jalankan perintah berikut di shell :
$ sudo makemap hash /etc/mail/authinfo.db < /etc/mail/authinfo
Edit file /etc/mail/access dan tambahkan ini ;
Connect:email-smtp.us-west-2.amazonaws.com RELAY
Lalu generate /etc/maill/access.db dengan perintah ;
$ sudo makemap hash /etc/mail/access.db < /etc/mail/access
Lalu edit file /etc/mail/sendmail.mc dan /etc/mail/sendmail.cf, sebelum edit backup dulua file tersebut untuk mencegah hal2 yang tidak diinginkan (bahasanya formil bener).
Edit file /etc/mail/sendmail.mc dan masukkan konfigurasi berikut
define(`SMART_HOST’, `email-smtp.us-west-2.amazonaws.com‘)dnl
define(`RELAY_MAILER_ARGS’, `TCP $h 587‘)dnl
define(`confAUTH_MECHANISMS’, `LOGIN PLAIN’)dnl
FEATURE(`authinfo’, `hash -o /etc/mail/authinfo.db’)dnl
MASQUERADE_AS(`YOUR_DOMAIN’)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
Selanjutnya chmod file /etc/mail/sendmail.cf agar bisa di edit/tulis.;
$ chmod 666 /etc/mail/sendmail.cf
Generate file sendmail.cf ;
$ sudo m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Jika Command Not Found, installed m4 dan sendmail-cf
setelah berhasil di generate, ubah kembali file tersebut menjadi readonly
$ chmod 644 /etc/mail/sendmail.cf
Restart sendmail
$ sudo service sendmail restart
Testing kirim email ;
format : sudo /usr/sbin/sendmail -f <pengirim> <penerima>
$ sudo /usr/sbin/sendmail -f from@cyberthug.net to@slonongboys.com
Tekan tombol Enter, ketik isi pesan email.
Tekan Ctrl+D jika ingin mengirim email.
Semoga bermanfaat
Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts
Friday, January 22, 2016
Mount S3 bucket di Lokal server
OS yang di gunakan AMI Linux, dependency files untuk s3fs adalah;
– gcc
– libstdc++-devel
– gcc-c++
– fuse
– fuse-devel
– curl-devel
– libxml2-devel
– mailcap
– automake
– openssl-devel
– gcc
– libstdc++-devel
– gcc-c++
– fuse
– fuse-devel
– curl-devel
– libxml2-devel
– mailcap
– automake
– openssl-devel
$ yum install -y gcc libstdc++-devel gcc-c++ fuse fuse-devel curl-devel libxml2-devel mailcap automake openssl-devel
download source package menggunakan git ;
$ git clone https://github.com/s3fs-fuse/s3fs-fuse
$ cd s3fs-fuse/
$ git clone https://github.com/s3fs-fuse/s3fs-fuse
$ cd s3fs-fuse/
Config source package sebelum di kompile dan install
$ ./autogen.sh
$ ./configure –prefix=/usr –with-openssl
$ ./autogen.sh
$ ./configure –prefix=/usr –with-openssl
Kompile dan install aplikasi
$ make
$ sudo make install
$ make
$ sudo make install
Verifikasi aplikasi s3fs telah terinstall ;
$ s3fs –version
$ s3fs –version
output ;
Amazon Simple Storage Service File System 1.61
Copyright (C) 2010 Randy Rizun
License GPL2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Amazon Simple Storage Service File System 1.61
Copyright (C) 2010 Randy Rizun
License GPL2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Subscribe to:
Posts (Atom)