On 11.08.11,15:30, Camaleón wrote:
> Hello,
> 
> I'm facing a curious problem when I send attachments with Mutt from 
> command line.
> 
> I have a small self-made script that basically makes two things:
> 
> 1/ Given a big file (~10/20 MiB), it splits into small chunks of data 
> (~250 KiB)
> 
> 2/ Then it sends the resulting files using Mutt (each file is attached 
> per message, so if there are 10 files Mutt sends 10 messages)
> 
> I have to do this in order to send a chap programs and documents I 
> download from the web because he does not have access to Internet, only 
> to his e-mail account (which is also very restricted, limited to 512 KiB/
> message).
> 
> All the process works fine but some of the files are wrongly encoded 
> which results in an error when the user tries to reconstruct the big file 
> from the received attachments. 
> 
> For instance, I've noted that properly encoded attachments appear as 
> follows:
> 
> ***
> Content-Type: application/octet-stream
> Content-Disposition: attachment; filename=test0014
> Content-Transfer-Encoding: base64
> ***
> 
> And bad ones are like this:
> 
> ***
> Content-Type: text/plain; charset=utf-8
> Content-Disposition: attachment; filename=test0015
> Content-Transfer-Encoding: quoted-printable
> ***
> 
> So I tried to deal with this in two ways:
> 
> 1. Enforcing Mutt to use "Content-Type: application/octet-stream" when I 
> call it using the script (that is, "mutt -e 'set content_type=application/
> octet-stream' [...])
> 
> This works (I can see the body of the messages are encoded in that way) 
> but there are still some messages that encode the attachments as "text/
> plain".
> 
> 2. I've also thought in using a "~/.mime.types" file but I dunno how to 
> do this, I mean, mime types relies on filenames extensions 
> (.pdf/.txt/.ogg) and splitted files have no extension (file000, file001, 
> file002, file003...). I could rename those to some fancy filename 
> (file001.file, etc...) but I think it's overwelming for the task.
> 
> To be sincere, I'm not sure if the culprit here is the Gmail server (I 
> use my Gmail account to send the messages) because Mutt tends to do the 
> right things while Gmail is a bit... let's say "liberal" when it comes to 
> implement/interpret the standards :-)
> 
> So I wonder what would be the best way to bypass this or if someone has 
> had a previous experience similar to this and can share his findings... 
> Any idea is very welcome.
> 
> P.S. Using Mutt 1.5.18 (2008-05-17)
> 

What about putting the files in 2-3 zip files and send him? Also update to mutt
1.5.21 which have many bug fixes after 1.5.18.

Jostein


Reply via email to