On Oct 18, 1999, David DeSimone wrote:
> Eric Smith <[EMAIL PROTECTED]> wrote:
> >
> > Byrial -  
> > | mutt -f folder-to-expire -e 'set delete;push D~r>20d<enter>q'
> > 
> > Been looking for something like this for ages - great to put into a
> > cron job script that iterates through a list of folders.
> 
> I don't think this will work from a cron job, because there will be no
> connecting tty, and Mutt will not be able to initialize cursses.  Do
> things like this really work from cron?

I have following two files and they seem to be working for me.  But I'm
relatively new to Linux, so it's probably not the best way to do it.


/etc/cron.daily/muttxpr:
#!/bin/sh

cd /home/ay903
if [ -x /home/ay903/.muttxpr ]; then
su ay903 -c "/home/ay903/.muttxpr" >/dev/null
fi


/home/ay903/.muttxpr:
#!/bin/sh

mutt -f =folder-to-expire -e 'set delete;push D~r>20d<enter>q'
mutt -f =folder-to-expire -e 'set delete;push D~r>20d<enter>q'

[Note: I had to put an equal sign in front of the "folder-to-expire" to
get it to work with my setup, which has all of the folders in ~/Mail.]

Reply via email to