procmail
[Top] [All Lists]

Re: Resending using formail from the command line

2002-06-03 15:56:04
Udi pointed out,

| Anyway, I think that '*' will take lockfiles, tmpfiles, strangefiles
| and directories, to avoid this I use the "-d" in ls(1) and "[a-z0-9]*"
| in sed(1).

I see your point, and I see how you took care of strange names and lockfiles,
but I think you still let the names of directories pass (though using ls -d
kept them from having their own contents listed).  Anyhow, it's easy enough to
fix the script:

#!/bin/sh
cd /var/mail
for user in *
do
  case "$user" in
  *[!a-z0-9]*) continue ;;
  esac
  test -f $user -a -s $user && formail -s procmail -d $user < $user
done



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail