From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25391 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: Mail to news (and back again) Date: 26 Sep 1999 11:33:14 -0700 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035162784 13719 80.91.224.250 (21 Oct 2002 01:13:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:13:04 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA24140 for ; Sun, 26 Sep 1999 14:44:21 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAB23428; Sun, 26 Sep 1999 13:44:16 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 26 Sep 1999 13:44:43 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA06164 for ; Sun, 26 Sep 1999 13:44:33 -0500 (CDT) Original-Received: from mail.networkone.net (qmailr@mail.networkone.net [209.144.112.75]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id OAA24118 for ; Sun, 26 Sep 1999 14:42:33 -0400 (EDT) Original-Received: (qmail 16935 invoked from network); 26 Sep 1999 18:42:31 -0000 Original-Received: from pm3-2-112.la.networkone.net (HELO satellite.local.lan) (reader@209.144.126.112) by mail.networkone.net with SMTP; 26 Sep 1999 18:42:31 -0000 Original-Received: (from reader@localhost) by satellite.local.lan (8.9.3/8.9.1) id LAA10004; Sun, 26 Sep 1999 11:42:24 -0700 Original-To: ding@gnus.org In-Reply-To: Lars Magne Ingebrigtsen's message of "26 Sep 1999 19:27:42 +0200" User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.3 Original-Lines: 73 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25391 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25391 Lars Magne Ingebrigtsen writes: > Is there some sort of ready-made procmail (or whatever) setup for > having all the mail that's sent to, say "ding@quimby.gnus.org" spooled > in inn? I guess one should run, er, rnews on the mail, after > massaging it slightly. (Like adding the Newsgroups: gnus.ding" header > and possibly renaming any offending headers (like NNTP-Posting-Host > and the like.)) Procmail can handle all the above including adding and subtracting headers. Not sure what "spooled in inn" means but if you just mean a spool file in a certain location then it could be as simple as :0 * To:.* ding@quimby You probably know this stuff already so hope I'm not missing what you are after. The .procmailrc file needs to specific $MAILDIR since any files generated by procmail are relative to it pathwise. With out $MAILDIR the root is $HOME Or you must spell out the full path. Some other things need to be specified too, or else problems may develope. Something like this: ********** Begin sample ***** # -*-Shell-script-*- PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin SHELL=/bin/sh MAILDIR=$HOME/spool <= all procmail files will go to $HOME/spool ******** end ************ You can also have a certain address or other Header set off any command by having procmail send the message to that command in a pipe and then telling it to ignore the message and just do the command. You can do all sorts of legal and semi legal stuff with the formail part of procmail. Adding and subtracting headers etc. I'm not that good at it but here is a simple example that I use to add a header to mail being .forwarded from another address, so I can ident it easily. Below collects any mail sent to my jtan.com address, applies a header: X-Delivered-Via: reader@jtan.com Then sends the messages on to my newsguy.com address :0 | formail -I "X-Delivered-Via: reader@jtan.com" \ | $SENDMAIL $SENDMAILFLAGS reader@newsguy.com Below files a message in a spool and sends a copy on to start a command or run a script. :0 * ^Subject:.* <=collects all mail with { :0 c: <=files to this address & sends a copy on /lars/inn/spool/filename :0 i <= pipes to a script or command,ignoring the message |/lars/scipts-todo-lots-of-trick-stuff }