Hello, first post here. I was completely new to BSD having been a Windows/GUI guy since I was young. I built a box to replace an aging Windows Home Server V1. So far, it's been a test but I'm super happy with the "it just works" nature of FreeBSD.
Issue
in /usr/local/etc/ssmtp/ssmtp.conf
in /usr/local/etc/ssmtp/revaliases
in /etc/rc.conf
in /etc/mail/mailer.conf
in /var/logs/maillog
Output from working and not working mail calls look the same. As an example
in /etc/aliases
modified the following lines
I'll send additional details as you might need. I'm stuck and can't figure out where to go from here. Thanks for any help in advance.
Issue
I want to get system email, periodic updates (daily/weekly/monthly) to an external email. I installed ssmtp and followed several threads/blog posts/man pages to get that done. This was a step in the path towards getting periodics and SMART data emailed each day, and now I'm stuck.
- At this point:
mail -s "test email" myemail@gmail.com
works and the email shows up within a few seconds. mail -s "test email" root
does not work and no email shows up.
mail -s "test email" josh
does not work (josh is my low level user)
periodic daily
takes some time, but never is received in my email inbox either.- I can send out email, but email to root doesn't work (from what I can tell).
- http://btt.red/b/2/0/freebsd-use-gmail-for-outgoing-mail
- https://wiki.freebsd.org/SecureSSMTP
- Associated man pages
- Associated forums.freebsd.org threads I could find
in /usr/local/etc/ssmtp/ssmtp.conf
Code:
#per btt.red freebsd gmail for outgoing mail
root=josh@southbendsd.com
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
UseTLS=YES
UseSTARTTLS=YES
AuthUser=sending_email@gmail.com #email I'm sending email from
AuthPass=passwd_here #passwd removed for forum
FromLineOverride=YES
AuthMethod=LOGIN
Code:
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:sending_email@gmail.com:smtp.gmail.com:587
josh:sending_email@gmail.com:smtp.gmail.com:587
Code:
#configure email to gmail
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
Code:
# $FreeBSD: releng/10.1/etc/mail/mailer.conf 93858 2002-04-05 04:25:14Z gshapiro $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
#sendmail /usr/libexec/sendmail/sendmail
#send-mail /usr/libexec/sendmail/sendmail
#mailq /usr/libexec/sendmail/sendmail
#newaliases /usr/libexec/sendmail/sendmail
#hoststat /usr/libexec/sendmail/sendmail
#purgestat /usr/libexec/sendmail/sendmail
#updated settings from btt.red for ssmtpd external email
sendmail /usr/local/sbin/ssmtp
send-mail /usr/local/sbin/ssmtp
mailq /usr/libexec/sendmail/sendmail
newaliases /usr/libexec/sendmail/sendmail
hoststat /usr/libexec/sendmail/sendmail
purgestat /usr/libexec/sendmail/sendmail
Output from working and not working mail calls look the same. As an example
Code:
Mar 15 10:30:56 bsdserver sSMTP[3501]: Creating SSL connection to host
Mar 15 10:30:57 bsdserver sSMTP[3501]: SSL connection using ECDHE-RSA-AES128-GCM-SHA256
Mar 15 10:31:01 bsdserver sSMTP[3501]: Sent mail for sending_email@gmail.com (221 2.0.0 closing connection g9sm5130739igg.1 - gsmtp) uid=0 username=root outbytes=401
modified the following lines
Code:
# root: me@my.domain
#added below during ssmtp configuration to get external mail
root: receive_email@gmail.com
Last edited by a moderator: