Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] ssmtp root= doesnt work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Thu Nov 26, 2015 8:53 pm    Post subject: [Solved] ssmtp root= doesnt work Reply with quote

Hello,

I have setup the root= alias in /etc/ssmtp/ssmtp.conf but it is getting ignored by ssmtp.
My config file has root=myroot@gmail.conf defined:
Code:

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < MinUserId
# Make this empty to disable rewriting.
Debug=YES
root=myroot@gmail.com


# All mail delivered to userid >= MinUserId goes to user, not root.
MinUserId=1000

mailhub=smtp.gmail.com:587


# Where will the mail seem to come from?
#rewriteDomain=

# hostname=_HOSTNAME_

#FromLineOverride=YES

UseSTARTTLS=YES
UseTLS=YES


#TLSCert=/etc/ssl/certs/ssmtp.pem

AuthUser=someuser@gmail.com
AuthPass=somepass



I send an email to root as
Code:

echo "Test" | mail -s "time 2:15" root


But in the debug log the user myroot@gmail.com doesnt appear in the RCPT, instead i get root@tvbox.at.myplace??

Code:

Nov 27 02:20:32 tvbox sSMTP[17090]: Set Root="myroot@gmail.com"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set MinUserId="1000"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set MailHub="smtp.gmail.com"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set RemotePort="587"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set UseSTARTTLS="True"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set UseTLS="True"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set AuthUser="someuser@gmail.com"
Nov 27 02:20:32 tvbox sSMTP[17090]: Set AuthPass="somepass"
Nov 27 02:20:32 tvbox sSMTP[17090]: Creating SSL connection to host
Nov 27 02:20:32 tvbox sSMTP[17090]: 220 smtp.gmail.com ESMTP q129sm29322849pfq.19 - gsmtp
Nov 27 02:20:32 tvbox sSMTP[17090]: EHLO tvbox
Nov 27 02:20:33 tvbox sSMTP[17090]: 250 SMTPUTF8
Nov 27 02:20:33 tvbox sSMTP[17090]: STARTTLS
Nov 27 02:20:33 tvbox sSMTP[17090]: 220 2.0.0 Ready to start TLS
Nov 27 02:20:33 tvbox sSMTP[17090]: SSL connection using RSA_AES_128_CBC_SHA1
Nov 27 02:20:33 tvbox sSMTP[17090]: EHLO tvbox
Nov 27 02:20:34 tvbox sSMTP[17090]: 250 SMTPUTF8
Nov 27 02:20:34 tvbox sSMTP[17090]: AUTH LOGIN
Nov 27 02:20:34 tvbox sSMTP[17090]: 334 VXNlcmhfghfghdU6
Nov 27 02:20:34 tvbox sSMTP[17090]: bGtvcmNzMS5jbhgfgdsdsrftYWlsLmNvbQ==
Nov 27 02:20:34 tvbox sSMTP[17090]: 334 UGFzcfghghmQ6
Nov 27 02:20:34 tvbox sSMTP[17090]: ZGREQ1lCY3QwQXNRdHVY
Nov 27 02:20:35 tvbox sSMTP[17090]: 235 2.7.0 Accepted
Nov 27 02:20:35 tvbox sSMTP[17090]: MAIL FROM:<root@tvbox>
Nov 27 02:20:35 tvbox sSMTP[17090]: 250 2.1.0 OK q129sm29322849pfq.19 - gsmtp
Nov 27 02:20:35 tvbox sSMTP[17090]: RCPT TO:<root@tvbox.at.myplace>
Nov 27 02:20:35 tvbox sSMTP[17090]: 250 2.1.5 OK q129sm29322849pfq.19 - gsmtp
Nov 27 02:20:35 tvbox sSMTP[17090]: DATA
Nov 27 02:20:36 tvbox sSMTP[17090]: 354  Go ahead q129sm29322849pfq.19 - gsmtp
Nov 27 02:20:36 tvbox sSMTP[17090]: Received: by tvbox (sSMTP sendmail emulation); Fri, 27 Nov 2015 02:20:32 +0530
Nov 27 02:20:36 tvbox sSMTP[17090]: From: "root" <root@tvbox>
Nov 27 02:20:36 tvbox sSMTP[17090]: Date: Fri, 27 Nov 2015 02:20:32 +0530
Nov 27 02:20:36 tvbox sSMTP[17090]: Subject: time 2:15
Nov 27 02:20:36 tvbox sSMTP[17090]: To: <root@tvbox.at.myplace>
Nov 27 02:20:36 tvbox sSMTP[17090]: X-Mailer: mail (GNU Mailutils 2.99.98)
Nov 27 02:20:36 tvbox sSMTP[17090]:
Nov 27 02:20:36 tvbox sSMTP[17090]: Test
Nov 27 02:20:37 tvbox sSMTP[17090]: .
Nov 27 02:20:37 tvbox sSMTP[17090]: 250 2.0.0 OK 1448571037 q129sm29322849pfq.19 - gsmtp
Nov 27 02:20:37 tvbox sSMTP[17090]: QUIT
Nov 27 02:20:38 tvbox sSMTP[17090]: 221 2.0.0 closing connection q129sm29322849pfq.19 - gsmtp
Nov 27 02:20:38 tvbox sSMTP[17090]: Sent mail for root@tvbox (221 2.0.0 closing connection q129sm29322849pfq.19 - gsmtp) uid=0 username=root outbytes=395


Last edited by trumee on Sat Nov 28, 2015 6:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 822

PostPosted: Fri Nov 27, 2015 11:08 am    Post subject: Reply with quote

root in ssmtp.conf is the alias for local root; so the email-acct that should receive root's email.
you also have to setup revaliases which handles the external accounts.
in my case the line in /etc/ssmtp/ssmtp.conf looks like this:
Code:
root=my.personal.account@XXX.com

and /etc/ssmtp/reavaliases like this:
Code:
root:ABC@googlemail.com:smtp.gmail.com:587

GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Fri Nov 27, 2015 11:45 am    Post subject: Reply with quote

DawgG wrote:
root in ssmtp.conf is the alias for local root; so the email-acct that should receive root's email.
you also have to setup revaliases which handles the external accounts.
in my case the line in /etc/ssmtp/ssmtp.conf looks like this:
Code:
root=my.personal.account@XXX.com

and /etc/ssmtp/reavaliases like this:
Code:
root:ABC@googlemail.com:smtp.gmail.com:587

GOOD LUCK!


The revaliases only changes the "From" header. So in your case the email would come from ABC@googlemail.com. What i want is to change the "RCPT TO" header.
Back to top
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Sat Nov 28, 2015 6:12 pm    Post subject: Reply with quote

Replacing mailutils with mail-client/mailx solves this issues as described here
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum