[clug] sorting /var/mail/$USERNAME ?

Nemo -earth native- nemo at cheeky.house.cx
Wed May 7 20:31:39 EST 2003


On Wed, May 07, 2003 at 12:20:25PM +0200, Andreas Bauer did utter:
> Hi there,
> 
> Is there a way to sort a /var/mail/$USERNAME spool file automatically
> into separate files when there is no local mail server running?  The
> /var/mail stuff comes from a NFS-mounted partition and fills the spool
> file "magically".  With no mail server running locally, I can't use a
> .forward file in combination with procmail, of course.

My /var/mail is similarly NFS mounted, but I run the appropriate
procmail filters on the server it's NFS mounted from...

> I'm thinking about a cron job now, or something similar.  Any
> suggestions?

I imagine that would work, though I don't know if you might run into any
race conflicts between your reading and clearing the spool, and hte
server locking it and delivering a new message... Assuming that's not a
problem, then I imagine `formail` is your friend. 

(if it could be a problem, then some means by which the mailbox can be
appropriately locked, messages moved, and unlocked automatically would
be needed, and none spring to mind)

.../Nemo
-- 
  ------------------------------------------ --------------------------
                                                    earth native


More information about the linux mailing list