Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
where does courier-imap store mail?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dav1d
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 134

PostPosted: Mon Apr 05, 2004 8:40 pm    Post subject: where does courier-imap store mail? Reply with quote

Maybe I don't understand all of this properly (even though it is all working fine), but I searched and couldn't find this out.

At the moment I have my server fetching mail from my isp's pop3 server, my hotmail, yahoo mail and also my free hotpop server. I use getmail to retreive mail from my isp's pop3 server and hotpop server, fetchyahoo to get my yahoo mail, and I also use getmail via hotwayd to get my hotmail.

Both getmail and fetchyahoo pass the mail onto procmail which sorts all 4 different mail origins into folders. I run courier-imap and view the imap mail from either mozilla thunderbird or squirrelmail.

Now it's probably me being dumb, but where is the actual mail stored on the server? I have checked in my .maildir and its not there, and I've checked in /var/spool/mail and it's not there either.

The reason I am asking is that I want to be able to run a cron job on the IMAP mail after it is 7 days old to move it to a different IMAP folder (archive), but I don't know what files to run it on. Or is there a better way of archiving my IMAP mail automatically?
Back to top
View user's profile Send private message
nat
Apprentice
Apprentice


Joined: 04 Sep 2002
Posts: 205

PostPosted: Mon Apr 05, 2004 8:52 pm    Post subject: Reply with quote

try with
Code:

ls -la


The mail are in hidden directories, with the names starting with a .

like .Trash .Sent
Back to top
View user's profile Send private message
dav1d
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 134

PostPosted: Mon Apr 05, 2004 9:00 pm    Post subject: Reply with quote

That still doesn't show any mail. The .Trash, .Sent and .Drafts folders show up, but not any other folders I have created (like my Hotmail folder), and no mail shows up in them.
Back to top
View user's profile Send private message
NightSpirit
n00b
n00b


Joined: 27 Sep 2003
Posts: 71
Location: North London, UK

PostPosted: Mon Apr 05, 2004 9:00 pm    Post subject: Reply with quote

Some common locations for mail are:
~/.maildir
~/.Maildir
~/mail

Will really depend on how you setup your mail server tho.
_________________
Currently playing with Applescript ... hmmm
Back to top
View user's profile Send private message
dav1d
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 134

PostPosted: Mon Apr 05, 2004 9:06 pm    Post subject: Reply with quote

I've only got the .maildir folder. Procmail says it puts the mail in $HOME/.maildir/, but I can't find it there. Does courier-imap move it after that?

Or alternatively, is there any easier way to archive my old IMAP mail?
Back to top
View user's profile Send private message
NightSpirit
n00b
n00b


Joined: 27 Sep 2003
Posts: 71
Location: North London, UK

PostPosted: Mon Apr 05, 2004 9:11 pm    Post subject: Reply with quote

Hmmm. what is the output of
Code:
ls -a ~/.maildir/
?
_________________
Currently playing with Applescript ... hmmm
Back to top
View user's profile Send private message
dav1d
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 134

PostPosted: Mon Apr 05, 2004 9:13 pm    Post subject: Reply with quote

Code:
david@sagittarius david $ ls -a ~/.maildir/
.   .Drafts  .Trash               courierimapsubscribed  cur  procmail.log
..  .Sent    courierimapkeywords  courierimapuiddb       new  tmp
Back to top
View user's profile Send private message
NightSpirit
n00b
n00b


Joined: 27 Sep 2003
Posts: 71
Location: North London, UK

PostPosted: Mon Apr 05, 2004 9:26 pm    Post subject: Reply with quote

OK, it looks like that is where you email is stored, although the hotmail folder should also have been in that list as ".Hotmail" Are you sure that folder is still there in your IMAP client?

Your "inbox" email SHOULD be visable by running:
Code:
ls -a ~/.maildir/cur/


You should see a list of files that look a bit like:
Code:
1080752583.H319255P3118.host.domain:2,S


These are your emails :)
_________________
Currently playing with Applescript ... hmmm
Back to top
View user's profile Send private message
dav1d
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 134

PostPosted: Mon Apr 05, 2004 9:29 pm    Post subject: Reply with quote

OK - this is really weird, but the emails are showing up now properly. I don't know what may have happened but it might have been a lost ssh connection to the server, and I may have been looking for them on my pc without realising I was no longer in the ssh session :roll:

So now I can see them, but the file names are all weird. Is there an easy way of distinguishing when they were sent?

Or is there any easier way of doing this so I don't have to code my own cron job?
Back to top
View user's profile Send private message
NightSpirit
n00b
n00b


Joined: 27 Sep 2003
Posts: 71
Location: North London, UK

PostPosted: Mon Apr 05, 2004 9:46 pm    Post subject: Reply with quote

Well there is the file datestamp that tells you when the file was created on the hard drive (i.e. when you recieved the file). Alternatively you can find when the email was sent by:
Code:
grep Date: 1080752583.H319255P3118.host.domain\:2\,S

Or some other simlar way.

Not sure if moving them via script would work ok as it's not something I ever needed to do. I only move mail manually via the imap client.
_________________
Currently playing with Applescript ... hmmm
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum