You are not logged in.

#1 2008-11-14 04:12:17

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Imap mail box: Getmail >> Procmail >> Mutt ?

Hey there,

I am trying to find a good tutorial or something that helps me to setup my local mail client...

I want to use getmail to get my emails from an imap inbox (easy). Next I want to sort the mails depending on mailing lists for example using procmail (do I even need that?). And eventually I want to read everything with mutt....

Is there something out there to help me? smile

Offline

#2 2008-11-14 04:27:48

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

This uses fetchmail instead of getmail, but it should be pretty similar:
http://www.linux.com/feature/146613

(w00t, 500 posts tongue)

Last edited by fukawi2 (2008-11-14 04:31:41)

Offline

#3 2008-11-14 04:35:41

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

I used this for pop, but imap is there too.
http://wiki.archlinux.org/index.php/Mut … or_MailDir

Offline

#4 2008-11-14 04:36:57

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

Wait, I don't want to set up an entire IMAP server... I just want to get the emails that are on my university's (IMAP) server and read them.
Also, I want my emails to be accessible even when I am offline. I thought, getmail is able to do that: it gets my mails, and synchronizes them. Is that correct?

And then I need some program that distributes all the messages in my INBOX to different folders, based on certain rules (say, it's a mailing list). For that I wanted to use procmail. Would that be right?


Or do I have to setup an IMAP server and missing the point right now?

Offline

#5 2008-11-14 05:01:36

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

I don't think you need to set up another IMAP server. I can't help you with your sorting, but if you want your messages to remain online as well as locally, consider using offlineimap instead of getmail.

Offline

#6 2008-11-14 11:28:29

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

Yes - sorry I didn't explain in my first post... Just don't do the Dovecot part of that guide. Just do the fetchmail / getmail and the procmail parts...

Offline

#7 2008-11-14 17:52:47

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

Wait wait... a few things. IMAP is made nicely so that you can access it without downloading. If you actually WANT to download it, I'd HIGHLY recommend offlineimap for that. Otherwise, mutt can access imap mailboxes directly without pre-downloading

Offline

#8 2008-11-14 20:46:21

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

+1 for offlineimap; i'm using it as a go between for gmail and mutt. 

i have these two lines at the top of muttrc:

#source ~/.mutt/muttrc.imap
source ~/.mutt/muttrc.offline

then i specify the connection options for imap.gmail.com or ~/Mail as a Maildir (synced via offlineimap) in the sourced files separately; i just connect whichever way i want by switching the #.

some points to consider:
direct IMAP means you get your email on mutt almost instantly, but navigating large indexes is painfully slow and changing folders or logging in/out all takes way too long for me.  it also would hang and freeze on me often, very annoying.  i'd say, take the time to set up offlineimap anyway and leave it run even if you're connecting directly for the time being; think of it as a backup solution for your gmails.

offlineimap is what i really use exclusively now.  set it to sync as often as you like so you don't have to wait long for mail, but the actual use is wicked fast, starting/reading/saving/moving/etc.  plus i have offline access to all my mails/attachments. 

as far as gmail goes, i recommend setting up msmpt separately for sending (makes for a cleaner muttrc) and make sure you "unset record" in your muttrc because gmail smtp saves a copy to Sent Mail anyway.  Also, gmail hates it when you mess with All Mail; i recommend avoiding the local version of that folder entirely.

i've combed through all the google results and put together a pretty useful set of dot-files for my particular set up, if you're interested.

Last edited by brisbin33 (2008-11-14 21:05:31)

Offline

#9 2008-11-14 21:29:06

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

There's a good use case for using getmail instead of, or in addition to, offlineimap. It depends on where you want your email to sit after it's first fetched. It sounds like the OP wants the mailing list email to STAY on the IMAP server after being fetched. For mail like that, I'd +1 the recommendation to use offlineimap. I actually use both offlineimap (for part of my IMAP tree) and getmail (for another part of it). I have my IMAP server filter all my mailing list mail (it can tell because it's all addressed to aliases, not my main email address, but there are other ways to filter) to a specific folder, which offlineimap is configured to ignore but getmail is configured to fetch from (and only from there). Getmail is also configured to delete the mail after fetching it (I think that leaving it on the server is also possible, but I may be wrong). That way all my mailing list mail ends up only on my local machine. There's so much of it that that's what I want.

If you use offlineimap, I don't know how to work procmail into the equation. I doubt that you can do that on the client side. But I don't know.

If you use getmail, then you can easily work procmail or any other filtering agent into the delivery chain. Getmail documents that pretty well. But you may not need a separate filtering agent: getmail has some rudimentary filtering abilities of its own. For example, if you can arrange to have a bunch of email aliases all pointing to your account, and you subscribe to each mailing list with a different alias, then getmail can be configured all on its own to sort that mail into separate folders. This is how I've got myself set up and it works well.

Offline

#10 2008-11-28 11:07:16

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: Imap mail box: Getmail >> Procmail >> Mutt ?

Thank you for all the replies! I was very busy and did not find any time to dig into this any further.

Reading your thoughts on the topic, you convinced me that offlineimap would probably the best solution to go for.

Ad brisbin33:
I would be highly interested in your files, though your ftp doesn't seem to be accessible right now.

EDIT: It's not down... It just takes ages to load. ^^ Thank you!

Last edited by Stalafin (2008-11-28 11:09:41)

Offline

Board footer

Powered by FluxBB