# HOW-TO properly configure your sSMTP

## zeky

Hello my friends.

Since i saw a lot of posts here about problematic configuring sSMTP, i've decided to write a short and simple HOW-TO about how to make it work on your system  :Smile: 

Here we go:

1)First of all, what you need to know is that sSMTP can NOT deliver your mail localy, so forget sSMTP if your're looking for this feature. Use postfix, qmail, sendmail etc. instead. What sSMTP does is connect to your ISPs  mail server and send mail from there.

Lets' start:

My configuration is like this:

I have a small LAN at home: a few PCs and a Trendnet DSL router. I have a static IP and i've registerded mydomain.dyndns.org to that IP. Inside lan i have 192.168.x.x subnet.

Well, all you need to do is configure this files:

a)/etc/ssmtp/ssmtp.conf

Only this lines do matter. I've configure it as follows:

root=postmaster

mailhub=myisp.mail.server.net

hostname=mydomain.dyndns.org

Mailhub= mail server of your ISP provider

Hostname= your domain

b)/etc/ssmtp/revaliases

Use this file if you'ld like to change »From:« field address. In my case i've configure it like this, so i can see that sSMTP is sending me mail:

root:sSMTP@mydomain.dyndns.org:myisp.mail.server.net

Well that's it. And for those who are getting dead.letter in theyr home folder, because cron is unable to send mail, just add this line in your crontab (crontab e):

MAILTO="some_address_you_want_mail_to_be_sent_to@some_domain.com"

That's it. 

enjoy

----------

## tfunk

Probably a dumb noob question, but....

Can ssmtp be used ti send email from multiple email addresses?

As an example...

for a php driven website, can ssmtp send emails from admin@domain.com, support@domain.com, and subscriptions@domain.com or whatever?

My need is to allow a php driven website to send emails to the websites users.  I have an Exchange server that ssmtp (or whatever) can send it's email messages through, so I don't think I need full boat sendmail installed on the webserver.

Will ssmtp do the trick or do I need to use sendmail?

Thanks for the advice!

Tfunk

----------

