View previous topic :: View next topic |
Author |
Message |
dav1d Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/66154368409fd75e832f1.png)
Joined: 31 Dec 2003 Posts: 134
|
Posted: Mon Apr 05, 2004 8:40 pm Post subject: where does courier-imap store mail? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nat Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1910005024412af9b92100a.png)
Joined: 04 Sep 2002 Posts: 205
|
Posted: Mon Apr 05, 2004 8:52 pm Post subject: |
|
|
try with
The mail are in hidden directories, with the names starting with a .
like .Trash .Sent |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dav1d Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/66154368409fd75e832f1.png)
Joined: 31 Dec 2003 Posts: 134
|
Posted: Mon Apr 05, 2004 9:00 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
NightSpirit n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10592933494024eef9263b8.jpg)
Joined: 27 Sep 2003 Posts: 71 Location: North London, UK
|
Posted: Mon Apr 05, 2004 9:00 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
dav1d Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/66154368409fd75e832f1.png)
Joined: 31 Dec 2003 Posts: 134
|
Posted: Mon Apr 05, 2004 9:06 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
NightSpirit n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10592933494024eef9263b8.jpg)
Joined: 27 Sep 2003 Posts: 71 Location: North London, UK
|
Posted: Mon Apr 05, 2004 9:11 pm Post subject: |
|
|
Hmmm. what is the output of ? _________________ Currently playing with Applescript ... hmmm |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dav1d Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/66154368409fd75e832f1.png)
Joined: 31 Dec 2003 Posts: 134
|
Posted: Mon Apr 05, 2004 9:13 pm Post subject: |
|
|
Code: | david@sagittarius david $ ls -a ~/.maildir/
. .Drafts .Trash courierimapsubscribed cur procmail.log
.. .Sent courierimapkeywords courierimapuiddb new tmp
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NightSpirit n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10592933494024eef9263b8.jpg)
Joined: 27 Sep 2003 Posts: 71 Location: North London, UK
|
Posted: Mon Apr 05, 2004 9:26 pm Post subject: |
|
|
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 ![Smile :)](images/smiles/icon_smile.gif) _________________ Currently playing with Applescript ... hmmm |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dav1d Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/66154368409fd75e832f1.png)
Joined: 31 Dec 2003 Posts: 134
|
Posted: Mon Apr 05, 2004 9:29 pm Post subject: |
|
|
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
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 |
|
![](templates/gentoo/images/spacer.gif) |
NightSpirit n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10592933494024eef9263b8.jpg)
Joined: 27 Sep 2003 Posts: 71 Location: North London, UK
|
Posted: Mon Apr 05, 2004 9:46 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|