Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for a solution to save automatically attachments of an e-mail for a specific mailbox on an network drive. Mails are stored on cyrus imap server.

Does anyone know a script or something like this. Maybe there is a way to do this with sieve?!?

I searched on the web, but didn't find anything.

Thanks in advance!

share|improve this question

1 Answer 1

AFAIK Sieve (the scripting language Cyrus loves) does not support attachment extraction. What you can do though is that you create a Sieve script which identified the e-mails having attachments (from sender, message size, whatever criteria you'd like to use), and automatically file those messages to some specific IMAP folder, say TemporaryAttachmentsFolder.

Then you can put in cron a shell script, which periodically polls that TemporaryAttachmentsFolder directory, and extracts the attachments with a tool like ripmime and saves them elsewhere. Or, if you are truly l337, you can replace the traditional cron with incron and make the extraction happen in real-time.

share|improve this answer

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.