Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Deliver script (was Re: procmail)



According to Geoff Wing:
> If you want store in individual files, but not use the rcvstore program, you
> might try the following procmailrc recipes, which store the lists in
> 3 different directories. Each message is stored as its message number.
> 
> :0: 				# Zsh announce mailing list
> * ^Resent-Sender: zsh
> * ^X-Mailing-List: <zsh-announce.*\/[0-9]+
> zsh-announce/$MATCH
> 
> :0: 				# Zsh users mailing list
> * ^Resent-Sender: zsh
> * ^X-Mailing-List: <zsh-users.*\/[0-9]+
> zsh-users/$MATCH
> 
> :0: 				# Zsh workers mailing list
> * ^Resent-Sender: zsh
> * ^X-Mailing-List: <zsh-workers.*\/[0-9]+
> zsh-workers/$MATCH

You should be able to do the same thing with Deliver.  Assuming you
have Perl (DON'T YOU?), your .deliver file would look like:

----------------------------------------------------------------
#!/usr/bin/perl

open(H, $ENV{'HEADER'});
while (<H>) {
	if (/^X-Mailing-List: <(zsh-\w+)[^/]*/(\d+)/) {
		print $1, "/", $2, "\n";
		exit;
	}
}
close(H);

print $ARGV[0], "\n";
----------------------------------------------------------------



-- 
            Chip Salzenberg, aka <chip@xxxxxxxxxxxxxxx>
     "And remember to worship at the railroad of your choice."
        -- Mike Nelson, MST3K: "The Amazing Transparent Man"



Messages sorted by: Reverse Date, Date, Thread, Author