[BBLISA] Gmail hacks

Tom Metro tmetro+bblisa at gmail.com
Sat May 25 16:33:48 EDT 2013


Theo Van Dinter wrote:
>     * I created a catch-all "alias" user
>       who receives all of the mail to unknown addresses.  Then in that
>       user account, I configure filters to forward mails as appropriate
>       to other accounts.

So if I'm following the gist of what you did - as a way to work around
Google's limited number of aliases and mapping rules - you funneled all
mail to a catch-all mailbox, and then used server-side mail filtering
rules within that account to redistribute the messages to other users as
desired.

That's an impressive hack, but sounds painful. Enough so that one has to
ask whether Google Apps was a suitable choice for this.


>        Anything else falls into the alias user's inbox.  I can
>        decide whether to blackhole+delete, or add to the forward
>        list... 

So items not matching a rule just went into the catch-all user's inbox?
Didn't that get overwhelmed with junk? Did you never experience a
dictionary attack?

I would have expected your last filtering rule to be one that discards
(or rejects) any message not matching a prior rule.

How does this setup handle a situation when the sender makes a typo when
sending to a legit user? In the traditional setup, seconds after sending
 the message the sender will get a bounce returned explaining the error.
It sounds like in your setup the message will end up in the catch-all
mailbox and eventually processed (manually forward to the correct user)
when you check on it.


> I also hit a bug where the account would receive mail so quickly that 
> gmail couldn't clear out the Trash, so eventually I hit the max mailbox 
> size.

These messages ending up in trash are primarily just the copies of
messages being forwarded on elsewhere? (In other environments you
wouldn't even need to delete such messages, but I guess with Google's
"archive everything" attitude, that's necessary.)

I gather you have some options set to automatically purge the Trash folder.

I tend to treat Google Apps as purely an IMAP provider and rarely ever
use the web UI, and thus have no need for mail being archived in the
cloud. Plus privacy concerns. So I periodically login to the web UI and
purge the archived messages.

I've seen settings added in recent years that imply you can configure an
account to purge messages as soon as they've been removed from the inbox
by an IMAP client, but I've yet to be able to get that to work as I'm
expecting.


> It's not perfect -- sometimes the account gets so much mail that gmail
> starts temp rejecting via rate limiting.  Spammers probably won't retry,
> but legit senders will, so the mail will eventually get through.  

Not a surprising occurrence, and minor consequence for a moderate to low
volume site. It's no worse than gray listing.


> To deal with that, I created a second alias account...
> then reaimed the catchall there instead until the
> first account was quiet enough to empty the Trash.

I'm not following how this would fix it. Are you saying you did this
momentarily? Or that your first account got "stuck" in a full state and
even with manual intervention you couldn't clear the Trash, so a 2nd
account was necessary?


It seems like your technique could be applied in a bit different way for
sightly different advantages and disadvantages: instead of using
filtering rules on Gmail to perform the sort and forward, using some
client-side tools over IMAP to process the catch-all account.

Pros: you get Google's spam filtering and web mail UI, while you can
have substantially more sophisticated rules, and likely maintain them
better. Even though you'll be dependent on a client-side tool, it should
be resilient to temporary loss of connectivity, and will just spool
messages in the catch-all inbox, not unlike a backup MX.

Con: you have the inefficiency of transferring every message to a client
machine and then back to Google (there are ways to do this efficiently
within IMAP, but unlikely to be supported by Google); you're dependent
on a client machine; creating client rules is likely more work
(especially if you write your own tool); and you still have a danger
that the account quota might be exceeded before you get everything
processed and Trash purged.

Just as thought...I don't think I'd recommend it.

 -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/



More information about the bblisa mailing list