Re: Komplettes *nix Maildir versenden?

From: Oliver Fromme <olli(at)lurza.secnetix.de>
Date: Mon, 28 Jun 2004 11:45:52 +0200 (CEST)

Nicolas Rachinsky <list(at)rachinsky.de> wrote:
> [...]
> find maildir -type f -print0 |sh -c 'sendmail neue(at)adres.se <"$1"' -- --

Das funktioniert so nicht.

> Das zweite müßte aber irgendwie schöner gehen, ich komm nur nicht
> grade drauf.

$ cd maildir
$ for i in new/* cur/*; do sendmail neue(at)adres.se < $i; done

Falls die maildir-Struktur über den klassischen Standard
mit new und cur hinausgeht, muß man dann allerdings doch
mit »find« herumwerkeln (wobei man "tmp" auslassen muß).
Also so ungefähr:

$ cd maildir
$ for i in `find . -name tmp -prune -or -type f`; do sendmail ...

oder

$ cd maildir
$ find . -name tmp -prune -or -type f | while read i; do sendmail ...

Gruß
   Olli

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
With Perl you can manipulate text, interact with programs, talk over
networks, drive Web pages, perform arbitrary precision arithmetic,
and write programs that look like Snoopy swearing.
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Mon 28 Jun 2004 - 11:46:26 CEST

search this site