Philip Guenther | 1 May 02:02 1996
Picon

Re: Still not Looping and SHIFTing

Tony Jago <tony <at> fit.qut.edu.au> writes:
> I am using procmail v3.11pre4 1995/10/29 so I guess thats not the
> problem. This is what I have been using to test it:
...
> If I use this script:
>
>   DUDE="$ <at> "

To quote the procmailrc(5) manpage's BUGS section:

BUGS
                               ...  When the -a or -m options are
     used, "$ <at> " will expand to respectively the  specified  argu-
     ment (list); but only when passed as in the argument list to
     a program.

Philip Guenther

Tony Jago | 1 May 02:15 1996
Picon
Picon

Re: Still not Looping and SHIFTing


> Tony Jago <tony <at> fit.qut.edu.au> writes:
> > I am using procmail v3.11pre4 1995/10/29 so I guess thats not the
> > problem. This is what I have been using to test it:
> ...
> > If I use this script:
> >
> >   DUDE="$ <at> "
>
>
> To quote the procmailrc(5) manpage's BUGS section:
>
> BUGS
>                                ...  When the -a or -m options are
>      used, "$ <at> " will expand to respectively the  specified  argu-
>      ment (list); but only when passed as in the argument list to
>      a program.
>
>
> Philip Guenther
>

 Thanks for your help so-far Philip,

 I have changes my script to:

   LOGFILE=/tmp/logger
   VERBOSE=yes

   :0
(Continue reading)

Jan Vicherek | 1 May 02:56 1996

filtering nearly-identical headers in one rule

(please reply directly to me [honza <at> ied.com] -- I'm not subscribed to the list)

 Hi.

 What would be an [elegant] way to process almost-same msgs in one rule :

 e.g. all the relevant msgs have :

X-loop:  mailing-list-XXXXX.*XX-digest <at> an.insti.tution.edu

   And I would like to use lockfile and destination mailbox :
 digest-XXXXX.*XX.lock
   and
 digest-XXXXX.*XX

  where the XXXXX.*XX may be different in different msgs.

I'm using :
procmail v3.10 1994/10/31

         Thanx,   
                  Jan

(BTW, does this list have a [searchable] archive somewhere ?)

Brock Rozen | 1 May 03:50 1996
Picon

Re: Setting variables properly

On Sun, 28 Apr 1996, Philip Guenther wrote:

> >PGHOST=( <at> |%)(((.*)?\.)?Destek\.net|torah\.org)
> >
> >:0
> >* ^TOgabbai$PGHOST
> >
> >
> >How do I set the variable properly and use it as a condition properly,
> >given the fact that I need gabbai to be set individually and NOT as part
> >of the variable. Thanks,
>
> You set it just fine.  However, procmail doesn't expand variables in
> conditions unless explicitly told to, but preceding the condition with
> a dollar sign, i.e.:
>
> :0
> * $ ^TOgabbai$PGHOST
>
>
> As for PGHOST, I would be tempted to change it to read:
>
> PGHOST = ( <at> |%)(([-a-z0-9]\.)*Desktek\.net|torah\.org)

For some reason, I tried inserting the above (not as a variable, but
straight as a condition, instead of what I had earlier, and it didn't
work. But as mentioned below, I don't need really really good matching as
the other conditions will probably catch it.

> That is, only domain name parts to follow the ' <at> ' or '%' and precede
(Continue reading)

Picon

Re: Script problem - "skipped" and store/forward problems

Philip Guenther wrote:

>PSE <at> netcom.com (Professional Software Engineering) writes:

[my script problem, "simple" mailing list]

>I'm not sure I'd call this a "SIMPLE maillist function".  To me, simple
>implies it fitting inside my .procmailrc, in less than one (67 line)
>screenful.

I meant "simple" in that it isn't meant to act like a listserv -- it merely 
remails to a group.

>As for it affecting your regular mail, put the following right before
>the mailing list rules:
>
>:0 c:
>$DEFAULT
>
>DELIVERED = yes

How can I set the DELIVERED flag any time I place the incoming message into a 
folder?  The procmail man page seems to indicate that this is what controls 
whether the message bounces or just falls into the bit bucket, but I've never 
experienced bouncing without it.

The other thing though -- ultimatley, at the END of the script, I want it to 
save a copy to an archive file, as well as forward -- so long as the message 
hasn't been saved to another folder.  You gave me the script info for that:

(Continue reading)

Sten Drescher | 1 May 05:17 1996
Picon

Re: Procmail and New Message Notification?

>>>>> Josh Kramer writes:

JK> If you use tcsh, this handy alias will display a one line message
JK> at your prompt telling you if and at what time new mail has
JK> arrived, or will display nothing if there has been no new mail.

JK> In .cshrc, add the line:

JK> alias precmd 'finger your_username | grep "New mail" | grep -v
JK> "no"'

JK> Replace your_username with your real username, login again, and
JK> you're set.

JK> I hope that this is useful for some people.

	Not likely, if you are using procmail to split mail into
separate folders. (;  Not all messages are going to go into $MAIL, so
'finger your_username' isn't going to pick up new mail.

--

-- 
#include <disclaimer.h>                               /* Sten Drescher */
ObCDABait:      For she doted upon their paramours, whose flesh is as the
flesh of asses, and whose issue is like the issue of horses.  [Eze 23:20]
Unsolicited email advertisements will be proofread for a US$100/page fee.

David W. Tamkin | 1 May 05:23 1996
Picon

Re: Still not Looping and SHIFTing

| > Tony Jago <tony <at> fit.qut.edu.au> writes:

| > > I am using procmail v3.11pre4 1995/10/29 so I guess thats not the
| > > problem. This is what I have been using to test it:
| > ...
| > > If I use this script:
| > >
| > >   DUDE="$ <at> "

Philip Guenther answered,

| > To quote the procmailrc(5) manpage's BUGS section:
| >
| > BUGS
| >                                ...  When the -a or -m options are
| >      used, "$ <at> " will expand to respectively the  specified  argu-
| >      ment (list); but only when passed as in the argument list to
| >      a program.

Tony wrote again,

|  Thanks for your help so-far Philip,
| 
|  I have changes my script to:
| 
|    LOGFILE=/tmp/logger
|    VERBOSE=yes
| 
|    :0
|    | echo "$ <at> " > /tmp/result
(Continue reading)

David W. Tamkin | 1 May 05:39 1996
Picon

Re: getting rid of the body of an e-mail

Das Devaraj asked,

| A part of my .procmailrc file is shown below.  I am trying to generate an
| acknowledgement message when somebody sends a message to user1 <at> foo.com
| (other ids in the same domain have different recipes). "HdrLine" is a file
| containing the from line and "AutoMsg" is a file containing the canned
| message which goes back to the sender. 
| 
| The problem is that the return message contains the complete text of the
| original message.  Shouldn't the "h" flag pipe only the headers?  What am
| I overlooking? 
| 
| :0 hc

As Philip Guenther explained, the `h' flag is meaningless there.

| * ^To:.*user1 <at> foo.com
| {
|    MAILDIR=$HOME/fileserver
|    :0 fhw 
|    | formail -rA "X-Loop: Processed_Mail"
|    :0 a
|    | cat ./HdrLine - ./AutoMsg >&1 | $SENDMAIL -oi -t
| }

Yes, the `h' flag makes procmail feed only the head, so on a filter recipe
procmail replaces only the head and restores the previous body.  Thus,
formail -r (if you don't also use formail's -k option, and Das didn't),
should drop the body, but procmail is putting it back because only the
head is filtered.
(Continue reading)

Philip Guenther | 1 May 06:18 1996
Picon

Re: filtering nearly-identical headers in one rule

Jan Vicherek <honza <at> ied.com> writes:
>(please reply directly to me [honza <at> ied.com] -- I'm not subscribed to the list)

Well, I'll let you live.

> What would be an [elegant] way to process almost-same msgs in one rule :
>
> e.g. all the relevant msgs have :
>
>X-loop:  mailing-list-XXXXX.*XX-digest <at> an.insti.tution.edu
>
>   And I would like to use lockfile and destination mailbox :
> digest-XXXXX.*XX.lock
>   and
> digest-XXXXX.*XX
>
>  where the XXXXX.*XX may be different in different msgs.

This can be done wholly within procmail if the "XXXXX.*XX" part matches
some definate regexp that doesn't extend into the "-digest..." part.

For example, if the "XXXXX.*XX" part can never contain a '-', then the
following would work:

:0:
* ^X-Loop: *mailing-list-\/[^-]+
digest-$MATCH

Alternatively, if you knew that it was always exactly 9 characters long,
then this would work:
(Continue reading)

Tony Jago | 1 May 07:47 1996
Picon
Picon

Re: Still not Looping and SHIFTing


> No, it doesn't work because ">" is in $SHELLMETAS, so procmail forks a shell,
> and that shell has its own idea of what $1, $2, $*, and $ <at>  are.  "$ <at> " works
> properly only if procmail runs the program itself.
>
> Try this:
>
>    :0bi
>    * $ !${1+!}
>    ARGS=| echo "$ <at> "
>     :0Abi:/tmp/result.lock
>     | echo "$ARGS" > /tmp/result
>
> It's not exactly the same but it's close.  (I used `b' rather than `h'
> because I take it that you're working with test messages where the bodies
> tend to be shorter than the heads.)
>
> Or try this:
>
>     REALLOGFILE=$LOGFILE
>     LOGFILE=/tmp/result
>     LOG="`echo "$ <at> "
> `
>     LOGFILE=$REALLOGFILE
>
> These both assume that there is a /bin/echo executable on your system (or an
> executable named echo somewhere in $PATH), even if it is just a script that
> passes its parameters to some shell's built-in echo.
>

(Continue reading)


Gmane