Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Arch Linux x86
Heirloom mailx

From what I know, the mailx utility is supposed to read and send email. I somehow got it to work with sending and receiving mail with a gmail account, also using fetchmail.

So I apparently have an email with picture attachments in my mailbox, it displays fine on the native Gmail AJAX. Keeping with Unix tradition to deter absolute beginners, it does not explain anywhere in the manual pages how to read attachments. When I display the email it says:

Part 3:
Content-Type: application/octet-stream;
        charset="gbk";
        name="123.jpg"
Content-Disposition: attachment; filename="123.jpg"

Yes it does explain how to send them, but what use is that if one couldn't read them in the first place? All it needs is something like

& cat 123.jpg > foo

I also googled this and I think I'm just about the first person to ask this anywhere. Even if this answer is braindead simple, the point of all this is that I as a beginner could not retrieve this answer by myself, which I find surprising on something so simple as this.

And no, don't suggest GUI monolithic clients.

share|improve this question
    
OT: Hooray for censorship. "Harsh" language is apparently too much for our sensitive users. It's not more of the functionality I mock than the users who do it. Hopefully at least this comment can't get modified. –  kaykun May 22 '11 at 9:46
2  
"Harsh" language will be taken by most users as a way of saying: "Don't bother answering my question." –  Turbo J May 22 '11 at 10:14
2  
It's not censorship, everybody can see the edits and you can even revert the edits anyway. But mind that 1) it adds no real value to the question and 2) some people might feel offended and don't care to answer –  slhck May 22 '11 at 10:28
    
@kaykun People donate their time for "FREE", yes "FREE", so using language that is more amenable to a larger proportion of users is probably a better strategy than using unpleasant language. –  slotishtype Jul 18 '11 at 13:27

1 Answer 1

up vote 1 down vote accepted

Have you read the manpage man mailx? Look for write (w) command. This can write attachments.

share|improve this answer
    
I knew it had to be simple. Like any sane person I don't spend most of my time entirely reading those tomes; the section for write just didn't happen to have the keyword "attachment" in it. –  kaykun May 22 '11 at 10:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.