Please forgive me if this is somewhere in TFM (and feel free to refer me
if it is). This is definitely a "procmail newbie" question.
I am trying to work out the best way to get mail for the various accounts
on my system with a minimum of user co-ordination and a minimum of phone
calls.
I've eliminated, therefore, the various user cron files that used to call
popclient to get mail every few hours and have replaced them with an ip-up
script that gets called from a crontab process:
echo "up" >/etc/diald.ctrl
and which does successfully dial my ISP when it is supposed to, and, most
of the time, hangs up properly when it is done, too.
My ip-up script then looks like this:
/usr/sbin/sendmail -q
/usr/bin/popclient -3 -s -u user1 -p password1 -c pop.mindspring.com |
formail -s procmail -d user1
/usr/bin/popclient -3 -s -u user2 -p password2 -c pop.mindspring.com |
formail -s procmail -d user2
(etc... line breaks for readability only...)
Which, amazingly enough, also works. Or at least it seems to have placed
the few messages I just got in the middle of the night into the right
places.
My questions are:
(1) Have I, in principle, done something horribly wrong with this master
cron scheme? Like, God forbid, blasting a huge hole in my security? (I'm
aware of the inherent security problem of putting passwords on command
lines as above, as anyone logged on to my system could run a "ps" and see
everything. I don't know how to fix that particular problem, though.)
(2) Is this the most efficient way to do this when each user has his/her
own .procmailrc file? Does the -s belong in formail? Does procmail care
whether its messages arrived split like this?
(3) Would there be anything better/worse about making the popclient
processes into background processes (still with &?) rather than concurrent
ones? (That is, if user1 has 300 messages and user2 has 2, and both
happen to be logged on at the moment, is there a SAFE way for user2 to get
his/her messages in parallel with user1 rather than have to wait for user1
to finish?)
(4) Is this more or less how procmail is supposed to work, or is there
anything about this that will die horribly under a high message load...?
I know that some of these issues are procmail and some are not, but I hope
I can be forgiven for the general nature of the questions.
Thank you all for any help you can give!
Eliot Sabath-Levitt