I’m having a complete brain fart today… I cannot come up with how to pull this off for some reason - and my google-fu is weak right now, to boot.

I need to turn a directory search (folder only, no files) and then take ones that have “.SPAM.” in the path and pipe that into a command…

So this: 
> 	/var/mail/vhosts/domain.ltd/user.name/.SPAM.New


Needs to become this:
> 	/usr/bin/sa-learn --progress --spam /var/mail/vhosts/domain.ltd/user.name/.SPAM.New/*
> 	/bin/mv /var/mail/vhosts/domain.ltd/user.name/.SPAM.New/cur/* /var/mail/vhosts/domain.ltd/user.name/.SPAM.Scanned/cur/* 

And I’d like to have it in a bash or sh script that I can put into CRON.
Additional want: Change emails to read status. I realize that’s another step for the files involved and it could easily be skipped.

Thanks!

—
Ryan