I did the following in Ubuntu 12.04:
echo "some body" | mailx -s "some subject" [email protected] -- -f [email protected]
it generated a message like this:
To: [email protected]
Subject: some subject
From: [email protected]
Then I updated to Ubuntu 14.04 and now I get
To: [email protected], [email protected], [email protected]
Subject: some subject
From: [email protected]
So, the -f
is working no longer, and I get a broken email.
Why is this and how can I fix it?
I am using nullmailer.
I am using bsd-mailx.
$ ls -l $(which mailx)
lrwxrwxrwx 1 root root 23 Okt 23 23:12 /usr/bin/mailx -> /etc/alternatives/mailx
$ ls -l /etc/alternatives/mailx
lrwxrwxrwx 1 root root 18 Okt 23 23:12 /etc/alternatives/mailx -> /usr/bin/bsd-mailx
mailx
says that-f file
is to read mail from an alternate file... not to set the "From:" field. I really do not know if it's a recent change...--
should cancel processing of command line arguments and forward the following arguments to sendmail/nullmailer