You are not logged in.
I can not get the mail command working with msmtp.
I followed the instructions from the msmtp wiki page https://wiki.archlinux.org/index.php/Ms … il_command
I tried both installing msmtp-mta and putting
set sendmail=/usr/bin/msmtpinto .mail.rc
I do have a configured .msmtprc in my $HOME folder which I use successfully in other contexts
I do not know where to look else.
Last edited by cutuchiqueno (2016-04-12 09:57:43)
Offline
Could you give some more detail about "does not work" means? Does it give an error message? Does it complete successfully but fail to actually send the email?
Offline
Apologies for being so unspecific and thx for answering.
I tried the command:
echo "Dies ist eine Testmail" | mail -A akademisch RECIPIENT@DOMAIN.deThe output is
Account 'akademisch' does not existI have 3 accounts but using each one of them was not successful.
In the meantime I found out that it works if I turn one account into a *default* account and omitt the *-A* flag. However, this is not what I would like to do since I use different accounts for different purposes.
Offline
Ah, "mail" is part of the s-nail package, and although you have correctly configured it to use mstmp, it will not pass the command line arguments with it. In your case, this means that s-nail is looking in its own configuration for an account called "akademisch" and is correctly announcing that it can't find it. Try instead:
echo "Dies ist eine Testmail" | mstmp -a akademisch RECIPIENT@DOMAIN.deOffline
thanks for the hint. So if I want to have the comfort which is provided by mail I would set up all my accounts in .mailrc and delete the set sendmail option. I just now figured out that mail in Arch is capable to transfer mail on its own which I was not aware of before.
Offline
Yep that would work as you expected. If you want to use the "mail" command but still want to use the msmtp settings, you could set "mail" to be an alias of "msmtp" (or even "msmtp -a" if you are always going to pass in an account) in your shell?
Offline
true! Though with comfort I mean that mail provides flags for passing a subject and so forth which msmtp does not. In the latter case I would have to pass together with the email string which less convenient.
Anyhow, thx a lot
Offline