Server side filtering (procmail?) with mailbox

General discussions and other topics.
3 posts Page 1 of 1
by tengel » Sun Jan 29, 2017 9:27 am
Heya all, brainstorm question.

I have one of my additional mailboxes configured as a receiver for all my GMail as a backup; GMail forwards all email over wholescale before it filters things on their side. Is there a way I can configure a Sonic server side filter to throw away patterns of things that isn't embedded into the webmail clients? Something like a procmail I presume, but the best I can find is the blacklist in the Spamassassin config for that mailbox. Remember this isn't my primary account login, it's one of the add-on mailboxes.

Real life problem: this GMail account can receive 100 emails a day from Facebook notifications. This overloads basic Sonic webmail filters if I let it go too long - Roundcube can't even handle it, Squirrelmail seems to have a 2000 limit per action (fuzzy, at least Delete). Squirrelmail dies when purging the Trash as well. Today's stats of cleanup (which I just sort of have to remember to log in and do every once in awhile) from Squirrelmail:

7426 INBOX emails total (I move all good ones to an "Archived" folder later)
6847 from Facebook to delete
4853 left after first delete button
2859 left after second delete button
865 left (works fine here)
Trash Purge == "ERROR: Connection dropped by IMAP server. Query: STORE 1:* +FLAGS (\Deleted)"

This is the type of mess I'm trying to automate on the server side - tossing facebook.com into the Spamassassin config is about the only way I'm seeing to tackle this... (I can't stop GMail from forwarding them). Can I put a .procmailrc somewhere to do this for me?
by drew.phillips » Mon Jan 30, 2017 9:26 am
Hi Tengel,

If you seem to be hitting limitations of Roundcube and Squirrel Mail, then filtering those messages server side seems like a good alternative unless you can have Gmail run filters prior to forwarding.

While it is possible to set up procmail on a mailbox, you'll need some help from Operations to do this. Procmail is really picky about the permissions and ownership of the .procmailrc so it needs to be owned by your mailbox user and have no group/world write permission. Since we don't permit shell/FTP logins with a mailbox account, we need to set up a special procmail file for your mailbox that "includes" a file from your main home directory where you'll write all your rules.

If you'd like to get this set up, feel free to PM me or send a message to [email protected] requesting that we set up procmail for your mailbox.
Drew Phillips
Programmer / System Operations, Sonic.net
by tengel » Mon Jan 30, 2017 1:05 pm
Heya Drew!

Roger that, I follow 100% - I'll pop an email over to support@ once I get back around to it, I can provide the general rule I want so as to have y'all proofcheck it at the same time. I don't touch procmail much these days, could definitely use a second set of eyes.

Thanks!
-te
3 posts Page 1 of 1