Tolga | 1 Oct 12:11 2007
Picon

Re: One works, other doesn't


> I am not a sysadmin, so don't state the following with
> absolute authority.  But I would use at least 755 for /var/log/
> and make sure the procmail.log therein is at least 644.
> Or if it's not the owner doing the writing to the file,
> then 666 or something minimally required for the user who
> writes to the file.
>   
/var/log/ is already 755 and procmail.log is already 644.

--

-- 
Stay with *nix :)
Dallman Ross | 1 Oct 12:21 2007

RE: One works, other doesn't

Tolga wrote Monday, October 01, 2007 12:11 PM:

> [Dallman Ross wrote:[1]]
> > I am not a sysadmin, so don't state the following with
> > absolute authority.  But I would use at least 755 for /var/log/
> > and make sure the procmail.log therein is at least 644.
> > Or if it's not the owner doing the writing to the file,
> > then 666 or something minimally required for the user who
> > writes to the file.
> >   
> /var/log/ is already 755 and procmail.log is already 644.

Yes, and that is the problem, as you made clear enough in a
follow-up when you stated that the failed writes were coming
from users' .procmailrcs, not the /etc/procmailrc.  Thus we
have a case of a non-privileged user trying to write to a
file where he only has read permissions.  I detailed that
possibility in the part of my message you didn't quote.
But I didn't know for sure at the time what your situation
was.  Since you have meanwhile confirmed that to be the case,
we now can see that is the source of your trouble.

A nonprivileged user will not be able to write to a file
not owned by him chmodded to 644.  You would need at least
646.

[1] You are deleting attributions of who said what you quote.
Please do not do that.

Dallman
(Continue reading)

Tolga | 1 Oct 12:28 2007
Picon

Re: Recipe not working


> That's your postfix log; what about your procmail log?
> That's what we normally want to see.
>   
At last (with some help) I got some logs. Here they are:

procmail: No match on "^From:.*owner-postfix-users <at> postfix.org"
procmail: Invalid regexp "^Subject:.*Postfix log summary of (to|yester)day)"
procmail: Match on "^Subject:.*Postfix log summary of (to|yester)day)"
procmail: Assigning "LASTFOLDER=pflogsumm"
procmail: Opening "pflogsumm"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "tolga <at> 6441:/home/tolga/pflogsumm"
 From root <at> ozses.net  Mon Oct  1 13:32:20 2007
 Subject: Postfix log summary of today
  Folder: 
pflogsumm                                                        9431

Regards,

--

-- 
Stay with *nix :)
Tolga | 1 Oct 12:30 2007
Picon

Re: One works, other doesn't


Dallman Ross wrote:
> Tolga wrote Monday, October 01, 2007 12:11 PM:
>
>   
>> [Dallman Ross wrote:[1]]
>>     
>
> [1] You are deleting attributions of who said what you quote.
> Please do not do that.
>   
I don't quite understand :(
> Dallman
> ____________________________________________________________
> procmail mailing list   Procmail homepage: http://www.procmail.org/
> procmail <at> lists.RWTH-Aachen.DE
> http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
>   

--

-- 
Stay with *nix :)
Klaus Johannes Rusch | 1 Oct 12:34 2007
X-Face
Picon

Re: Recipe not working

Tolga wrote:
>> That's your postfix log; what about your procmail log?
>> That's what we normally want to see.
>>   
>>     
> At last (with some help) I got some logs. Here they are:
>
> procmail: Invalid regexp "^Subject:.*Postfix log summary of (to|yester)day)"
>   
There is an extra closing bracket, probably meant to be

^Subject:.*(Postfix log summary of (to|yester)day)

--

-- 

Klaus Johannes Rusch
KlausRusch <at> atmedia.net
http://www.atmedia.net/KlausRusch/
Dallman Ross | 1 Oct 12:58 2007

RE: One works, other doesn't

Tolga [mailto:tolga <at> ozses.net] wrote Monday, October 01, 2007 12:30 PM:

> Dallman Ross wrote:
> > Tolga wrote Monday, October 01, 2007 12:11 PM:
> >
> >> [Dallman Ross wrote:[1]]
> >>
> >
> > [1] You are deleting attributions of who said what you quote.
> > Please do not do that.
> >
> I don't quite understand :(

Last week you were not trimming your posts but quoting back
the entire message.  That has been frowned upon on this list
since the beginning (about 14 or 15 years ago!), so I asked
you to trim more thoughtfully.  You did!  I was glad about that,
and I thank you.  But then you started quoting back [my]
words without leaving in the line stating who it was who
said the thing quoted.  (I put them back in with editor's
brackets and the note.)  That, too, is frowned on.  (It isn't
about ego, as someone said last year or so who pointedly
refused to attribute quotes properly; it's about "ownership"
of words, and it’s about helping the readers follow the
thread; but more important, it's about being able to
evaluate, as an active reader, the plausibility of what
was said.  For example, if a longstanding list member who
has repeatedly demonstrated good knowledge about the area
being discussed gives an opinion about what might be wrong,
it could be worth more "reader mips" than if a self-professed
(Continue reading)

Dallman Ross | 2 Oct 02:17 2007

RE: Recipe not working

Klaus Johannes Rusch wrote Monday, October 01, 2007 12:34 PM:

> Tolga wrote:
> > procmail: Invalid regexp "^Subject:.*Postfix log summary of 
> (to|yester)day)"
> >   
> There is an extra closing bracket, probably meant to be
> 
> ^Subject:.*(Postfix log summary of (to|yester)day)

(Again:) What I wrote to him was this:

  * ^Subject:.*Postfix log summary of (to|yester)day

He stuck the extra closing parenthesis on the end, and thus
it wouldn't work.

Your suggestion would work as well (if we put the "*" back
in at the front of the condition); but the extra set of
parens is not necessary and, to my eye, muddies the waters.

Dallman
Tolga | 2 Oct 09:35 2007
Picon

Separate files instead of one file

Hi,

After a lot of struggling and a lot of help, I managed to get my 
messages to be written. However, they are written to separate files now. 
What I want is to have messages written to files like pflogsumm, 
postfix, mrtg etc. instead of separate files. I know I told you before 
that they were folders, but I failed to mention that they are actually 
files. Please help me with this.

Regards,

--

-- 
Stay with *nix :)
Dallman Ross | 2 Oct 16:45 2007

RE: Separate files instead of one file

Tolga wrote Tuesday, October 02, 2007 9:35 AM:

> After a lot of struggling and a lot of help, I managed to
> get my messages to be written. However, they are written to
> separate files now.  What I want is to have messages written to
> files like pflogsumm, postfix, mrtg etc. instead of separate
> files.

Please show a sample recipe that is not doing what you want
and a sample verbose log extract.

Basically, if you write to an object that is a simple file,
it will be saved and stored as it sounds like you want -- as
an "mbox"-style folder.  If you write to a directory,
it will save in separate files -- either saves under "legacy"
procmail-style directories where the files start with "msg."
and end with random unique strings, or (if you have appended
a slash to the end of the folder name) maildir-style folders,
or (if you've appended a slash-and-dot) MH-style folders.

"man procmailrc" explains the various choices and how to select
them or choose plain old mbox folders instead.  As I just stated,
flat mbox-folders are just ordinary files.  Use a lockfile (second
colon in the initial recipe line):

   :0:
   * condition
   mbox-file_here

>From the man pages:
(Continue reading)

Tolga | 2 Oct 18:15 2007
Picon

Re: Separate files instead of one file


> Please show a sample recipe that is not doing what you want
> and a sample verbose log extract.
>   
My log:

procmail: [17119] Tue Oct  2 19:15:47 2007
procmail: Assigning "PATH=/home/tolga/bin:/bin:/usr/bin:/usr/local/bin"
procmail: Rcfile: "/home/tolga/.procmailrc"
procmail: Assigning "MAILDIR=/home/tolga"
procmail: Assigning "DEFAULT=/var/mail/folders/tolga"
procmail: Assigning "MAILDIR=/var/mail/tolga"
procmail: Couldn't chdir to "/var/mail/tolga"
procmail: Assigning "MAILDIR=."
procmail: No match on "^From:.*owner-postfix-users <at> postfix.org"
procmail: Match on "^Subject:.*Postfix log summary of (to|yester)day"
procmail: Assigning "LASTFOLDER=pflogsumm"
procmail: Opening "pflogsumm"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "tolga <at> 44165:./pflogsumm"
 From root <at> ozses.net  Tue Oct  2 19:15:47 2007
 Subject: Postfix log summary of today
  Folder: pflogsumm

My recipe:

DEFAULT=/var/mail/folders/$LOGNAME
MAILDIR = /var/mail/$LOGNAME
:0
* ^Subject:.*Postfix log summary of (to|yester)day
(Continue reading)


Gmane