💾 Archived View for rawtext.club › ~zilog › 2023-10-21-znews.txt captured on 2023-11-04 at 15:00:11.
-=-=-=-=-=-=-
Sat 21 Oct 2023 05:03:56 AM UTC Someone recently posted on 'gab' about getting spam on their RTC email account. It got me thinking about creating a simple whitelist for separating friends from foes. Noramlly one would use something like procmail but as there currently isn't such a tool on RTC I took a stab at writing one, in AWK naturally: $ head ~zilog/public_bin/onlyfriends #!/usr/bin/awk -f # ----------------------------------------------------- # onlyfriends :: a simple AWK-based MDA; email from # non-friends go to ~/Maildir/Spam/ # ----------------------------------------------------- # how to use: # 1) create ~/Maildir/Spam/{cur,new,tmp}: # $ mkdir -p ~/Maildir/Spam/{cur,new,tmp} # $ chmod 700 ~/Maildir/Spam/{cur,new,tmp} # $ chmod 755 ~/Maildir/Spam # # 2) create or edit ~/.forward file like so: # $ echo '|/home/zilog/public_bin/onlyfriends' > ~/.forward # $ chmod 640 ~/.forward # # 3) add address & domain fragments of friends to ~/.friends: # $ echo '@rawtext.club' > ~/.friends # $ echo 'membership@sdf.org' >> ~/.friends # $ echo 'sweetiepie@' >> ~/.friends # $ chmod 640 ~/.friends # Lines of code: 61 I've testing it a bit with my various email account and it appears to work as intended. I *think* it ought to work for others on RTC as well without further tweaks but that remains to be seen; perhaps I can get some testers.. Prior to this exercise I hadn't really looked into how Maildir-style email messages were created and processed; took a bit of trial and error to get my MUA (s-nail) to stop complaining.