Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

e.g., I've got files I want to send by sendmail but the receiving mailbox (for posting pictures to my blog) will not accept uuencode files a la

$uuencode file | sendmail user@domain

I'm guessing it'll accept MIME though. So what command can I use instead?

share|improve this question
add comment

2 Answers

You need mimencode from the metamail package... Debian has some package info, but the package is based on ancient Bellcore code.

If you're just trying to send mail though, you might look into using mutt; I think it can mimencode attachments from the commandline.

share|improve this answer
    
Yes, mutt does properly mime-encode which I know as I was just noodling with it: askubuntu.com/questions/5431/… –  msw Oct 14 '10 at 3:47
    
Hmm. metamail's no longer a debian package, it looks like. –  ixtmixilix Oct 15 '10 at 21:37
add comment
up vote 2 down vote accepted

The best luck I had was with mime-construct, written in Perl. It does pretty much everything uuencode does, and is pipeable, which is what I needed. (No, I was not looking for an MTA such as mutt... msmtp is all I need, thank you very much.)

For people interested, you call it using something like

$mime-construct --output --to "addy@domain.suffix" --file-attach "a.jpg"

which prints a load of random gobbledygook to stdout, just as uuencode would if you didn't pipe it somewhere else.

share|improve this answer
add comment

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.