How to configure sSMTP to send emails to more than one email address?
up vote
1
down vote
favorite
I use Ubuntu 16.04 with Bash, Nginx, and sSMTP
. On this environment I have 2 or more WordPress apps.
The basic configuration of sSMTP
allows it to route WordPress contact form emails from one app, into my personal email account (Gmail).
sudo cat /etc/ssmtp/ssmtp.conf
:
root=MY_GMAIL_ADDRESS@gmail.com
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES
AuthUser=MY_GMAIL_ADDRESS@gmail.com
AuthPass=___MY_GMAIL_PASSWORD___
rewriteDomain=gmail.com
hostname=alien
FromLineOverride=YES
My question
In case I have 2 or more apps, how should the sSMTP
conf be reconstructed when the Ubuntu user has 2 or more apps?
Update
In your answer, please also refer to the issue of security. Putting my personal Gmail password exposed in a config file seems like a security risk, not something I want to do. On the other hand, I don't want to create a second Gmail account, or I must and should shut up and do so?...
email postfix nginx wordpress gmail
add a comment |Â
up vote
1
down vote
favorite
I use Ubuntu 16.04 with Bash, Nginx, and sSMTP
. On this environment I have 2 or more WordPress apps.
The basic configuration of sSMTP
allows it to route WordPress contact form emails from one app, into my personal email account (Gmail).
sudo cat /etc/ssmtp/ssmtp.conf
:
root=MY_GMAIL_ADDRESS@gmail.com
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES
AuthUser=MY_GMAIL_ADDRESS@gmail.com
AuthPass=___MY_GMAIL_PASSWORD___
rewriteDomain=gmail.com
hostname=alien
FromLineOverride=YES
My question
In case I have 2 or more apps, how should the sSMTP
conf be reconstructed when the Ubuntu user has 2 or more apps?
Update
In your answer, please also refer to the issue of security. Putting my personal Gmail password exposed in a config file seems like a security risk, not something I want to do. On the other hand, I don't want to create a second Gmail account, or I must and should shut up and do so?...
email postfix nginx wordpress gmail
@SebastianStark I expect to be able to use a singlesSMTP
conf for 2 apps or more, instead just one. When I read the above configuration I say to myself "Theroot
,AuthUser
andAuthPass
all fit for 1 account, but what if I have multiple accounts to send mail to?".
â JohnDoea
Mar 14 at 20:16
Don't forget to change the hostname fromalien
to whateverecho $HOSTNAME
reveals. Expanding on Sebastian's point aboutroot
, if someone types thesudo
password wrong root will get an email. If acron
job fails root will get an email, etc.
â WinEunuuchs2Unix
Mar 14 at 22:41
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I use Ubuntu 16.04 with Bash, Nginx, and sSMTP
. On this environment I have 2 or more WordPress apps.
The basic configuration of sSMTP
allows it to route WordPress contact form emails from one app, into my personal email account (Gmail).
sudo cat /etc/ssmtp/ssmtp.conf
:
root=MY_GMAIL_ADDRESS@gmail.com
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES
AuthUser=MY_GMAIL_ADDRESS@gmail.com
AuthPass=___MY_GMAIL_PASSWORD___
rewriteDomain=gmail.com
hostname=alien
FromLineOverride=YES
My question
In case I have 2 or more apps, how should the sSMTP
conf be reconstructed when the Ubuntu user has 2 or more apps?
Update
In your answer, please also refer to the issue of security. Putting my personal Gmail password exposed in a config file seems like a security risk, not something I want to do. On the other hand, I don't want to create a second Gmail account, or I must and should shut up and do so?...
email postfix nginx wordpress gmail
I use Ubuntu 16.04 with Bash, Nginx, and sSMTP
. On this environment I have 2 or more WordPress apps.
The basic configuration of sSMTP
allows it to route WordPress contact form emails from one app, into my personal email account (Gmail).
sudo cat /etc/ssmtp/ssmtp.conf
:
root=MY_GMAIL_ADDRESS@gmail.com
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES
AuthUser=MY_GMAIL_ADDRESS@gmail.com
AuthPass=___MY_GMAIL_PASSWORD___
rewriteDomain=gmail.com
hostname=alien
FromLineOverride=YES
My question
In case I have 2 or more apps, how should the sSMTP
conf be reconstructed when the Ubuntu user has 2 or more apps?
Update
In your answer, please also refer to the issue of security. Putting my personal Gmail password exposed in a config file seems like a security risk, not something I want to do. On the other hand, I don't want to create a second Gmail account, or I must and should shut up and do so?...
email postfix nginx wordpress gmail
email postfix nginx wordpress gmail
edited Mar 15 at 6:03
asked Mar 14 at 17:04
JohnDoea
28391852
28391852
@SebastianStark I expect to be able to use a singlesSMTP
conf for 2 apps or more, instead just one. When I read the above configuration I say to myself "Theroot
,AuthUser
andAuthPass
all fit for 1 account, but what if I have multiple accounts to send mail to?".
â JohnDoea
Mar 14 at 20:16
Don't forget to change the hostname fromalien
to whateverecho $HOSTNAME
reveals. Expanding on Sebastian's point aboutroot
, if someone types thesudo
password wrong root will get an email. If acron
job fails root will get an email, etc.
â WinEunuuchs2Unix
Mar 14 at 22:41
add a comment |Â
@SebastianStark I expect to be able to use a singlesSMTP
conf for 2 apps or more, instead just one. When I read the above configuration I say to myself "Theroot
,AuthUser
andAuthPass
all fit for 1 account, but what if I have multiple accounts to send mail to?".
â JohnDoea
Mar 14 at 20:16
Don't forget to change the hostname fromalien
to whateverecho $HOSTNAME
reveals. Expanding on Sebastian's point aboutroot
, if someone types thesudo
password wrong root will get an email. If acron
job fails root will get an email, etc.
â WinEunuuchs2Unix
Mar 14 at 22:41
@SebastianStark I expect to be able to use a single
sSMTP
conf for 2 apps or more, instead just one. When I read the above configuration I say to myself "The root
, AuthUser
and AuthPass
all fit for 1 account, but what if I have multiple accounts to send mail to?".â JohnDoea
Mar 14 at 20:16
@SebastianStark I expect to be able to use a single
sSMTP
conf for 2 apps or more, instead just one. When I read the above configuration I say to myself "The root
, AuthUser
and AuthPass
all fit for 1 account, but what if I have multiple accounts to send mail to?".â JohnDoea
Mar 14 at 20:16
Don't forget to change the hostname from
alien
to whatever echo $HOSTNAME
reveals. Expanding on Sebastian's point about root
, if someone types the sudo
password wrong root will get an email. If a cron
job fails root will get an email, etc.â WinEunuuchs2Unix
Mar 14 at 22:41
Don't forget to change the hostname from
alien
to whatever echo $HOSTNAME
reveals. Expanding on Sebastian's point about root
, if someone types the sudo
password wrong root will get an email. If a cron
job fails root will get an email, etc.â WinEunuuchs2Unix
Mar 14 at 22:41
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Generally, there is no need to change your ssmtp
configuration. If you want to stick to your single gmail account you could maybe use the +
extension feature, where you can extend your gmail address by adding +something
to the part before @gmail.com
.
This way you get all the emails in your gmail account but you can tell them apart by the bit you added after the +. (more information here).
But you could also just choose to configure any other email address in wordpress.
Security
As for the security aspect of this: If you can avoid putting your very personal email account password in a system file in cleartext, especially on a system running wordpress (has quite a history of being hacked), it would be much better. You have several choices here (most of which would deviate too much from the original topic of this question):
Simply create another Gmail account that you use only for this purpose: authenticating an smtp session for
ssmtp
. You will still be able to send emails to your regular gmail account, but not have to put its valuable password in the config file.Setup and configure an smtp server on your machine.
Another option would be to check if your provider (the one where your wordpress server is located) offers an smtp server. Normally this does not even need smtp authentication to be set up. That would be the preferred option in my opinion.
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts theCC:
address.
â WinEunuuchs2Unix
Mar 15 at 1:30
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Generally, there is no need to change your ssmtp
configuration. If you want to stick to your single gmail account you could maybe use the +
extension feature, where you can extend your gmail address by adding +something
to the part before @gmail.com
.
This way you get all the emails in your gmail account but you can tell them apart by the bit you added after the +. (more information here).
But you could also just choose to configure any other email address in wordpress.
Security
As for the security aspect of this: If you can avoid putting your very personal email account password in a system file in cleartext, especially on a system running wordpress (has quite a history of being hacked), it would be much better. You have several choices here (most of which would deviate too much from the original topic of this question):
Simply create another Gmail account that you use only for this purpose: authenticating an smtp session for
ssmtp
. You will still be able to send emails to your regular gmail account, but not have to put its valuable password in the config file.Setup and configure an smtp server on your machine.
Another option would be to check if your provider (the one where your wordpress server is located) offers an smtp server. Normally this does not even need smtp authentication to be set up. That would be the preferred option in my opinion.
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts theCC:
address.
â WinEunuuchs2Unix
Mar 15 at 1:30
add a comment |Â
up vote
3
down vote
accepted
Generally, there is no need to change your ssmtp
configuration. If you want to stick to your single gmail account you could maybe use the +
extension feature, where you can extend your gmail address by adding +something
to the part before @gmail.com
.
This way you get all the emails in your gmail account but you can tell them apart by the bit you added after the +. (more information here).
But you could also just choose to configure any other email address in wordpress.
Security
As for the security aspect of this: If you can avoid putting your very personal email account password in a system file in cleartext, especially on a system running wordpress (has quite a history of being hacked), it would be much better. You have several choices here (most of which would deviate too much from the original topic of this question):
Simply create another Gmail account that you use only for this purpose: authenticating an smtp session for
ssmtp
. You will still be able to send emails to your regular gmail account, but not have to put its valuable password in the config file.Setup and configure an smtp server on your machine.
Another option would be to check if your provider (the one where your wordpress server is located) offers an smtp server. Normally this does not even need smtp authentication to be set up. That would be the preferred option in my opinion.
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts theCC:
address.
â WinEunuuchs2Unix
Mar 15 at 1:30
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Generally, there is no need to change your ssmtp
configuration. If you want to stick to your single gmail account you could maybe use the +
extension feature, where you can extend your gmail address by adding +something
to the part before @gmail.com
.
This way you get all the emails in your gmail account but you can tell them apart by the bit you added after the +. (more information here).
But you could also just choose to configure any other email address in wordpress.
Security
As for the security aspect of this: If you can avoid putting your very personal email account password in a system file in cleartext, especially on a system running wordpress (has quite a history of being hacked), it would be much better. You have several choices here (most of which would deviate too much from the original topic of this question):
Simply create another Gmail account that you use only for this purpose: authenticating an smtp session for
ssmtp
. You will still be able to send emails to your regular gmail account, but not have to put its valuable password in the config file.Setup and configure an smtp server on your machine.
Another option would be to check if your provider (the one where your wordpress server is located) offers an smtp server. Normally this does not even need smtp authentication to be set up. That would be the preferred option in my opinion.
Generally, there is no need to change your ssmtp
configuration. If you want to stick to your single gmail account you could maybe use the +
extension feature, where you can extend your gmail address by adding +something
to the part before @gmail.com
.
This way you get all the emails in your gmail account but you can tell them apart by the bit you added after the +. (more information here).
But you could also just choose to configure any other email address in wordpress.
Security
As for the security aspect of this: If you can avoid putting your very personal email account password in a system file in cleartext, especially on a system running wordpress (has quite a history of being hacked), it would be much better. You have several choices here (most of which would deviate too much from the original topic of this question):
Simply create another Gmail account that you use only for this purpose: authenticating an smtp session for
ssmtp
. You will still be able to send emails to your regular gmail account, but not have to put its valuable password in the config file.Setup and configure an smtp server on your machine.
Another option would be to check if your provider (the one where your wordpress server is located) offers an smtp server. Normally this does not even need smtp authentication to be set up. That would be the preferred option in my opinion.
edited Aug 27 at 8:13
answered Mar 14 at 23:35
Sebastian Stark
4,723938
4,723938
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts theCC:
address.
â WinEunuuchs2Unix
Mar 15 at 1:30
add a comment |Â
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts theCC:
address.
â WinEunuuchs2Unix
Mar 15 at 1:30
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts the
CC:
address.â WinEunuuchs2Unix
Mar 15 at 1:30
Typically I use Carbon Copy (yes they had those in Grade 2!) aka CC: to send to more than one address. I've always been weak on networking but I think ssmtp can be considered the topology or network layer and wordpress (or whatever) can be considered the application layer that inserts the
CC:
address.â WinEunuuchs2Unix
Mar 15 at 1:30
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1014937%2fhow-to-configure-ssmtp-to-send-emails-to-more-than-one-email-address%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
@SebastianStark I expect to be able to use a single
sSMTP
conf for 2 apps or more, instead just one. When I read the above configuration I say to myself "Theroot
,AuthUser
andAuthPass
all fit for 1 account, but what if I have multiple accounts to send mail to?".â JohnDoea
Mar 14 at 20:16
Don't forget to change the hostname from
alien
to whateverecho $HOSTNAME
reveals. Expanding on Sebastian's point aboutroot
, if someone types thesudo
password wrong root will get an email. If acron
job fails root will get an email, etc.â WinEunuuchs2Unix
Mar 14 at 22:41