However, I have little spare time and so having an email in my inbox each morning with a summary would now be useful. So I re-enabled sendmail, but as it turns out, as is with many ISPs nowadays, outgoing connections to port 25 are disallowed - so having my server send the email directly (to my gmail account) wasn't gonna happen. So, looks like the default sendmail configuration wasn't going to work. A bit of googling told me that sendmail configuration was gonna be rough. So....I looked for an alternative. Enter ssmtp.
ssmtp is a simple MTA sendmail replacement that I found while looking at the FreeBSD handbook. It provides simple configuration for sending outgoing mail only - which is all I want to do. This gentoo how-to was also quite helpful (as many gentoo postings are).
I made copy of the sample ssmtp.conf file in /usr/local/etc/ssmtp/ and added the following:
root=
mailhub=isp_smtp_server
rewriteDomain=domain_emails_should_appear_from
hostname=computer_hostname
AuthUser=isp_email_login_id
AuthPass=isp_email_password
As I said, my ISP won't allow connections to port 25, so I have to use their smtp server, thus the need to provide authentication credentials.
Test with:
echo "testing mail service from my host" | mail root
And a few minutes later I see an email from my host.
No comments:
Post a Comment