On 2017-06-13 17:46:44 -0500, Derek Martin wrote: > On Wed, Jun 14, 2017 at 12:18:44AM +0200, Vincent Lefevre wrote: > > 2. If the file is valid UTF-8 and contains no blacklisted control > > characters (to be defined, but this should include null bytes), > > then MIME type = text/plain. > > What if the attachment is 10GB?
Several comments about this: 1. Scanning the attachment for the above detection will take much less time than sending the mail. So, I don't think that this is really an issue. 2. Sending such a huge attachment is not a common thing. I think that such corner cases should not have an influence on the default behavior. 3. Such huge files are probably not text anyway. So, this means that in practice, Mutt will detect very early that the file is binary. There could be another rule to say that above some configurable limit, the file is regarded as binary, but I really don't think that this is necessary. Mutt should also warn the user when sending such a big attachment (all users make mistake...). When Mutt is run without the UI, it should probably refuse to send the mail unless some --force option is used or something like that. BTW, is there a way to specify the MIME type with the -a option? -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)