On Mon, 3 Feb 1997, Doug Muth wrote:
I've checked, that procmail itself is called and it's working properly.
I simply used short .procmailrc, which contained:
:0 h c
* ! ^FROM_DAEMON
* ! ^X-Loop: zb(_at_)ispid(_dot_)com(_dot_)pl
|(/usr/local/bin/formail -r \
-A "Precedence: junk" \
-A "X-Loop: zb(_at_)ispid(_dot_)com(_dot_)pl"; \
echo "Mail received.") | $SENDMAIL -t
The same (of course, with replaced address in 'X-Loop' line) .procmailrc
in root's dir works fine. The permissions for /usr/local/bin/formail
allows any user to 'read & execute', although formail is owned by root and
of root group.
The permissions seem fine. Let's simply the recipe to something
like this:
:0
|(/usr/local/bin/formail -r -A "Precedence: junk" \
- -A "X-Loop: zb(_at_)ispid(_dot_)com(_dot_)pl"; \
echo "Mail received.") >>$HOME/test.mailfolder
and examine the contents of $HOME/test.mailfolder and see what's in
there. It may provide a clue as to what the problem is for non-root users.
Listen, listen all you people !!!!!!!!!! This man is great !!!!!!!! :)
Following your tip I made sure, that 'vacation' script, which you can see
at the very beginning will work, when I comment out the '* ! ^FROM_DAEMON'
line. When I left this line uncommented, I've got in 'from':
----------------------------------------------------------------------
procmail: [12007] Mon Feb 3 17:13:04 1997
procmail: No match on ! "(^(Precedence:.*(junk|bulk|list)|To: Multiple
recipients of |(((Resent-)?(From|Sender)|X-Envelope-From):|>?From
)([^>]*[^((_dot_)%(_at_)a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|
mmdf|n?uucp|LIST(SERV|proc)|NETSERV|owner|r(e(quest|sponse)|oot)|b(ounce|
bs\.smtp)|echo|mirror|s(erv(ices?|er)|mtp)|A(dmin(istrator)?|MMGR|
utoanswer))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>][^<)]*(\(.*\).*)?)?$([^>]|$)))"
----------------------------------------------------------------------
When I comment this line out I'm getting:
----------------------------------------------------------------------
procmail: Locking "/var/spool/mail/zb.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/zb"
procmail: Opening "/var/spool/mail/zb"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/zb.lock"
From root Mon Feb 3 17:15:18 1997
Subject: test 12
Folder: /var/spool/mail/zb 544
procmail: Notified comsat: "zb(_at_)1370207:/var/spool/mail/zb"
procmail: Unlocking "/home/zb/.lockmail"
procmail: Executing "(formail -r \
-A "Precedence: junk" \
-A "X-Loop: zb(_at_)ispid(_dot_)com(_dot_)pl"; \
echo "Mail received.")| $SENDMAIL -t"
----------------------------------------------------------------------
...so, it looks pretty good. But pay attention, that all the time I was
using example from man page (man procmailex). I think, we are at the end
of the puzzle, but the final question: what's wrong in '* ! ^FROM_DAEMON'
line ? How to replace it, to prevent mail-loops between daemons ? Simply
with '* ! ^daemon' (it seems so to me) ?
And why in man-page there is obviously broken example ? :(
pozdrawiam / regards
Zbigniew Baniewski