Security considerations for find

Read about the security considerations for find. Find is a *nix tool for searching though directories for files and filtering them to build lists or run commands.

While I’m here I might as well show you my latest find command, I think it’s a beauty. :)

sudo find . \
  \( \( \( \! -user jj5 \) -or \( \! -group jj5 \) \) \
    -execdir chown jj5:jj5 '{}' \+ \) , \
  \( \( -type d \( \! -perm -u+rwx \) \) \
    -execdir chmod u+rwx '{}' \+ \) , \
  \( \( -type f \( \! -perm -u+rw \) \) \
    -execdir chmod u+rw '{}' \+ \)

SpamAssassin whitelist and blacklisting

Today I figured out how to specify whitelist and blacklist email addresses in SpamAssassin.

At the end of /etc/spamassassin/local.cf I added two lines:

include whitelist
include blacklist

Then in the /etc/spamassassin/whitelist file I added some email specifications, e.g.:

jj5@sixsigma:~$ cat /etc/spamassassin/whitelist
# Allow email from system services, e.g. from
# logwatch@hope.progclub.net or root@charity.progclub.org
whitelist_from *@*.progclub.*
# Similarly for blackbrick:
whitelist_from *@*.blackbrick.com

The /etc/spamassassin/blacklist file exists and is ready to go, but I haven’t blacklisted anything yet:

jj5@sixsigma:~$ cat /etc/spamassassin/blacklist
# No email addresses blacklisted yet.
#blacklist_from someone@example.com

Too easy.

There’s some more information on Whitelising a user.

At some point I hope to write a script that processes my users’ maildirs and whitelists everyone they’ve emailed.