Msmtp does not understand `/etc/aliases`piped program in sendmail's /etc/aliasesEmail Sent via...
What is the standard representation of a stop which could be either ejective or aspirated?
How can I disable a reserved profile?
Is it better to have a 10 year gap or a bad reference?
What kind of curve (or model) should I fit to my percentage data?
Why do we need an estimator to be consistent?
Facebook video calling problem in Safari
Importance of moon phases for Apollo missions
Monday's Blocking Donimoes Problem
Strange LED behavior
Can a creature sustain itself by eating its own severed body parts?
What kind of vegetable has pink and white concentric rings?
Trivial non-dark twist in dark fantasy
What should I watch before playing Alien: Isolation?
Stellen - Putting, or putting away?
How should I handle a question regarding my regrets during an interview?
Would using carbon dioxide as fuel work to reduce the greenhouse effect?
What is a "staved" town, like in "Staverton"?
is FIND WORDS in P?
Which dice game has a board with 9x9 squares that has different colors on the diagonals and midway on some edges?
What is the metal bit in the front of this propeller spinner?
Pass USB 3.0 connection through D-SUB connector
Is there an English word to describe when a sound "protrudes"?
Oriented vector bundle with odd-dimensional fibers
Adding gears to my grandson's 12" bike
Msmtp does not understand `/etc/aliases`
piped program in sendmail's /etc/aliasesEmail Sent via root@domain.com despite modifying /etc/aliasesmsmtp-mta: Add $HOSTNAME to every mailunable to view postfix email from centos 7 command line, why not?Sendmail stopped sending mails, “did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA”How to configure a two-factor-enabled Gmail account to work as sendmail on a Debian Jessie?Send email with mailx/msmtp only works for root userroot sending several emails a minute — can't find out why and who's doing itMultiple smtp accounts with mutt and msmtpSendmail “Message accepted for delivery” but doesn't make it “Deferred: Connection timed out”
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have configured my Debian server to use msmtp
for sending mails. Current use case are for example sending a daily report from logwatch
to my isp email.
echo "$body" | mutt -s "$topic" -- "myisp@email.com"
I have configured msmtp
by means of a global msmtprc
file located at /etc/msmtprc
. Contents shown below.
The next thing I want to configure is that my email for my root account (e.g., output from crontabs) is sent to my isp email as well.
I have googled around and found, for example on the Arch wiki, that I should just configure my aliases. Which I have done so at the bottom of the msmtp configuration file.
However, after running newaliases
, and trying to execute
echo test | mail -s "test message" root
I get the error
send-mail: /etc/aliases: line 2: invalid address 'postmaster'
Can't send mail: sendmail process failed with error code 78
I am unsure how I can fix this. The alias shown below is what was already present. I only added the gmail address.
I think I could just put a new aliases file but that might break other services that rely on this. I.e., I don't know what the proper way to fix this is.
/etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: christphe, christophe.detroyer@gmail.com
/etc/msmtprc
# ------------------------------------------------------------------------------
# msmtp System Wide Configuration file
# ------------------------------------------------------------------------------
# A system wide configuration is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
# ------------------------------------------------------------------------------
# Accounts
# ------------------------------------------------------------------------------
account isp
host mail.isp.net
port 587
from admin@isp.com
auth login
user admin@isp.com
password foobar
syslog LOG_MAIL
logfile /var/log/msmtp.log
# ------------------------------------------------------------------------------
# Configurations
# ------------------------------------------------------------------------------
# Construct envelope-from addresses of the form "user@oursite.example".
#auto_from on
#maildomain fermmy.server
# Use TLS.
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER.
# Must be done within "account" sub-section above
#syslog LOG_MAIL
# Set a default account
account default : isp
aliases /etc/aliases
# ------------------------------------------------------------------------------#
sendmail msmtp
add a comment |
I have configured my Debian server to use msmtp
for sending mails. Current use case are for example sending a daily report from logwatch
to my isp email.
echo "$body" | mutt -s "$topic" -- "myisp@email.com"
I have configured msmtp
by means of a global msmtprc
file located at /etc/msmtprc
. Contents shown below.
The next thing I want to configure is that my email for my root account (e.g., output from crontabs) is sent to my isp email as well.
I have googled around and found, for example on the Arch wiki, that I should just configure my aliases. Which I have done so at the bottom of the msmtp configuration file.
However, after running newaliases
, and trying to execute
echo test | mail -s "test message" root
I get the error
send-mail: /etc/aliases: line 2: invalid address 'postmaster'
Can't send mail: sendmail process failed with error code 78
I am unsure how I can fix this. The alias shown below is what was already present. I only added the gmail address.
I think I could just put a new aliases file but that might break other services that rely on this. I.e., I don't know what the proper way to fix this is.
/etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: christphe, christophe.detroyer@gmail.com
/etc/msmtprc
# ------------------------------------------------------------------------------
# msmtp System Wide Configuration file
# ------------------------------------------------------------------------------
# A system wide configuration is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
# ------------------------------------------------------------------------------
# Accounts
# ------------------------------------------------------------------------------
account isp
host mail.isp.net
port 587
from admin@isp.com
auth login
user admin@isp.com
password foobar
syslog LOG_MAIL
logfile /var/log/msmtp.log
# ------------------------------------------------------------------------------
# Configurations
# ------------------------------------------------------------------------------
# Construct envelope-from addresses of the form "user@oursite.example".
#auto_from on
#maildomain fermmy.server
# Use TLS.
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER.
# Must be done within "account" sub-section above
#syslog LOG_MAIL
# Set a default account
account default : isp
aliases /etc/aliases
# ------------------------------------------------------------------------------#
sendmail msmtp
msmtp only accepts aliases of the formroot: christophe.detroyer@gmail.com
so I should create a/etc/aliases.msmtp
with just that line for the moment and change your config. Ismail
a link tomsmtp
? Do you have postfix or sendmail installed too?
– meuh
Oct 24 '16 at 16:48
add a comment |
I have configured my Debian server to use msmtp
for sending mails. Current use case are for example sending a daily report from logwatch
to my isp email.
echo "$body" | mutt -s "$topic" -- "myisp@email.com"
I have configured msmtp
by means of a global msmtprc
file located at /etc/msmtprc
. Contents shown below.
The next thing I want to configure is that my email for my root account (e.g., output from crontabs) is sent to my isp email as well.
I have googled around and found, for example on the Arch wiki, that I should just configure my aliases. Which I have done so at the bottom of the msmtp configuration file.
However, after running newaliases
, and trying to execute
echo test | mail -s "test message" root
I get the error
send-mail: /etc/aliases: line 2: invalid address 'postmaster'
Can't send mail: sendmail process failed with error code 78
I am unsure how I can fix this. The alias shown below is what was already present. I only added the gmail address.
I think I could just put a new aliases file but that might break other services that rely on this. I.e., I don't know what the proper way to fix this is.
/etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: christphe, christophe.detroyer@gmail.com
/etc/msmtprc
# ------------------------------------------------------------------------------
# msmtp System Wide Configuration file
# ------------------------------------------------------------------------------
# A system wide configuration is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
# ------------------------------------------------------------------------------
# Accounts
# ------------------------------------------------------------------------------
account isp
host mail.isp.net
port 587
from admin@isp.com
auth login
user admin@isp.com
password foobar
syslog LOG_MAIL
logfile /var/log/msmtp.log
# ------------------------------------------------------------------------------
# Configurations
# ------------------------------------------------------------------------------
# Construct envelope-from addresses of the form "user@oursite.example".
#auto_from on
#maildomain fermmy.server
# Use TLS.
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER.
# Must be done within "account" sub-section above
#syslog LOG_MAIL
# Set a default account
account default : isp
aliases /etc/aliases
# ------------------------------------------------------------------------------#
sendmail msmtp
I have configured my Debian server to use msmtp
for sending mails. Current use case are for example sending a daily report from logwatch
to my isp email.
echo "$body" | mutt -s "$topic" -- "myisp@email.com"
I have configured msmtp
by means of a global msmtprc
file located at /etc/msmtprc
. Contents shown below.
The next thing I want to configure is that my email for my root account (e.g., output from crontabs) is sent to my isp email as well.
I have googled around and found, for example on the Arch wiki, that I should just configure my aliases. Which I have done so at the bottom of the msmtp configuration file.
However, after running newaliases
, and trying to execute
echo test | mail -s "test message" root
I get the error
send-mail: /etc/aliases: line 2: invalid address 'postmaster'
Can't send mail: sendmail process failed with error code 78
I am unsure how I can fix this. The alias shown below is what was already present. I only added the gmail address.
I think I could just put a new aliases file but that might break other services that rely on this. I.e., I don't know what the proper way to fix this is.
/etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: christphe, christophe.detroyer@gmail.com
/etc/msmtprc
# ------------------------------------------------------------------------------
# msmtp System Wide Configuration file
# ------------------------------------------------------------------------------
# A system wide configuration is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
# ------------------------------------------------------------------------------
# Accounts
# ------------------------------------------------------------------------------
account isp
host mail.isp.net
port 587
from admin@isp.com
auth login
user admin@isp.com
password foobar
syslog LOG_MAIL
logfile /var/log/msmtp.log
# ------------------------------------------------------------------------------
# Configurations
# ------------------------------------------------------------------------------
# Construct envelope-from addresses of the form "user@oursite.example".
#auto_from on
#maildomain fermmy.server
# Use TLS.
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER.
# Must be done within "account" sub-section above
#syslog LOG_MAIL
# Set a default account
account default : isp
aliases /etc/aliases
# ------------------------------------------------------------------------------#
sendmail msmtp
sendmail msmtp
asked Oct 24 '16 at 8:07
Christophe De TroyerChristophe De Troyer
1321 gold badge1 silver badge11 bronze badges
1321 gold badge1 silver badge11 bronze badges
msmtp only accepts aliases of the formroot: christophe.detroyer@gmail.com
so I should create a/etc/aliases.msmtp
with just that line for the moment and change your config. Ismail
a link tomsmtp
? Do you have postfix or sendmail installed too?
– meuh
Oct 24 '16 at 16:48
add a comment |
msmtp only accepts aliases of the formroot: christophe.detroyer@gmail.com
so I should create a/etc/aliases.msmtp
with just that line for the moment and change your config. Ismail
a link tomsmtp
? Do you have postfix or sendmail installed too?
– meuh
Oct 24 '16 at 16:48
msmtp only accepts aliases of the form
root: christophe.detroyer@gmail.com
so I should create a /etc/aliases.msmtp
with just that line for the moment and change your config. Is mail
a link to msmtp
? Do you have postfix or sendmail installed too?– meuh
Oct 24 '16 at 16:48
msmtp only accepts aliases of the form
root: christophe.detroyer@gmail.com
so I should create a /etc/aliases.msmtp
with just that line for the moment and change your config. Is mail
a link to msmtp
? Do you have postfix or sendmail installed too?– meuh
Oct 24 '16 at 16:48
add a comment |
2 Answers
2
active
oldest
votes
Found 2 things today on this when trying msmtp
for the first time.
/etc/aliases
default ofpostmaster: root
gave things heartburn. Only revealed bymsmtp -v
- solved by changing line to
postmaster: root@somewhere.com
- solved by changing line to
put
aliases /etc/aliases
in/etc/msmtprc
or~/.msmtprc
add a comment |
So, I had the exact same issue when I migrated from ssmtp to msmtp. The issue is caused by the is_address()
function in aliases.c. Basically, if the target of the alias doesn't contain '@'
, msmtp thinks it's invalid and dies. You can work around this by just appending @ to all the aliases that redirect to root.
In your example, you would modify /etc/aliases
as follows:
# /etc/aliases
mailer-daemon: postmaster@
postmaster: root@
nobody: root@
hostmaster: root@
usenet: root@
news: root@
webmaster: root@
www: root@
ftp: root@
abuse: root@
noc: root@
security: root@
root: christphe, christophe.detroyer@gmail.com
I plan to log a bug/issue against msmtp to get this behavior changed so it just works and will update this answer then.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f318484%2fmsmtp-does-not-understand-etc-aliases%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Found 2 things today on this when trying msmtp
for the first time.
/etc/aliases
default ofpostmaster: root
gave things heartburn. Only revealed bymsmtp -v
- solved by changing line to
postmaster: root@somewhere.com
- solved by changing line to
put
aliases /etc/aliases
in/etc/msmtprc
or~/.msmtprc
add a comment |
Found 2 things today on this when trying msmtp
for the first time.
/etc/aliases
default ofpostmaster: root
gave things heartburn. Only revealed bymsmtp -v
- solved by changing line to
postmaster: root@somewhere.com
- solved by changing line to
put
aliases /etc/aliases
in/etc/msmtprc
or~/.msmtprc
add a comment |
Found 2 things today on this when trying msmtp
for the first time.
/etc/aliases
default ofpostmaster: root
gave things heartburn. Only revealed bymsmtp -v
- solved by changing line to
postmaster: root@somewhere.com
- solved by changing line to
put
aliases /etc/aliases
in/etc/msmtprc
or~/.msmtprc
Found 2 things today on this when trying msmtp
for the first time.
/etc/aliases
default ofpostmaster: root
gave things heartburn. Only revealed bymsmtp -v
- solved by changing line to
postmaster: root@somewhere.com
- solved by changing line to
put
aliases /etc/aliases
in/etc/msmtprc
or~/.msmtprc
edited Mar 16 '18 at 16:03
user1810087
1034 bronze badges
1034 bronze badges
answered Mar 30 '17 at 14:50
BillBill
312 bronze badges
312 bronze badges
add a comment |
add a comment |
So, I had the exact same issue when I migrated from ssmtp to msmtp. The issue is caused by the is_address()
function in aliases.c. Basically, if the target of the alias doesn't contain '@'
, msmtp thinks it's invalid and dies. You can work around this by just appending @ to all the aliases that redirect to root.
In your example, you would modify /etc/aliases
as follows:
# /etc/aliases
mailer-daemon: postmaster@
postmaster: root@
nobody: root@
hostmaster: root@
usenet: root@
news: root@
webmaster: root@
www: root@
ftp: root@
abuse: root@
noc: root@
security: root@
root: christphe, christophe.detroyer@gmail.com
I plan to log a bug/issue against msmtp to get this behavior changed so it just works and will update this answer then.
add a comment |
So, I had the exact same issue when I migrated from ssmtp to msmtp. The issue is caused by the is_address()
function in aliases.c. Basically, if the target of the alias doesn't contain '@'
, msmtp thinks it's invalid and dies. You can work around this by just appending @ to all the aliases that redirect to root.
In your example, you would modify /etc/aliases
as follows:
# /etc/aliases
mailer-daemon: postmaster@
postmaster: root@
nobody: root@
hostmaster: root@
usenet: root@
news: root@
webmaster: root@
www: root@
ftp: root@
abuse: root@
noc: root@
security: root@
root: christphe, christophe.detroyer@gmail.com
I plan to log a bug/issue against msmtp to get this behavior changed so it just works and will update this answer then.
add a comment |
So, I had the exact same issue when I migrated from ssmtp to msmtp. The issue is caused by the is_address()
function in aliases.c. Basically, if the target of the alias doesn't contain '@'
, msmtp thinks it's invalid and dies. You can work around this by just appending @ to all the aliases that redirect to root.
In your example, you would modify /etc/aliases
as follows:
# /etc/aliases
mailer-daemon: postmaster@
postmaster: root@
nobody: root@
hostmaster: root@
usenet: root@
news: root@
webmaster: root@
www: root@
ftp: root@
abuse: root@
noc: root@
security: root@
root: christphe, christophe.detroyer@gmail.com
I plan to log a bug/issue against msmtp to get this behavior changed so it just works and will update this answer then.
So, I had the exact same issue when I migrated from ssmtp to msmtp. The issue is caused by the is_address()
function in aliases.c. Basically, if the target of the alias doesn't contain '@'
, msmtp thinks it's invalid and dies. You can work around this by just appending @ to all the aliases that redirect to root.
In your example, you would modify /etc/aliases
as follows:
# /etc/aliases
mailer-daemon: postmaster@
postmaster: root@
nobody: root@
hostmaster: root@
usenet: root@
news: root@
webmaster: root@
www: root@
ftp: root@
abuse: root@
noc: root@
security: root@
root: christphe, christophe.detroyer@gmail.com
I plan to log a bug/issue against msmtp to get this behavior changed so it just works and will update this answer then.
answered 56 mins ago
JoeNahmiasJoeNahmias
384 bronze badges
384 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f318484%2fmsmtp-does-not-understand-etc-aliases%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
msmtp only accepts aliases of the form
root: christophe.detroyer@gmail.com
so I should create a/etc/aliases.msmtp
with just that line for the moment and change your config. Ismail
a link tomsmtp
? Do you have postfix or sendmail installed too?– meuh
Oct 24 '16 at 16:48