From owner-freebsd-questions@FreeBSD.ORG Thu Feb 14 03:04:31 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 518259C1 for ; Thu, 14 Feb 2013 03:04:31 +0000 (UTC) (envelope-from gobble.wa@gmail.com) Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com [209.85.214.51]) by mx1.freebsd.org (Postfix) with ESMTP id B1177FE8 for ; Thu, 14 Feb 2013 03:04:30 +0000 (UTC) Received: by mail-bk0-f51.google.com with SMTP id ik5so855645bkc.24 for ; Wed, 13 Feb 2013 19:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=RhBh+8HjBldnQNHc5gqiswbN05umTSM0WyTBMWujHrM=; b=BEtPSFg+M3qwRTlPX0UGzOWjNDrb1b97TUcMrRD/VjOtXKiGVTT7NQpXiYICPIFm4L FkaNS5iXkrySLY0T7nkzzvq3RDNKcYWga8hiBaKIcQoKv4Cskj4F/cuGtB+DqNtow19O mLRRJwo5Cffjav23BjcfobyXRx5EjAYAf3cvzcLVbhwluYaseuaY256N5JetsclTfz/s eACL1H+99DnayTC25GzSZ6cx/T/ySZkTtZ5jsMnPeAohI2oz/lJKeOM0eAXy6wlIEY/m ol29kGGvuaxgSlqxvrMGNdrGpNBrAe04z20j2SjWnOmhHEn9Kiol395WF8TJ0sSoIxZo z29g== MIME-Version: 1.0 X-Received: by 10.204.4.146 with SMTP id 18mr7559746bkr.9.1360811069236; Wed, 13 Feb 2013 19:04:29 -0800 (PST) Received: by 10.205.76.198 with HTTP; Wed, 13 Feb 2013 19:04:29 -0800 (PST) Received: by 10.205.76.198 with HTTP; Wed, 13 Feb 2013 19:04:29 -0800 (PST) In-Reply-To: <20130214004913.a89dc042.freebsd@edvax.de> References: <20130214004913.a89dc042.freebsd@edvax.de> Date: Wed, 13 Feb 2013 19:04:29 -0800 Message-ID: Subject: Re: Re-sending selected e-mail messages From: Waitman Gobble To: Polytropon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 03:04:31 -0000 On Feb 13, 2013 3:49 PM, "Polytropon" wrote: > > I need a way to automatically re-sent stored e-mail messages > according to some criteria and like to ask for advice or > suggestions for an already existing solution before I start > reinventing the wheel. :-) > > The messages in question are stored in MH format. This is a > tree where a mailbox equals a directory, and the individual > files in that directory equal the messages. They are numbered > 1, 2, 3, 4, ..., and so on. Each message is in > > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > > or > > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: 7bit > > or maybe even > > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > text format. Some of them might contain an attachment, which > is "included" in the file with something like > > --Multipart=... > Content-Type: ...; > name="..." > Content-Disposition: attachment; > filename="..." > Content-Transfer-Encoding: base64 > --Multipart=...--- > > Some messages are "fully multipart". > > So when iterating on ~/Mail/sent/1,2,3,4,5,... I get all the > messages. Each third line, "To:", is the criteria to look at. > If it matches a given recipient, the mail should be sent again. > This can easily be done by the system's mailer which is properly > configured (and uses ISP's MX), so | mail -s "maybe new subject" > is possible. The message should already be properly pre-composed. > > What is the easiest way to do this without reinventing the wheel, > or should I? :-) > > > > > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " freebsd-questions-unsubscribe@freebsd.org" I'm working on an email related project, you might hack it to work for you. https://github.com/waitman/elmboxo check out pmess.c it can do a single message. (the easy way to feed pmess a single message is actually to feed the single message to elmboxo as it is coded) anyway its built to stuff them in a mongodb db, but I.m working on a free nosql solution that works for my project. you can just chuck all those bits. an idea. Waitman Gobble San Jose California