Archive

Posts Tagged ‘smtp’

Install msmpt-mta on ubuntu 9.04

April 1st, 2009 No comments

This will install msmtp-mta on your computer, a nice little mta that uses for example gmail for outgoing mails.

We install the packages:

sudo apt-get install msmtp-mta

We change the config file:

vim /etc/msmtprc

A sample file for google:

account gmail_robomailer
host smtp.gmail.com
port 587
auto_from off
auth on
user yourAccount@googlemail.com
password yourPassword
tls on
tls_starttls on
from yourAccount@googlemail.com
maildomain googlemail.com
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile
syslog LOG_MAIL
account default: gmail_robomailer

For further details check:

man msmtp

Sample usage from a php.ini file:

sendmail_path = /usr/bin/msmtp -t -i

To test if the setup was successful you can send your self a mail via command line:

cat <<EOF | msmtp -a gmail_robomailer some@email.tld
From: yourAccount@googlemail.com
To: some@email.tld
Subject: test

This is a test!
EOF
Categories: Linux, smtp Tags: , , ,