Ir para o conteúdo
ou

Software livre Brasil

 Voltar a Blog
Tela cheia

Using Gmail anti-spam with mutt

29 de Março de 2012, 17:53 , por Software Livre Brasil - 0sem comentários ainda | Ninguém está seguindo este artigo ainda.
Visualizado 2 vezes

OK, this is not another post on how to use Mutt and Gmail. This is just to comment on a feature I found in Mutt that was not obvious, and that helped me to stop running my own anti-spam tool.

So, for a number of reasons, my company stop filtering spams. I was setting up dspam to take over that job when I decided that it was just too much pain for a single account. Besides, although I am spammed a lot, I would never possibly be more efficient than Gmail anti-spam, given the load of emails their users classify everyday.

I am not migrating my old emails over to Gmail, though. And I am pretty comfortable with my current email work-flow… I am simply not going to use a webmail (even one as powerful as Gmail). OK, I am using GNOME 3 after being a Fluxbox and Bluetile user, but everything has a limit…

But how to keep the best of both worlds? And, more important, how to do that with minimum disruption of what I already have (my own IMAP server and Mutt managing my account there as spoolfile)? The answer is a little known trick using the “mailboxes” directive in .muttrc.

This directive accepts a fully-qualified imap mailbox address. So I just added something like:

mailboxes 'imaps://gmail-user:gmail-password@imap.gmail.com:993/[Gmail]/Spam'

and added some shortcuts to save email from my inbox to that mailbox (the same as train-as-spam) and to rescue email from it (the same as train-as-ham):

macro index <F3> ";Wo;Wn;simaps://gmail-user:gmail-password@imap.gmail.com:993/[Gmail]/Spam\n" "Train as SPAM"
macro index <F4> ";Wo;Wn;simaps://gmail-user:gmail-password@imap.gmail.com:993/INBOX\n" "Train as HAM"

and that was it. In my IMAP machine I got a fetchmail downloading emails from Gmail’s INBOX so I can get trained-as-ham and new emails (all emails arrive first in my Gmail account) into my IMAP server. All my sieve rules are in place and nothing changed in my email work-flow.

It’s been working flawlessly for a week now. The only drawbacks are (1) Gmail knowing everything that arrives to me (not a big deal, since unencrypted emails aren’t private anyway), and (2) not getting the spam-count once Mutt is run: I have to change into that mailbox to log-in to Gmail.

Update: Mar 30, 2012 @ 18:15: I just found out that drawback number (2) above can be fixed by adding the following to .muttrc:

unset imap_passive

Fonte: http://www.nardol.org/2012/03/29/using-gmail-anti-spam-with-mutt/

0sem comentários ainda

Enviar um comentário

Os campos são obrigatórios.

Se você é um usuário registrado, pode se identificar e ser reconhecido automaticamente.