Mostrando postagens com marcador mutt. Mostrar todas as postagens
Mostrando postagens com marcador mutt. Mostrar todas as postagens

terça-feira, abril 14, 2009

Usando Mutt com GMail

O Gmail é o melhor serviço de e-mail e o Firefox é o melhor browser. Mas, se tu mantiveres a página do Gmail aberta por um longo período, o Firefox consumirá muita memória do teu computador.

Se tu tens uma máquina antiga como a minha, tu sabes que cada byte é importante. Assim, eu decidi voltar a usar meu antigo cliente de e-mail: mutt (http://www.mutt.org/).

Aqui eu mostro os passos que tu precisas fazer para que o mutt possa acessar o Gmail usando o protocolo IMAP.

Eu estou usando o Ubuntu 7.04 com o mutt 1.5.13, mas o que for dito aqui deve funcionar com qualquer distribuição.

Tu deves substituir meu_email@gmail.com e minha_senha com o teu e-mail e senha do GMail.

  1. Primeiro tu tens que habilitar o acesso via IMAP para a tua conta do Gmail. Para habilitar o IMAP faça assim:
    1.1. Logue na tua conta do Gmail.
    1.2. Clique em Configurações no topo da página do Gmail.
    1.3. Clique Encaminhamento POP/IMAP.
    1.4. Selecione Ativar IMAP.

  2. Instale o mutt, o msmtp and o ssl. Não vou mostrar como fazer isso porque este passo é diferente para cada distribuição.

  3. Crie o arquivo de configuração do msmtp (~/.msmtprc) como mostrado abaixo:

    account default
    host smtp.gmail.com
    port 587
    from meu_email@gmail.com
    tls on
    tls_starttls on
    auth on
    user meu_email@gmail.com
    password minha_senha
    logfile ~/.msmtp.log

  4. Create mutt configuration file (~/.muttrc) as shown:

    set imap_user = "meu_email@gmail.com"
    set imap_pass = "minha_senha"

    set from = "meu_email@gmail.com"
    set realname = "Teu Nome verdadeiro"

    set folder = "imaps://imap.gmail.com:993"
    set spoolfile = imaps://imap.gmail.com:993/INBOX
    set record=""
    set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"

    set header_cache="~/.mutt/cache/headers"
    set message_cachedir="~/.mutt/cache/bodies"
    set certificate_file=~/.mutt/certificates
    set move = no
    set imap_check_subscribed="yes"
    set imap_list_subscribed="yes"
    set mbox="imaps://imap.gmail.com/[Gmail]/All Mail"
    # esta linha instrui o mutt a fazer o refresh da minha caixa de entrada a cada 60 segundos
    set mail_check=60
    #Estou usando o character ^ para dizer para o mutt atualizar imediatamente a lista de e-mails.
    bind index "^" imap-fetch-mail

Isso é tudo.

sexta-feira, fevereiro 29, 2008

Using Mutt with Gmail

Gmail is the best e-mail service and Firefox is the best browser. But if you keep Gmail's page open for a long time then Firefox will waste a lot of memory of your computer.

If you have an old machine like me, you know that each byte is important. So, I decided to come back to my old mail client: Mutt (http://www.mutt.org/).

Here I'm showing some steps you need to let mutt access Gmail with IMAP protocol.

I'm using Ubuntu 7.04 with mutt 1.5.13, but it should work with other distros.

You must replace my_mail@gmail.com and my_password occurrences with real values.

  1. First of all you must enable IMAP access to your Gmail account. To enable IMAP in your Gmail account:
    1.1. Log in to your Gmail account.
    1.2. Click Settings at the top of any Gmail page.
    1.3. Click Forwarding and POP/IMAP.
    1.4. Select Enable IMAP.

  2. Install mutt, msmtp and ssl. I won't show you how to do it because it is different for each distro.

  3. Create msmtp configuration file (~/.msmtprc) as shown:

    account default
    host smtp.gmail.com
    port 587
    from my_mail@gmail.com
    tls on
    tls_starttls on
    auth on
    user my_mail@gmail.com
    password my_password
    logfile ~/.msmtp.log

  4. Create mutt configuration file (~/.muttrc) as shown:

    set imap_user = "my_mail@gmail.com"
    set imap_pass = "my_password"

    set from = "my_mail@gmail.com"
    set realname = "Your Real Name"

    set folder = "imaps://imap.gmail.com:993"
    set spoolfile = imaps://imap.gmail.com:993/INBOX
    set record=""
    set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"

    set header_cache="~/.mutt/cache/headers"
    set message_cachedir="~/.mutt/cache/bodies"
    set certificate_file=~/.mutt/certificates
    set move = no
    set imap_check_subscribed="yes"
    set imap_list_subscribed="yes"
    set mbox="imaps://imap.gmail.com/[Gmail]/All Mail"
    # this line instructs mutt to refresh my IMAP mailbox every 60 seconds
    set mail_check=60
    #I'm using ^ character to instruct mutt to update e-mail list immediately
    bind index "^" imap-fetch-mail

And that's all folks.