Walter Haidinger <walter(_dot_)haidinger(_at_)gmx(_dot_)net> writes:
:0:someuser.lock
* <condition>
| cat >> /var/spool/mail/someuser
You mean:
:0:
* <condition>
/var/spool/mail/someuser
should do it. Well, almost: a `chown someuser /var/spool/mail/someuser'
needs to be added to the recipe too.
Assuming that "someuser" is an actual user in the password file (I haven't
been following this thread, some maybe that isn't true here), then
the following is probably better:
:0
* <condition>
|procmail -d someuser
That lets procmail's very tricky "screenmailbox()" routine take care of
bogus mailboxes in a secure fashion.
Also, very safe due to procmails file locking capabilities.
But IMHO not as safe as forwarding because another sendmail delivering
to /var/spool/mail/someuser is not locked out, or is it?
If not, this may corrupt the mailbox.
Sendmail only delivers directly to files through aliases that say things
like:
whatever: /some/local/file
Under normal circumstances, sendmail calls the local mailer to actually
store mail in a file, and since that's procmail (right?), there shouldn't
be a problem.
Also, sendmail 8 does kernel level locking when it does deliver directly.
Philip Guenther