Recently I’ve had a big increase in spam from gmail itself, so I wanted to whitelist only the people I want to hear from gmail.
All the people who mail me
grep “^From:” /var/mail/nick » whoknocks.txt
All the people who mail me using gmail
grep “\@gmail.com” whoknocks.txt » just_gmail.txt