Monitoring e-mail while respecting someone’s privacy

My kids each have their own e-mail address. As they are still very young and not using checking their e-mail very frequently, my wife and I would like to be able to monitor what is happening while still respecting their privacy. They each have their own logins and we do not want to check their e-mail, but we do want to know what is happening and at least be aware that they received certain e-mails (i.e. reminders from the library that they need to return books).

Today I have implemented a simple solution for this using SIEVE rules using the folowing script:


require ["enotify", "variables"];

# Store the sender in a variable
if header :matches "From" "*" {
    set "from" "${1}";
}

# Store the subject in a variable
if header :matches "Subject" "*" {
    set "subject" "${1}";
}

# And notify the parent
notify :message "NAME has new mail from ${from}: ${subject}"
                           "mailto:user@mydomain.tld";

The script above simply stores the sender and subject in a variable and then uses the enotify SIEVE extention to notify a user by e-mail. This way we get notified of a new e-mail and know who sent it and what the subject was, without ever seeing the e-mail itself.

Please note that this script requires a mail server supporting SIEVE, e.g. Cyrus or Dovecot with SIEVE plugin, contact your system administrator to find out if you can use this. For a list of clients to manage rules, see this list.