0
I'm setting up postfix using ubuntu, I'm currently following along with this guide. While doing so I'm at the part of creating my Maildir
by executing echo 'init' | mail -s 'init' -Snorecord <USERNAME>
. While executing this command, I get the following error:
serveradmin@tmagic:~$ echo 'init' | mail -s 'init' -Snorecord serveradmin
mail: invalid option -- 's'
serveradmin@magic:~$
Looking a little deeper into this I tried to send an email just to see what would happen and received the following error:
serveradmin@magic:~$ mail -v user@example.com
subject: test
test
.
ignoring system configuration file /etc/msmtprc: No such file or directory
ignoring user configuration file /home/serveradmin/.msmtprc: No such file or directory
falling back to default account
mail: account default not found: no configuration file available
serveradmin@magic:~$
What is causing this issue and how can I fix it? I'm running an Ubuntu 16.04
server.
You default MTA set to
msmtp
instead ofpostfix
– Alex – 2018-07-20T16:04:01.893@Alex awh, you're correct, how can I switch it? – CertifcateJunky – 2018-07-20T16:12:21.340
Simplest way is to
apt-get purge msmtp-mta
then reinstallpostfix
or you can edit symlink/usr/sbin/sendmail
so it will point topostfix
instead ofmsmtp-mta
– Alex – 2018-07-20T16:34:40.133