Use Gmail for just outgoing email and replies

For my own privacy, I avoid using free mail services like Gmail and instead run my own mail server (hosted at Brightbox, a very trustworthy cloud server provider here in the UK ;). I do use one or two other Google services which means I have a Google account which means I do actually have a Gmail address. I also have an Android phone and that has the Gmail app preinstalled… by this point you can surely see that I should give up any pretense of privacy, but I prefer clinging onto it’s remaining delicate threads. It provides an illusion of dignity otherwise missing from the Internet.

Anyway, so I happen to have a pretty convenient email account available to me when I’m mobile whether I want it or not. I don’t want to connect it to my own IMAP server, but I don’t want to start sending mail from a Gmail address as it will end up in people’s address books and they’ll start sending new mail there instead.

So I’ve found a compromise: I’ve configured my Gmail account to let me send email from my personal email address (and set up the associated SPF DNS records too). And I’ve configured by own mail server to forward back any *replies* to my Gmail address. So whilst I’m out and about, I can *send emails using Gmail if I need to and read any replies to that email*. But new email direct to my personal address is never seen by Google.

I use maildrop, so my filtering rules are in the mailfilter language:


if ( ( /^In-Reply-To: .*mail.gmail.com/ || /^References: .*mail.gmail.com/ ) && hasaddr("john@johnleach.co.uk") )
{
cc "!mygmailaddress+reply@gmail.com"
}

Any emails that are replies to Gmail emails and are to (or cc) my personal email, get forwarded on to Gmail (to an alias I can use to avoid any forwarding loops).

I could also check the Message-ID header for gmail.com to detect new incoming email that had originated from a Gmail account anyway – the logic there is that Google have already seen it, so my privacy has already been invaded; I may as well get something out of the bargain. Worth noting that replies to my replies to incoming email from Gmail will hit my reply forwarding rule anyway.

Leave a Reply