When I send email using /usr/bin/mail on the command line (Ubuntu 13.04 64-bit), it does not pay attention to any aliases in my .mailrc file. Does anybody know how to fix this?
To reproduce the problem:
Put an alias in $HOME/.mailrc
alias foo me@whatever.com
Try to mail the alias:
$ echo hello | /usr/bin/mail -s testing foo
Read /var/log/mail.log and see "foo" bounce as an unknown user:
Sep 7 11:15:39 mycomputer postfix/local[9707]: EE038F6028B: to=<foo@mycomputer.mydomain>, relay=local, delay=0.1, delays=0.07/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "foo")
However, my other mail programs, such as Emacs VM, respect the aliases in $HOME/.mailrc.
This didn't used to happen in Ubuntu 10.04 LTS, my previous system.
On further investigation... I ran:
$ mail -f mymailbox
? alias foo
foo me@whatever.com
So /usr/bin/mail is indeed processing $HOME/.mailrc, but somehow, even though "mail" knows the alias "foo", the result is that postfix sees an email message to "foo@mycomputer.mydomain" instead of the alias expansion. I don't know who's misconfigured: mail (GNU mailutils) or postfix.