Last active
April 26, 2020 19:53
-
-
Save flat235/4253d360feb5861ad7ed8db21a277701 to your computer and use it in GitHub Desktop.
Revisions
-
flat235 revised this gist
Feb 10, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,5 +10,5 @@ sa-update --allowplugins sa-compile --quiet # learn from cur dirs only, mails, that are still new can be sorted into spam/not spam folders before being learned from # exclude deleted maildirs find $MAILROOT -name 'cur' -type d '!' -iregex ".*${DELETEDDIRS}.*" -iregex ".*${SPAMDIRS}.*" -exec sa-learn --no-sync --spam {} >> /dev/null \; find $MAILROOT -name 'cur' -type d '!' -iregex ".*${DELETEDDIRS}.*" '!' -iregex ".*${SPAMDIRS}.*" -exec sa-learn --no-sync --ham {} >> /dev/null \; -
flat235 revised this gist
Feb 7, 2017 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,14 @@ #!/bin/bash # where are the maildirs? MAILROOT=/var/vmail/ DELETEDDIRS='deleted-maildirs' SPAMDIRS='Spam' # update rules sa-update --allowplugins # compile rules (for speed) sa-compile --quiet # learn from cur dirs only, mails, that are still new can be sorted into spam/not spam folders before being learned from # exclude deleted maildirs find $MAILROOT -name 'cur' -type d '!' -iregex ".*${DELETEDDIRS}.*" -iregex ".*${SPAMDIRS}.*" -exec sa-learn --no-sync --spam {} \; find $MAILROOT -name 'cur' -type d '!' -iregex ".*${DELETEDDIRS}.*" '!' -iregex ".*${SPAMDIRS}.*" -exec sa-learn --no-sync --ham {} \; -
flat235 created this gist
Feb 7, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash # where are the maildirs? MAILROOT=/var/vmail/ # update rules sa-update --allowplugins # compile rules (for speed) sa-compile --quiet # learn from cur dirs only, mails, that are still new can be sorted into spam/not spam folders # exclude deleted maildirs find $MAILROOT -name 'cur' -type d '!' -iregex '.*deleted-maildirs.*' -iregex '.*spam.*' -exec sa-learn --no-sync --spam {} \; find $MAILROOT -name 'cur' -type d '!' -iregex '.*deleted-maildirs.*' '!' -iregex '.*spam.*' -exec sa-learn --no-sync --ham {} \;