pfr
although the email that is sent does not include any text body, rather is send an attachement which I cannot open.
Edit: 2021/06: unset MAILRC
and set an explicit NAILRC
in the hmail
script.
That's odd--you do have the other, standard, directives in your .mailrc
file, don't you?, If you don't, do this:
$ install -m 600 /usr/pkg/etc/nail.rc ~/.nailrc
Append your account
directives to the ~/.nailrc
file.
Remove the old ~/.mailrc
file.
Add this to your shell login script(s) (~/.profile
or ~/.bash_profile
, ...)
export NAILRC=$HOME/.nailrc
These will make Heirloom mailx independent of the standard mail.
You can also execute these commands as root, to save some typing:
# install -d -m 755 /usr/local/bin
# cat > /usr/local/bin/hmail <<\EoF
#!/bin/sh
unset MAILRC
export NAILRC=$HOME/.nailrc
exec /usr/pkg/bin/mailx ${1:+"$@"}
EoF
# chmod 755 /usr/local/bin/hmail
# chown root:wheel /usr/local/bin/hmail
Assuming /usr/local/bin
is in your PATH
(it should already be), you can run hmail -A account user@xyz.com
to send mail.
As, I mentioned before, I use Alpine, but, all the test mails I sent/received using Heirloom mailx were fine. However, I wouldn't be surprised if more configuration of .nailrc
were needed (for remote folders and saving and stuff). The man page is pretty comprehensive. You should be able to figure most things out using it. Otherwise, ask here.