1. Menginstall service baru yang open ke internet ( harus setting firewall, harus di monitor jg )
2. Harus meregister MX supaya ga kedetek spam ( ini ribet, apalagi kalu email perushnya di host di email provider yang lain )
Toh saya cuma butuh buat ngirim email yang penting email2x itu ga dicap sebagai spam karena memiliki record mx yang bersih.Makaaa...jatuhlah pilihan saya pada smtp client msmtp dan gmail yang menyediakan fasilitas pop/smtp gratis.
HOWTO Mengirim email melalui relay smtp dengan menggunakan msmtp
Jika anda menggunakan ubuntu, pada terminal dapat diketik
sudo apt-get install msmtp
setelah proses instalasi berjalan, buat file konfigurasi nya. Letaknya dapat dilihat dengan mengeksekusi
msmtp --version
output :
.
.
User configuration file name: /home/myuser/.msmtprc
.
.
chmod 600
account default
host smtp.gmail.com
port 587
from emailsaya@gmail.com
auth on
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
user emailsaya
password (isidenganpassword)
account default diperlukan, karena tanpa ada perintah --account , program ini secara otomatis akan mengeksekusi konfigurasi account default
setelah dilakukan proses konfigurasi, settingan ini dapat diuji dengan mengeksekusi command
msmtp -S
================================================================================
SMTP server at smtp.gmail.com (pv-in-f109.1e100.net [72.14.213.109]), port 587:
mx.google.com ESMTP x31sm279540wfd.19
TLS certificate information:
Owner:
Common Name: smtp.gmail.com
Organization: Google Inc
Locality: Mountain View
State or Province: California
Country: US
Issuer:
Common Name: Google Internet Authority
Organization: Google Inc
Country: US
Validity:
Activation time: Fri 23 Apr 2010 03:02:45 AM WIT
Expiration time: Sat 23 Apr 2011 03:12:45 AM WIT
Fingerprints:
SHA1: 1A:6F:48:8F:BE:5B:FD:92:D8:12:30:F9:22:CE:84:49:B3:43:BD:2C
MD5: 60:39:DE:FB:0A:D9:9E:43:26:E7:75:AC:60:48:A1:B0
Capabilities:
SIZE 35651584:
Maximum message size is 35651584 bytes = 34.00 MiB
STARTTLS:
Support for TLS encryption via the STARTTLS command
AUTH:
Supported authentication methods:
PLAIN LOGIN
================================================================================
untuk mengirim email via relay google cukup dengan mengetik
echo -e "Subject: (isi_subjek)\n\n(isi_email)" | msmtp --debug emaitesting@yahoo.com
reading recipients from the command line
<-- 220 mx.google.com ESMTP x9sm1798804waj.3
--> EHLO localhost
<-- 250-mx.google.com at your service, [125.163.87.132]
<-- 250-SIZE 35651584
<-- 250-8BITMIME
<-- 250-STARTTLS
<-- 250 ENHANCEDSTATUSCODES
--> STARTTLS
<-- 220 2.0.0 Ready to start TLS
TLS certificate information:
Owner:
Common Name: smtp.gmail.com
Organization: Google Inc
Locality: Mountain View
State or Province: California
Country: US
Issuer:
Common Name: Google Internet Authority
Organization: Google Inc
Country: US
Validity:
Activation time: Fri 23 Apr 2010 03:02:45 AM WIT
Expiration time: Sat 23 Apr 2011 03:12:45 AM WIT
Fingerprints:
SHA1: 1A:6F:48:8F:BE:5B:FD:92:D8:12:30:F9:22:CE:84:49:B3:43:BD:2C
MD5: 60:39:DE:FB:0A:D9:9E:43:26:E7:75:AC:60:48:A1:B0
--> EHLO localhost
<-- 250-mx.google.com at your service, [125.163.87.132]
<-- 250-SIZE 35651584
<-- 250-8BITMIME
<-- 250-AUTH LOGIN PLAIN XOAUTH
<-- 250 ENHANCEDSTATUSCODES
--> AUTH PLAIN AGZyYW5reS5zeWFiYW5kcmlhd2FuAGdhbnRpZGV1aWdhbnRpZGV1aQ==
<-- 235 2.7.0 Accepted
--> MAIL FROM:
<-- 250 2.1.0 OK x9sm1798804waj.3
--> RCPT TO:
<-- 250 2.1.5 OK x9sm1798804waj.3
--> DATA
<-- 354 Go ahead x9sm1798804waj.3
--> Subject: test
-->
--> Tmmmest
--> .
<-- 250 2.0.0 OK 1282724067 x9sm1798804waj.3
--> QUIT
<-- 221 2.0.0 closing connection x9sm1798804waj.3
SUKSES TERKIRIM dan DITERIMA
Selamat mencoba :)
Tidak ada komentar:
Posting Komentar