sebelum melakukakn configurasi siapkan dahulu paket-paket yang akan diinstall
cyrus-sasl-2.1.23-11.fc13.i686.rpm cyrus-sasl-devel-2.1.23-11.fc13.i686.rpm mailx-12.4-6.fc13.i686.rpm
cyrus-sasl-gssapi-2.1.23-11.fc13.i686.rpm cyrus-sasl-lib-2.1.23-11.fc13.i686.rpm cyrus-sasl-md5-2.1.23-11.fc13.i686.rpm
cyrus-sasl-plain-2.1.23-11.fc13.i686.rpm sendmail-cf-8.14.4-4.fc13.noarch.rpm
#mkdir /etc/mail/certs
#openssl req -new -x509 -keyout cakey.pem -out cacert.pem -days 3650
#openssl req -nodes -new -x509 -keyout sendmail.pem -out sendmail.pem -days 3650
kemudian copy ca-bundle.crt ke /etc/mail/certs., kalo tidak tau lokasinya search saja find / -name ca-bundle.crt kebetuan ditempat saya ada di /etc/pki/tls/certs/ca-bundle.crt
buat directory n file untuk authentifikasi di /etc/mail/auth/client-info
#vi client-info
dan tambahkan
AuthInfo:smtp.gmail.com "U:root" "I:username@gmail.com" "P:password" "M:PLAIN"
AuthInfo:smtp.gmail.com:587 "U:root" "I:username@gmail.com" "P:password" "M:PLAIN"
buat file db nya
#makemap -r hash client-info.db < client-info
tambah n edit di /etc/mail/sendmail.mc
FEATURE(`authinfo’,`hash /etc/mail/auth/client-info.db’)dnl
define(`SMART_HOST’,`smtp.gmail.com’)dnl
define(`RELAY_MAILER_ARGS’, `TCP $h 587′)
define(`ESMTP_MAILER_ARGS’, `TCP $h 587′)
define(`CERT_DIR’, `/etc/mail/certs’)
define(`confCACERT_PATH’, `CERT_DIR’)
define(`confCACERT’, `CERT_DIR/ca-bundle.crt’)
define(`confCRL’, `CERT_DIR/ca-bundle.crt’)
define(`confSERVER_CERT’, `CERT_DIR/sendmail.pem’)
define(`confSERVER_KEY’, `CERT_DIR/sendmail.pem’)
define(`confCLIENT_CERT’, `CERT_DIR/sendmail.pem’)
define(`confCLIENT_KEY’, `CERT_DIR/sendmail.pem’)
define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)
setelah melakukan konfigurasi sendmail.mc kemudian compile ke sendmail.cf menggunakan m4
#m4 sendmail.mc > sendmail.cf
restart servicenya
#service sendmail restart
untuk melakukan testing
#echo testing | mailx -s "test saja" youremail@email.com
untuk melakukan troubleshout bisa dilihat di /var/log/maillog
0 comments:
Posting Komentar