procmail
[Top] [All Lists]

Re: 'Folder: bounced '

2005-01-06 17:49:07
On Fri, Jan 07, 2005 at 12:14:26PM +1100, Adam Bogacki wrote:

[Dallman wrote:]

No.  I recognized Ruud's style.  I also recognized where
it was changed/mangled/corrupted/appended to.  :-)

Hmm .. at that stage I had not the time or opportunity to
change, mangle, corrupt, or append to it. But let that pass ..

Well, Ruud wouldn't write (copied out of previous post)

NL = '
     '  # contains only a literal newline

with the spaces on the second line.  (Actually, they seem to be
tabs in the copy of the email I've saved, but I'm not sure if
the originals you had were tabs or spaces.  I've changed them to
spaces here for illustration, though.)  So anyway, if you didn't
put them in, then it must be something with the editing program
or copy-and-paste process you're using or something.  The comment


Which means (as I said last week): file/path permissions to not
allow adam to write to that target.

adam(_at_)Tux:~10:57:04$ chmod go+w .procmailrc

..should do the trick. Correct me if I'm wrong.

Nope.  The .procmailrc is the "instruction file" for procmail.
It only needs to be readable.  It was fine as it was, or procmail
wouldn't produce anything at all.  You certainly do not want it
to be other-writeable, as that is a gaping security hole.  It
seems from what you've talked about here that you're the only
user on your machine, so this is only a mistake and not a
horrible breach of security.  :-)  But put it back, please.

  chmod go-w,ugo-x .promcailrc

You wanted to modify the *target* that procmail will write to.
That is the file, "adam-procmail.log".


  SHELL = 'bin/sh'

You need a leading slash! "/bin/sh".  This is important.  If you
don't fix it, procmail has no shell and cannot perform shell ops.

Thanks. Fixed. I don't have a comp sci background & appreciate the
learning process.

I don't mind helping you learn.  I ask only two things.  One,
don't throw out your common sense and natural thinking power just
because you're in a new area where you're a tyro (newbie).  That's
the most important thing anyone should try to remember.  That means
that, even if you can't make heads or tails of some of the syntax
we're throwing at you, you should smell a rat if, for example,
a variable is set with a comment that says "# contains only a
literal newline"; but you see something else -- i.e., other
whitespace -- inside the quotation marks.  Be on the lookout!
Don't take everything anyone (including me) feeds you at face
value.

This also means that, even if you feel like you're swimming in
a pool of India ink and can't see a thing, you will still want to
try to read through the lines of output that the various diagnostic
routines are spitting out and that you're posting.  If they are
showing an error condition, ask yourself (and us here) why.

The second thing I would ask is that you don't slip into a lazy
habit of not doing any research on your own, but of hoping that
others will always come to the rescue.  I'm not saying you're
guilty of this!  I am writing a general two-rule set for what I
think the minimum is for people who come here and are serious
about getting help and learning something.  This is not a
statement of what I think you have been doing, however.

Everybody starts somewhere.  Some people have the training you
implied, and it is certainly easier for them.  I will tell you
here that I have no CS degree!  I studied comparative literature,
and then law.  But I fell in love with computers in 1979
(Radio Shack Model I, bought used) and with programming, and
have done a bit of the latter ever since and taken some college
courses in it.  And taught a couple of beginner programming
courses, even!

Procmail is not a complex language; nor is it anything but
the flattest of flat languages.[1] (Even in BASIC, you can
skip backwards and forwards.  Not so with procmail, though you
can recurse and fork new processes.)  On the downside, it is
"brittle," as languages go.  It's got its oddities, and its
warts.  But it's fast and small and, in some ways, a tiny wonder.
You can learn the essentials about it and get along just fine
for 95% of your needs.

[1] *flat*
    Refers to structures that are not hierarchical
    such as a single list of items. It also refers to
    structures that do not contain explicit pointers to
    other structures.  [_Computer Desktop Encyclopedia_,
    1981-2004 Computer Language Company Inc., via GuruNet's
    one-click desktop client]

Now, as for the problems we've been helping you work on, I don't actually
recall when you first wrote, but I seem to have the date of 9 December 2004
in my head for some reason.  It's not important, except that I want to
note that it's been a few weeks now; and you're still kind of buried
in some interconnected problems that you haven't quite got straightened
out.  That's okay -- not a condemnation!  But I want to make a suggestion.
My suggestion is to slow down, back up, and start slowly.  Take away
your current /etc/procmail and .procmailrc.  Start with a new slate.
And add one line at a time, or one recipe at a time, until you see that
each thing you've added is working.  Within a day or two you'll have it
all back in place, working the way you want it to!

 
Update .. There is now a 'Trash' folder in /home/adam/Mail, probably
due to deletion of the space in the Mailman recipe.  Hopefully

I suspect it's because you fixed the SHELL (/bin/sh, with the leading
slash).

Finally, I would advise you to tackle next running what I call a "test
harness" and what Sean Straw and many others call a "sandbox."  (Same
thing, different terminology.)  Then you won't have to wait for new mail
all the time to see if things are working.  Nor will you have to test
changes on a live system.  You can put beta code in a test rcfile,
run it in test mode, and see if it works.

You can do this by any of various ways.  One way is to go to Sean Straw's
page that he advertises in his .sig on posts to this lists, and read
about his sandbox and implementing it.  Another way is to use the
"point-n-shoot" Bourne-shell script I wrote that is a diagnostic tool
I package with Virus Snaggers(tm).  I recently added the ability to
run any rcfile to that script.  Instant test harness!  Here is a
sample:

 1:30am [~] 572[0]> cat helloworld.rc
################## My First Test ##################

  :0
  * ^To:.*dman@
  { KILROY = "was here!" }

################ End of First Test ################



 1:31am [~] 573[0]> vsnag.point-n-shoot.sh --rcfile helloworld.rc message|\
    grep KILROY
procmail: Assigning "KILROY=was here!"

-- 
dman [ http://vsnag.spamless.us ]

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>