up vote 2 down vote favorite
2
share [g+] share [fb]

How do I set up a email whitelist using only procmailrc to protect my kids from unwanted email?

I currently us the OS parental controls, but that is only good for the computer it is enabled on.

I understand that as my kids grow up, they'll figure out work arounds to any technical parental restrictions imposed upon them, but I want to at least understand the options that I have until then.

link|improve this question
I've done this for sending reminders to my phone - I'll post the recipe when I can ssh to my server :) – warren Sep 14 '09 at 12:33
added the whitelist recipe as promised :) – warren Sep 16 '09 at 12:59
Nice stuff. I'll have to try this out as well. – pave Sep 16 '09 at 13:07
feedback

2 Answers

up vote 1 down vote accepted

procmail can filter by the From header, and there are many recipe examples.

# This one discards all mail sent from the address below.
:0
* ^From: idiot@somehost.com
/dev/null

But don't forget that procmail only works with locally delivered mail. It won't affect mailboxes accessed over IMAP or webmail.

link|improve this answer
This is a blacklist recipe. Do you know how to do it the opposite? Such as only allow mail from certain addresses. – hanleyp Sep 5 '09 at 16:59
1  
Just change the recipe to use ${DEFAULT} as the mailbox, then add a second recipe that routes the rest to /dev/null. – grawity Sep 6 '09 at 8:07
Thanks. I'll accept the answer once I have a chance to try it out. – hanleyp Sep 9 '09 at 13:32
feedback

The one I use to send messages from myself to my phone:

VERBOSE=off
LOGFILE=/dev/null

# if it comes from a specific address(es), send to my cell
# it's be just as easy to whitelist a domain by adding another `|domain.tld` section to the bracketed regex
:0
* ^From.*[main.email.domain.tld|other.email.domain.tld]
* ^To.*datente
! 0000000000@vtext.com

# push everything else to my normal user
:0 
* .
! mainuser
link|improve this answer
also note: I intentionally only gather email sent to the one domain, not any others hosted on the same server – warren Sep 18 '09 at 5:23
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.