MLUG: [MLUG] procmail trick for Gmail
[MLUG] procmail trick for Gmail
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I mostly use Pine on a Solaris box (I know - RMS told me I should use Emacs for mail and I really should use Linux instead of Solaris, mostly because Linux is better than Solaris). Anyway, the point is that I also like to use Gmail. Everything that comes into the Solaris box goes straight to a Gmail account but it is also processed by procmail:

# cat ~/.forward
"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #mbmiller"EMAIL:PROTECTED

Now Gmail allows me to send mail with "From:" stating that it came from my Solaris box, which is perfect for when I can get access readily to Gmail and have trouble connecting to the Solaris box (e.g., in internet cafés in Ecuador). I also Bcc every outgoing Gmail to the Solaris box so that I have a record there. So Gmail is both a secondary email system and a back up email system.

Here's the trick (not all that tricky, probably): I want messages sent by me from Gmail to be put straight into my $DEFAULT procmail folder. Only the ones sent from Gmail though and not ones coming back at me from email lists but sent from the Solaris box. The following seems to work (but replace "obfuscated" with the email address from which I sent this message).

:0:
* ^From: "Mike Miller" <obfuscated>
* ^Received: from .*.google.com
${DEFAULT}

The "Received" line with "google.com" in it is always in the Gmail header. The "From:" line is always exactly the same, quotes and all, when it comes from Gmail.

Gmail has gotten much faster in recent months and it doesn't tend to produce annoying errors like it used to. I also find that I can search my Gmail using Google Desktop, which is a major convenience. All this adds up and Gmail is starting to really impress me. The fact that they can use my emails to target their advertising may be a good thing because it means that I might even find the ads interesting.

Mike
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members