From owner-freebsd-questions@FreeBSD.ORG Fri Aug 20 21:07:05 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A337816A4CE for ; Fri, 20 Aug 2004 21:07:05 +0000 (GMT) Received: from deimos.aros.net (deimos.aros.net [66.219.192.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FA1B43D55 for ; Fri, 20 Aug 2004 21:07:05 +0000 (GMT) (envelope-from fungus@aros.net) Received: from fungus.private.aros.net (firebat.aros.net [66.219.192.36]) by deimos.aros.net (8.12.9p2/8.12.9) with ESMTP id i7KL72u4046334 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 20 Aug 2004 15:07:04 -0600 (MDT) (envelope-from fungus@aros.net) From: Lonnie Olson To: freebsd-questions@freebsd.org In-Reply-To: <20040820145136.13837.qmail@web51703.mail.yahoo.com> References: <20040820145136.13837.qmail@web51703.mail.yahoo.com> Content-Type: text/plain Message-Id: <1093036062.29065.16.camel@fungus.private.aros.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.7 Date: Fri, 20 Aug 2004 15:07:42 -0600 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new on deimos.aros.net Subject: Re: Extract Email Attachments..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 21:07:05 -0000 On Fri, 2004-08-20 at 07:51 -0700, samy lancher wrote: > Hello All, > I have a sendmail Email server on freebsd OS. I would like to know if there is any way I can extract the attachments that come with email and store them in a local folder. I do not want to use any MUA. I will be getting several Emails with image attachments. I just want to automatically extract those image attachments and store them in local folder. Are there any third party applications or some kind of script or maybe need some configuration on the server for this purpose. I would really appreciate if someone could help me out. > > Thanks in advance. > Naveen. > > You can use mimeStrip available at http://oneguycoding.com/opensource/ mimeStrip has lots of uses. For example I use it in a procmail recipe to do exactly what you are looking for. :0 * ^Mailing-List: .*yahoogroups.com { :0 fw | /usr/local/bin/mimeStrip.pl --dir=${HOME}/attachments :0: lists/yahoo } This recipe will save the attachment to my attachments directory, and strip them from the original email and save it to the lists/yahoo folder. --lonnie