jonas@server:~$ mutt -v Mutt 1.9.4 (2018-02-28) Copyright (C) 1996-2016 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 4.15.0-34-generic (x86_64) ncurses: ncurses 6.1.20180127 (compiled with 6.1) libidn: 1.33 (compiled with 1.33) hcache backend: tokyocabinet 1.4.48 [... removed mutt compiler info ...] jonas@server:~$ mail --version mail (GNU Mailutils) 3.4 Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu[.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.] jonas@server:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic jonas@server:~$ mutt -v Mutt 1.9.4 (2018-02-28) Copyright (C) 1996-2016 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 4.15.0-34-generic (x86_64) ncurses: ncurses 6.1.20180127 (compiled with 6.1) libidn: 1.33 (compiled with 1.33) hcache backend: tokyocabinet 1.4.48 [... removed mutt compiler info ...] jonas@server:~$ mail --version mail (GNU Mailutils) 3.4 Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. jonas@server:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic jonas@server:~$ mutt -v Mutt 1.9.4 (2018-02-28) [...] jonas@server:~$ mail --version mail (GNU Mailutils) 3.4 [...] jonas@server:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic Requested information
The headers from mutt (Please let me know if I stripped out too much):
Delivered-To: [...] Received: by 2002:a2e:9c0f:0:0:0:0:0 with SMTP id s15-v6csp1355528lji; Sat, 10 Nov 2018 10:47:03 -0800 (PST) [... removed X-* ...] [... removed ARC-* ...] Date: Sat, 10 Nov 2018 18:46:44 +0000 From: [...] To: [...] Subject: mutt Message-ID: <20181110184643.GA23337@server> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) [... removed X-* ...] --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline See attachment --5mCyUwZo2JvN/JJP Content-Type: application/octet-stream Content-Disposition: attachment; filename="20181024T0942.mobi" Content-Transfer-Encoding: base64 --5mCyUwZo2JvN/JJP-- Headers from mail:
Delivered-To: [...] Received: by 2002:a2e:9c0f:0:0:0:0:0 with SMTP id s15-v6csp1355767lji; Sat, 10 Nov 2018 10:47:23 -0800 (PST) [... removed X-* ...] [... removed ARC-* ...] MIME-Version: 1.0 Content-Type: application/octet-stream; name="20181024T0942.mobi" Content-Transfer-Encoding: base64 Subject: mail To: [...] X-Mailer: mail (GNU Mailutils 3.4) Message-Id: <[email protected]> Date: Sat, 10 Nov 2018 18:47:07 +0000 (UTC) From: [...] [... removed X-* ...] Upon closer inspection I noticed that the one from mail is missing the text "See attachment".
Versions:
jonas@server:~$ mutt -v Mutt 1.9.4 (2018-02-28) Copyright (C) 1996-2016 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 4.15.0-34-generic (x86_64) ncurses: ncurses 6.1.20180127 (compiled with 6.1) libidn: 1.33 (compiled with 1.33) hcache backend: tokyocabinet 1.4.48 [... removed mutt compiler info ...] jonas@server:~$ mail --version mail (GNU Mailutils) 3.4 Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. jonas@server:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic According to the man page on the server I'm using -A correctly:
-A, --attach=FILE attach FILE -a, --append=HEADER: VALUE append given header to the message being sent Requested information
The headers from mutt (Please let me know if I stripped out too much):
Delivered-To: [...] Received: by 2002:a2e:9c0f:0:0:0:0:0 with SMTP id s15-v6csp1355528lji; Sat, 10 Nov 2018 10:47:03 -0800 (PST) [... removed X-* ...] [... removed ARC-* ...] Date: Sat, 10 Nov 2018 18:46:44 +0000 From: [...] To: [...] Subject: mutt Message-ID: <20181110184643.GA23337@server> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) [... removed X-* ...] --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline See attachment --5mCyUwZo2JvN/JJP Content-Type: application/octet-stream Content-Disposition: attachment; filename="20181024T0942.mobi" Content-Transfer-Encoding: base64 --5mCyUwZo2JvN/JJP-- Headers from mail:
Delivered-To: [...] Received: by 2002:a2e:9c0f:0:0:0:0:0 with SMTP id s15-v6csp1355767lji; Sat, 10 Nov 2018 10:47:23 -0800 (PST) [... removed X-* ...] [... removed ARC-* ...] MIME-Version: 1.0 Content-Type: application/octet-stream; name="20181024T0942.mobi" Content-Transfer-Encoding: base64 Subject: mail To: [...] X-Mailer: mail (GNU Mailutils 3.4) Message-Id: <[email protected]> Date: Sat, 10 Nov 2018 18:47:07 +0000 (UTC) From: [...] [... removed X-* ...] Upon closer inspection I noticed that the one from mail is missing the text "See attachment".
Versions:
jonas@server:~$ mutt -v Mutt 1.9.4 (2018-02-28) Copyright (C) 1996-2016 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 4.15.0-34-generic (x86_64) ncurses: ncurses 6.1.20180127 (compiled with 6.1) libidn: 1.33 (compiled with 1.33) hcache backend: tokyocabinet 1.4.48 [... removed mutt compiler info ...] jonas@server:~$ mail --version mail (GNU Mailutils) 3.4 Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. jonas@server:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic According to the man page on the server I'm using -A correctly:
-A, --attach=FILE attach FILE -a, --append=HEADER: VALUE append given header to the message being sent Sending attachments with GNU mail to @kindle.com
Background: I'm trying to set up a server to regularly pull RSS feeds, package them up in a mobi-ebook and send them to my kindle.
Problem: If I configure the server to send to my @kindle.com email address (as described here: https://www.amazon.com/gp/sendtokindle/email) I get back an email telling me:
Your email to Kindle(s) did not include any attachments.
I'm using the following command to send the email with attachment:
echo "See attachment" | mail -s subject -aFrom:"$EMAIL_FROM" -A $EMAIL_FILE -r $EMAIL_FROM $EMAIL_TO I tested this command by sending it to my personal email address instead of the @kindle.com one. The email appeared correctly with attachment in my personal inbox.
Interestingly it works fine (as in the ebook appears on my kindle) if I use mutt like this:
echo "See attachment" | mutt -s subject -a $EMAIL_FILE -- $EMAIL_TO I'm using postfix to forward the emails to a hosted smtp server. I already checked the postfix logs (/var/log/mail.log) but couldn't see any differences between the two methods above. The server is running Ubuntu 18.04.
Question: Why does it work with mutt but not with mail? How would I troubleshoot such an issue?