I'm having some trouble setting up ssmtp. I want to use logrotate to compress and email my server's logs to my gmail account. I can echo text directly to ssmtp and have it send the message ok, but when I try to use /usr/bin/mail, I get logs in my maillog trying to use sendmail, which is set to none in rc.conf. How do I set this up so that all mail sends out through ssmtp?
/usr/local/etc/ssmtp/ssmtp.conf # # /etc/ssmtp.conf -- a config file for sSMTP sendmail. # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. [EMAIL PROTECTED] # The place where the mail goes. The actual machine name is required # no MX records are consulted. Commonly mailhosts are named mail.domain.com # The example will fit if you are in domain.com and your mailhub is so named. mailhub=mail.myisp.net # Example for SMTP port number 2525 # mailhub=mail.your.domain:2525 # Example for SMTP port number 25 (Standard/RFC) # mailhub=mail.your.domain # Example for SSL encrypted connection # mailhub=mail.your.domain:465 # Where will the mail seem to come from? rewriteDomain=myisp.net # The full hostname hostname=behemoth.mydomain.com # Set this to never rewrite the "From:" line (unless not given) and to # use that address in the "from line" of the envelope. #FromLineOverride=YES # Use SSL/TLS to send secure messages to server. #UseTLS=YES # Use SSL/TLS certificate to authenticate against smtp host. #UseTLSCert=YES # Use this RSA certificate. #TLSCert=/usr/local/etc/ssmtp/ssmtp.pem Here's an example: #mail -s test message [EMAIL PROTECTED] < Some_File #tail /var/log/maillog Mar 29 10:58:47 behemoth sendmail: k2TFwkuV041971: from=root, size=3948, class=0, nrcpts=2, msgid=< [EMAIL PROTECTED]>, [EMAIL PROTECTED] Mar 29 10:58:47 behemoth sendmail: k2TFwkuV041971: to=message, [EMAIL PROTECTED], ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=63948, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Obviously I don't get anything coming through with this example but #echo test | ssmtp [EMAIL PROTECTED] #tail /var/log/maillog Mar 29 11:03:24 behemoth sSMTP: Sent mail for [EMAIL PROTECTED](221 ibm58aec.myisp.net ESMTP server closing connection) I do recieve this message I'd be happy to provide any other information to anyone who can help me set this up. _______________________________________________ firstname.lastname@example.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"