Oft ist nach einer Installation unter Debian, bsd-mailx als Standart mailx installiert. Mit diesen Programm kann man aber die Option -A <Attachment>
nicht nutzen. Prüfen kann man dies, indem man nachsieht, wo das Program /usr/bin/mail
hinzeigt. Es wird wenn nicht anders konfiguriert, nach /etc/alternatives/mail
zeigen. Schaut man da nach, sieht man, welches Programm für mail verwendet wird.
root:~/bin# ls -l /usr/bin/mail
lrwxrwxrwx 1 root root 22 May 7 2014 /usr/bin/mail -> /etc/alternatives/mail
root:~/bin# ls -l /etc/alternatives/mail
lrwxrwxrwx 1 root root 18 Oct 16 2014 /etc/alternatives/mail -> /usr/bin/bsd-mailx
Wir installieren uns dann mailutils und werden mit update-alternatives
dieses als Standard mailx verwenden, um die Attachment Funktion nutzen zu können.
root:~# apt-get install mailutils
root:~# update-alternatives --config mailx
There are 2 choices for the alternative mailx (providing /usr/bin/mailx).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/bsd-mailx 50 auto mode
1 /usr/bin/bsd-mailx 50 manual mode
2 /usr/bin/mail.mailutils 30 manual mode
Press enter to keep the current choice[*], or type selection number: 2