Instalirajte Exim4
Konfiguracija
Testiranje
Port 25 u VULTR-u je blokiran prema zadanim postavkama. Ako trebate slati e-poštu bez kontaktiranja VULTR podrške, možete slijediti ovaj vodič kako biste postavili svoj Exim za slanje e-pošte putem Gmail SMTP poslužitelja.
Instalirajte Exim4
apt-get install exim4
Konfiguracija
Pokrenite sljedeću naredbu da konfigurirate Exim4.
dpkg-reconfigure exim4-config
Odaberite ovu opciju kada se od vas zatraži: " pošta poslana od strane smarthost-a; nema lokalne pošte ".
Popunite ostala polja:
System mail name: YOUR_HOSTNAME
IP-addresses to listen on for incoming SMTP connections: 127.0.0.1 ; ::1
Other destinations for which mail is accepted: <BLANK>
Visible domain name for local users: <BLANK>
IP address or host name of the outgoing smarthost: smtp.gmail.com::587
Keep number of DNS-queries minimal (Dial-on-Demand)? No
Split configuration into small files? No
Root and postmaster mail recipient: <BLANK>
Otvorite i uredite /etc/exim4/exim4.conf.template.
Traziti:
.ifdef DCconfig_smarthost DCconfig_satellite
Zatim dodajte ove retke iza njega:
send_via_gmail:
driver = manualroute
domains = ! +local_domains
transport = gmail_smtp
route_list = * smtp.gmail.com
Uklonite druge pametne blokove koji sadrže domains = ! +local_domains.
Traziti:
begin authenticators
I dodajte ove retke iza njega:
gmail_login:
driver = plaintext
public_name = LOGIN
client_send = : YOUR_GMAIL_ACCOUNT@gmail.com : YOUR_GMAIL_PASSWORD
Uklonite druge blokove autentifikatora koji sadrže public_name = LOGIN.
Traziti:
transport/30_exim4-config_remote_smtp_smarthost
I dodajte ove retke iza njega:
gmail_smtp:
driver = smtp
port = 587
hosts_require_auth = $host_address
hosts_require_tls = $host_address
Spremi i zatvori /etc/exim4/exim4.conf.template.
Primijenite novu konfiguraciju:
update-exim4.conf
Ponovno pokrenite Exim4 uslugu:
/etc/init.d/exim4 restart
Testiranje
Sada pošaljite probnu e-poštu koristeći sljedeću naredbu:
echo 'Test Message from VULTR.' | mail -s 'Test Message' YOUR_EMAIL_ADDRESS
Provjerite /var/log/exim4/mainlogjesu li se pojavile pogreške. Sada možete slati e-poštu sa svog VULTR VPS-a.