[Dovecot] Question: email system architecture

Andrew Basterfield bob at cemetery.homeunix.org
Wed Aug 18 03:16:00 EEST 2004


On Tue, 17 Aug 2004 23:40:53 +0100
Keith Edmunds <keith at midnighthax.com> wrote:

> On Tue, 17 Aug 2004 20:20:31 +0200
> Gland Vador <glandvador at yahoo.com> wrote:
> 
> > If a user see a "good" mail in 
> > his spam folder (or vice-versa) he will take this mail and move to
> > his inbox folder. But, I want to be able to say to spamassassin to
> > learn that this message is ham, with the command sa-learn
> 
> Run a daily (or nightly) cron job to run something like (this is for
> Maildir mailboxes with spam in a "_SPAM" folder, but you can adapt it
> as required):
> 
> ------------------cut here-------------------
> #!/bin/bash
> find /home -type d -name cur | while read a; do
>         echo "Processing $a..."
>         if [ echo $a|grep _SPAM/cur ];
>         then
>                 sa-learn --spam "$a"
>         else
>                 sa-learn --ham "$a"
>         fi
> done
> -----------------------------------------------

why #!/bin/bash?

I see nothing there that won't work with #!/bin/sh

bash bad, think POSIX not Linux

--andrew



More information about the dovecot mailing list