procmail
[Top] [All Lists]

Re: procmail digest, Vol 1 #171 - 16 msgs

2000-10-16 10:08:36

Well see the thing is that when I *do* have these values changed
(MAILSPOOLDIR set to /var/mail and MAILSPOOLHASH set to 2), procmail is
attempting to create a file in /var/spool/mail/a/r even though I've
changed the values already.

   procmail: Couldn't create "/var/spool/mail/a/r/arghya"
   procmail: Lock failure on "/var/mail/a/r/arghya.lock"
   procmail: Error while writing to "/var/mail/a/r/arghya" 550 5.0.0
   <arghya(_at_)mail(_dot_)blah(_dot_)com>... Can't create output

Now it *will* deliver to the correct directory if it already exists, but
if ti doesn't (or the permissions or wrong), then I'll get this message.
So why is it telling me that it couldn't create
/var/spool/mail/a/r/arghya, when I don't have that defined anywhere?  It's
potentially confusing.

It's a good idea to go ahead and already populate the FS with the
directories.  I'll go ahead and do it that way.  I was thinking on-demand
creation, but it's not really that important I guess.  It just appeared
(at first glance) that procmail was trying to create the directories *as
well as* the file.  Good thing I glanced twice.  :)

Thanks for the help guys,

Chris


Philip wrote:
--- begin quote ---
jello <jello(_at_)lava(_dot_)net> writes:
I've got two questions that I didn't see answered in the procmail
pointers page:

1)  In the authenticate.c file, I see that #define MAILSPOOLHASH line
where you can say 0,1, or 2 will attempt to deliver to
/var/spool/mail/b/a/bar* , but what if I wanted to change where it
attempts to deliver the mail when I define 2?  Ideally, I'm looking to
deliver to:    /var/mail/b/a/bar*  (taking spool out of the path).

Umm, just change the values for both MAILSPOOLDIR and MAILSPOOLHASH:


#ifndef MAILSPOOLDIR
#define MAILSPOOLDIR    "/var/mail/"           /* watch the trailing / */
#endif
#ifndef MAILSPOOLSUFFIX
#define MAILSPOOLSUFFIX ""            /* suffix to force maildir or MH
style */
#endif
#ifndef MAILSPOOLHASH
#define MAILSPOOLHASH   2      /* 2 would deliver to
/var/spool/mail/b/a/bar */
#endif

--- end of quote ---



On Sat, 14 Oct 2000 procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE wrote:


Send procmail mailing list submissions to
      procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE

To subscribe or unsubscribe via the web, visit
      http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
or, via email, send a message with subject or body 'help' to
      procmail-request(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
You can reach the person managing the list at
      procmail-admin(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE

When replying, please edit your Subject line so it is more specific than
"Re: Contents of procmail digest..."


Today's Topics:

  1. Re: Forward and Store recipe (Subba Rao)
  2. Re: Forward and Store recipe (John Summerfield)
  3. Re: Forward and Store recipe (David W. Tamkin)
  4. Sorting incoming mails to individual mailboxes 
(gnagy(_at_)city(_dot_)waterloo(_dot_)on(_dot_)ca)
  5. Skipping help. (Robert Campbell)
  6. Sorting incoming mails to individual mailboxes 
(gnagy(_at_)city(_dot_)waterloo(_dot_)on(_dot_)ca)
  7. Mail local (Michelangelo Pisa)
  8. Re: Skipping help. (Joe Altman)
  9. Re: Skipping help. (David W. Tamkin)
  10. Re:Skipping help. (Charlie Summers)
  11. Is there something wrong here? (Robert Campbell)
  12. You bet there is. (Was: Is there something wrong here?) (Charlie 
Summers)
  13. Re: sendmail & mail directory creation (guenther(_at_)gac(_dot_)edu)
  14. Re: Bounce mail after quota soft limit reached 
(guenther(_at_)gac(_dot_)edu)
  15. Re: Mail local (Philip Guenther)
  16. Re: Adding Envelope Headers to m4 conf file for Procmail 
(guenther(_at_)gac(_dot_)edu)

--__--__--

Message: 1
Date: Fri, 13 Oct 2000 07:17:15 +0000
From: Subba Rao <subb3(_at_)attglobal(_dot_)net>
To: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>
Cc: Procmail Users <procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE>
Subject: Re: Forward and Store recipe
Reply-To: Subba Rao <subb3(_at_)attglobal(_dot_)net>

On  0, "David W. Tamkin" <dattier(_at_)ripco(_dot_)com> wrote:
Subba Rao asked,

| I am using the following recipe to forward and store an email.
| The recipe does work. I am wondering if this recipe is using redundant
| carbon copying.
| 
| :0c
| * ^Subject:.*\<mysubject\>
| {
|         :0 c
|         ! team(_at_)company(_dot_)com
| 
|         :0
|         $DEFAULT
| }
| 
| I want the email to be processed by the remaining recipes in the list.

No, you need both `c' flags, and unless $DEFAULT is a directory you should
have a local lockfile on the save to $DEFAULT.  However, your current setup
is slightly inefficient as it forks a clone procmail to do the forwarding
and saving, and the original procmail can do all three tasks:

 :0c
 * ^Subject:.*\<mysubject\>
 ! team(_at_)company(_dot_)com
  :0Ac:
  $DEFAULT

My question, though, is why you need a specific save of a copy to $DEFAULT
there if you want to process the original of the message through the rest of
the rcfile.  By default (that's why the location is called "$DEFAULT")
procmail will save a message to $DEFAULT if it gets to the end of the 
recipes
without final delivery.  (If saving to $DEFAULT fails and $ORGMAIL is diffe-
rent from $DEFAULT, it will try to save to $ORGMAIL before giving up.)
It might be enough to forward a copy to team(_at_)company(_dot_)com and 
then let the
later recipes save it to $DEFAULT.


Thank you for replying.

I am using maildir format (qmail), so I don't see any reason to use a lock
file. Some of the mail, has different destination directories. The mail with
"mysubject" could get buried in that directory. So I save it to $DEFAULT along
with a copy in the destination directory.

In your recipe, don't I need to use open and close braces { }, for the action
items?

-- 

Subba Rao
subb3(_at_)attglobal(_dot_)net
http://pws.prserv.net/truemax/

--__--__--

Message: 2
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)dE
Subject: Re: Forward and Store recipe
<20001013071714(_dot_)A3013(_at_)attglobal(_dot_)net>
Date: Fri, 13 Oct 2000 20:13:51 +0800
From: John Summerfield <summer(_at_)OS2(_dot_)ami(_dot_)com(_dot_)au>



I am using maildir format (qmail), so I don't see any reason to use a lock
file. Some of the mail, has different destination directories. The mail with

The fact you don't see the need doesn't mean you don't need a lock file. My 
experience is that you do.

use one; you won't regret it. OTOH, of you don't, you probably will, 
eventually.






--__--__--

Message: 3
From: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>
Subject: Re: Forward and Store recipe
To: subb3(_at_)attglobal(_dot_)net
Date: Fri, 13 Oct 2000 12:58:41 -0500 (CDT)
Cc: procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de (Procmail Mailing List)

Subba Rao followed up,

| Thank you for replying.

You're welcome.

| I am using maildir format (qmail), so I don't see any reason to use a lock
| file.

Theoretically if the folder is a directory and the messages are separate
files within it, you do not need a local lockfile.  I think it is Bennett
Todd who has said that it's true only of qmail maildirs; John Summerfield
just said local lockfiles a good idea anyway.  Personally, I have no experi-
ence with saving mail to directories, so I've no position on the matter; the
only cases where I save to a file or alter a file in my .procmailrc without
a local lock are those where the code is protected by a regional lock.

| In your recipe, don't I need to use open and close braces { }, for the
| action items?

No; they're connected by an `A' flag.  If you want to use braces instead,
that's fine, but when I a condition or set of conditions to lead to two ac-
tions I find `A' flag simpler and cleaner than braces.  There are many places
in my rcfiles where braces are necessary, and avoiding them where I easily
can makes it easier to follow the nesting levels where I have to use them.


--__--__--

Message: 4
From: GNagy(_at_)city(_dot_)waterloo(_dot_)on(_dot_)ca
Subject: Sorting incoming mails to individual mailboxes
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Date:  Fri, 13 Oct 2000 15:25:43 -0400

Hi guys, I am new in procmail and having trouble to set up simple mail
distribution system

George Nagy
Sr. Database Administrator
The City of Waterloo
Information System
100 Regina St. S., Waterloo, ON. N2J 4A8
Bus: (519) 747-8563
Fax: (519) 747-8727
e-mail: gnagy(_at_)city(_dot_)waterloo(_dot_)on(_dot_)ca


--__--__--

Message: 5
Date: Fri, 13 Oct 2000 14:24:28 -0500 (EST)
From: Robert Campbell <poohba(_at_)io(_dot_)com>
Subject: Skipping help.
To: Procmail List <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>

I don't know what is being skipped. I just know that it is skipping.  How
do I find out.  I turned verbose on but I still don't know what exactly is
being skipped.

-- 
Do or Do Not.  There is no try.  (Yoda)


--__--__--

Message: 6
From: GNagy(_at_)city(_dot_)waterloo(_dot_)on(_dot_)ca
Subject: Sorting incoming mails to individual mailboxes
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Date:  Fri, 13 Oct 2000 15:36:11 -0400

Sorry accidentally press send ...

Hi guys, I am new in procmail and having trouble to set up simple mail
distribution system
I have sendmail running on linux redhat 6.2, using ppp with pap to dial
out, fetchmeil to get all my incoming mails.
My ISP is storing all my e-mails for users(_at_)mydomain(_dot_)com
I have to login as somebody to retrieve all my e-mails from
somebody(_at_)isp(_dot_)com mailbox.

My problem is all the messages will end up in somebody(_at_)mydomain(_dot_)com
mailbox.
I red somewhere that this should work automatically on red hat without
setting up any .procmailrc file.
Is this correct?

my script

su somebody -c fetchmail

in somebody home I have .fetchmailrc file


Thank you very much for help or any pointers


George Nagy
Sr. Database Administrator
The City of Waterloo
Information System
100 Regina St. S., Waterloo, ON. N2J 4A8
Bus: (519) 747-8563
Fax: (519) 747-8727
e-mail: gnagy(_at_)city(_dot_)waterloo(_dot_)on(_dot_)ca



--__--__--

Message: 7
Date: Fri, 13 Oct 2000 18:03:41 +0000
From: Michelangelo Pisa <michelangelo(_at_)osny(_dot_)com(_dot_)br>
Organization: Agencia Maritima Osny
Subject: Mail local

Can somebody help, I set up the procmail to user it how my mail local
software in the sendmail
 I put this configuration and the sendmail initialized, everything ok,
but when I send a e-mail the receiver don't  receive
the mensage and It don't return with error: Where's it
 See:

Mlocal,    P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40,

                A=procmail -Y -a $h -d $u

If  I to execute:
# procmail  "user"

Shown this message:
 ELF interpreter /usr/libeexec/ld-elf.so.1 not found
Abort trap

In the directory don't has the file , how I install it?


--__--__--

Message: 8
Date: Fri, 13 Oct 2000 16:37:06 -0400
From: Joe Altman <ja(_at_)panix(_dot_)com>
Subject: Re: Skipping help.
To: Procmail List <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>
Procmail List <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>

On Fri, Oct 13, 2000 at 02:24:28PM -0500, Robert Campbell wrote:
I don't know what is being skipped. I just know that it is skipping.  How
do I find out.  I turned verbose on but I still don't know what exactly is
being skipped.

Did you try opening the log in a text editor, and searching for the
word "Skipped"?

I just had this problem, and the word skipped was in the logs. How do
you know it is skipping otherwise?

ja
panix

--__--__--

Message: 9
Date: Fri, 13 Oct 2000 15:59:46 -0500 (CDT)
From: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>
Subject: Re: Skipping help.
Cc: procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de (Procmail List)

Robert wrote,

| I don't know what is being skipped. I just know that it is skipping.  How
| do I find out.  I turned verbose on but I still don't know what exactly is
| being skipped.

As I recall from the previously posted transcript, it was skipping a lone
brace ... unless that was someone else's post.

But it was something like,

procmail: Skipped "{"

or perhaps

procmail: Skipped "}"


--__--__--

Message: 10
Date: Fri, 13 Oct 2000 17:10:38 -0400
From: Charlie Summers <charlie(_at_)lofcom(_dot_)com>
Subject: Re:Skipping help.
To: Robert Campbell <poohba(_at_)io(_dot_)com>,
Procmail List <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>

At 3:24 PM -0400 10/13/00, Robert Campbell is rumored to have typed:

I don't know what is being skipped. I just know that it is skipping.  How
do I find out.  I turned verbose on but I still don't know what exactly is
being skipped.

   Look _carefully_ at your logs. With VERBOSE=ON, _every recipe_ is noted as
to success or failure ("Match on..." "No Match on..."); so walk through your
log from the top, comparing it to your .procmailrc and any INCLUDEd files,
until you find the syntax error that's causing the problem.

         Charlie



--__--__--

Message: 11
Date: Fri, 13 Oct 2000 20:13:23 -0500 (EST)
From: Robert Campbell <poohba(_at_)io(_dot_)com>
Subject: Is there something wrong here?
To: Procmail List <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>

I had separate rc's for these but then I put them together.  Is this okay?

:0 c:
* ^(To|Cc|Bcc)(_dot_)*poohba(_at_)io\(_dot_)com
* ! ^MAIL_DEAMON
* ! ^X-Loop: poohba(_at_)io\(_dot_)com
 {
  :0
   temp

  :0
   ! me(_at_)work(_dot_)com
 }

 {
  :0
   * ^(From|Cc|Bcc).*(Tinu|aosinupebi|Nicola|nnm|nicohous|daria|aaiclinic)
   ! poohba(_at_)otheraddr(_dot_)com
 }

 {
  :0
   * ^Subject.*Entry To Sexbook
   sexbook
 }


-- 
Do or Do Not.  There is no try.  (Yoda)


--__--__--

Message: 12
Date: Fri, 13 Oct 2000 23:47:05 -0400
From: Charlie Summers <charlie(_at_)lofcom(_dot_)com>
Subject: You bet there is. (Was: Is there something wrong here?)
To: Robert Campbell <poohba(_at_)io(_dot_)com>,
Procmail List <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>

At 9:13 PM -0400 10/13/00, Robert Campbell is rumored to have typed:

I had separate rc's for these but then I put them together.  Is this okay?

   It's ok to put seperate rc's together, but what you're doing just ain't
right. Observe:

:0 c:  # We're copying here because we're going to do something with the
       # same letter later, I assume?
* condition one
* condition two
* condition three
{
   # Assuming we've matched all conditions, we now have a clone of the letter
   # running through the recipies here...

   :0
   deliver-to-file

   # The clone has been delivered into the so-named file.

   :0
   ! an address  # Can NEVER succeed, since the clone was already delivered;
                 # remember, this entire braced set will work on the _same_
                 # clone of the email you created in the outlying recipe;
                 # I _think_ you wanted to do something completely different
                 # (but I'm not sure)
}
# The brace above closes the copy's conditional...so procmail will
#  now begin looking for a new recipe with the original copy of the mail;
#  remember _now_ that the first recipe that delivers this original will
#  END procmail's run, no matter how many other recipies you add to the
#  rc file.

# Notice - no conditions preceeding the next block -
# these braces are unnecessary and incorrect
{
   :0
   * condition one
   action one
}

# Notice - no conditions preceeding the next block -
# these braces are unnecessary and incorrect
{
   :0
   * condition one
   action one
}

   No wonder procmail is giving you "Skipping {" errors; you have no
conditions preceeding the last two blocks, so those braces are going to trip
procmail up. I don't even know why you're using braces there at all.  And
VERBOSE=ON should have _clearly_ pointed you to the first "Skipping {" line
number, which would have permitted you to find the braces mistakes, anyway.
(Wouldn't have helped on the clone delivery error, though, since it's
syntactically correct even though practically wrong.)

   I have to be honest, I'm not _exactly_ sure what you're trying to do.
Perhaps your first step should be thinking through _exactly_ what you want to
happen to your mail; you don't have to build anything as fancy as a
flowchart, but you _do_ need to get a solid idea of what you want to happen;
once you have that, you can write your recipies accordingly. I'm guessing
you're not a programmer by profession, since you are making simple nesting
and syntactical errors. Step back from the programming for a second, sit down
with a cup of coffee, soda or whatever, and run through in your mind exactly
what you want to happen to the mail. You'll find it time well spent.

Do or Do Not.  There is no try.  (Yoda)

   Better quote - Try, Try Again. (Charlie, who looks almost as wizzened, but
not quite so green)

         Charlie



--__--__--

Message: 13
To: jello <jello(_at_)lava(_dot_)net>
Cc: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
From: guenther+procmail(_at_)gac(_dot_)edu
Subject: Re: sendmail & mail directory creation
Date: Sat, 14 Oct 2000 03:17:29 -0500

jello <jello(_at_)lava(_dot_)net> writes:
I've got two questions that I didn't see answered in the procmail
pointers page:

1)  In the authenticate.c file, I see that #define MAILSPOOLHASH line
where you can say 0,1, or 2 will attempt to deliver to
/var/spool/mail/b/a/bar* , but what if I wanted to change where it
attempts to deliver the mail when I define 2?  Ideally, I'm looking to
deliver to:    /var/mail/b/a/bar*  (taking spool out of the path).

Umm, just change the values for both MAILSPOOLDIR and MAILSPOOLHASH:


#ifndef MAILSPOOLDIR
#define MAILSPOOLDIR    "/var/mail/"           /* watch the trailing / */
#endif
#ifndef MAILSPOOLSUFFIX
#define MAILSPOOLSUFFIX ""            /* suffix to force maildir or MH style 
*/
#endif
#ifndef MAILSPOOLHASH
#define MAILSPOOLHASH   2      /* 2 would deliver to /var/spool/mail/b/a/bar 
*/
#endif


2)  Take a look at the following transcript from an attempt to deliver an
email with the hashing turned on:

   procmail: Couldn't create "/var/spool/mail/a/r/arghya" 
   procmail: Lock failure on "/var/mail/a/r/arghya.lock"
   procmail: Error while writing to "/var/mail/a/r/arghya" 550 5.0.0
   <arghya(_at_)mail(_dot_)blah(_dot_)com>... Can't create output

I see that procmail is trying to create something (that currently
doesn't exist), but does it have the power to create the directories
necessary for delivery?  Namely a/r inthe example above?  If so is there
anything I have to do to help facilitate it?

You'll need to create all the /var/mail/[a-z]/[a-z] directories.  The
first level should all be mode 755 and the second level should be mode
1777.  The following shell script will do it for you:

      #!/bin/sh
      letters='a b c d e f g h i j k l m n o p q r s t u v w x y z'
      for i in $letters
      do
          mkdir -m 755 /var/mail/$i 2>/dev/null
          for j in $letters
          do
              mkdir /var/mail/$i/$j 2>/dev/null
          done
          chmod 1777 /var/mail/$i/?
      done

If you allow numbers or other non-letter characters in the first two
characters of usernames then you should add them to the "letters" list
above.


Now, why doesn't procmail know how to create these itself?  Well,
because we haven't gotten around to teaching it how, and it's such an
easy problem to fix when it comes up.  Doing it correctly would require
some extensions to the internal interface to the src/authenticate.c
file, but it should be possible.  It's not a high priority, so don't
hold your breath...


Philip Guenther
procmail maintainer

--__--__--

Message: 14
To: "Nathan Martinez" <nathanm(_at_)aaesys(_dot_)com>
Cc: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
From: guenther+procmail(_at_)gac(_dot_)edu
Subject: Re: Bounce mail after quota soft limit reached
Date: Sat, 14 Oct 2000 03:26:26 -0500

"Nathan Martinez" <nathanm(_at_)aaesys(_dot_)com> writes:
I want to limit incoming mail to the users' soft disk quota limit.  The
reason for this is due to the nature of Qpopper, I have to have twice the
space available for each user so that it can make a copy of the spool file.

You can recompile qpopper to use a different directory to store the
temporary files.  Or perhaps you should switch to a POP server that
doesn't require such a temporary file.  Both cucipop and the pop server
that comes with the UW-imap server meet that criterion by rewriting the
mailbox in place.


Philip Guenther

--__--__--

Message: 15
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Mail local
Date: Sat, 14 Oct 2000 03:28:17 -0500
From: Philip Guenther <guenther(_at_)gac(_dot_)edu>

Michelangelo Pisa <michelangelo(_at_)osny(_dot_)com(_dot_)br> writes:
...
If  I to execute:
# procmail  "user"

Shown this message:
ELF interpreter /usr/libeexec/ld-elf.so.1 not found
Abort trap

In the directory don't has the file , how I install it?

That procmail binary was not compiled on the same platform (OS +
hardware) as the machine you're trying to run it on.  Recompile and
reinstall procmail on the machine you want to run it on.


Philip Guenther

--__--__--

Message: 16
To: jasonc(_at_)webpipe(_dot_)net
Cc: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
From: guenther+procmail(_at_)gac(_dot_)edu
Subject: Re: Adding Envelope Headers to m4 conf file for Procmail
Date: Sat, 14 Oct 2000 03:38:04 -0500

"Jason Cox" <jasonc(_at_)webpipe(_dot_)net> writes:
Sorry if this is a bit off-topic but I was wondering if anyone would know
how to do this.  I added the following headers to my sendmail.cf file in the
Format Headers section:
HX-Envelope-From: $g
HX-Envelope-To: $u

This allows procmail to work with BCCs.  My question is, how can I alter the
m4 conf file so I don't have to add these changes again the next time I
rebuild the sendmail.cf file?  Is it possible?  I'm thinking it could be
done with the define() but I wouldn't know which macro to use.

This question should really be addressed to the comp.mail.sendmail
newgroup, but...

Use the LOCAL_CONFIG section.  For example:

      FEATURE(`local_procmail', `/usr/bin/procmail')
      # other stuff here...
      LOCAL_CONFIG
      HX-Envelope-From: $g
      HX-Envelope-To: $u
      divert(-1)

The "divert(-1)" ends the LOCAL_CONFIG section.

Philip Guenther



--__--__--

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


End of procmail Digest



----

"You know what I'm gonna do?  I'm gonna take my foolish pride, get it on a
southbound freight and let it _ride_."
                                        The incomparable Tom Jones


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail