Udi Mottelo <uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il> writes:
I run this command as root:
Prompt# formail -s procmail ./.proc-clear -d bette < saved-messages
But, the messages are saved in root's folder not Bette's.
...
Any idea? I think thet I miss something from the man page.
Is the command line Okay?
As you discovered, that command line doesn't do what you want. Let's
take a look at the procmail usage:
callisto% procmail -h
Usage: procmail [-vptoY] [-f fromwhom] [parameter=value | rcfile] ...
Or: procmail [-toY] [-f fromwhom] [-a argument] -d recipient ...
Or: procmail [-ptY] [-f fromwhom] -m [parameter=value] ... rcfile [arg] ...
...
Note that you can't use the -d option with an rcfile on the command line.
That's the whole point of the -d option: perform normal delivery to the
indicated users. Procmail stops looks for option on the command line as
soon as it sees one of:
1) something that doesn't begin with a '-', which is interpreted as either
an rcfile name or a variable assignment (this is the first usage
shown above),
2) a -d option, in which case all the remaining arguments are recipient
logins (this is the second usage shown above), or
3) a -m option, in which case it considers looks at the rest of options
for the first one that _doesn't_ contain an '='. That one is the
rcfile, the ones before it are variable assignments, and the all the
rest show up in $1, $2, $2, etc (this is final usage shown above).
So, when procmail say the "./.proc-clear", it decided you were using
the first usage. The -d was considered an rcfile that you could switch
to using the HOST variable.
If you just want to deliver the messages to bette, applying the filters
in /etc/procmailrc (if any) and ~bette/.procmailrc, then simply use:
formail -s procmail -d bette < saved-messages
Otherwise, if you want to ignore the /etc/procmailrc and bette's
.procmailrc then you should su'ing to better and running formail and
procmail as her:
su bette -c 'formail -s procmail ./.proc-clear' < saved-messages
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail