LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Store mail local and view with several mail clients... (https://www.linuxquestions.org/questions/linux-software-2/store-mail-local-and-view-with-several-mail-clients-178124/)

elluva 05-05-2004 07:28 AM

Store mail local and view with several mail clients...
 
Owkay, in the past, I had some problems with email, so I'd like to store my mail in one directory and be able to view it with several mail clients from that local dir.

How should I do this? Fetchmail?

any advise is appreciated,
elluva

hw-tph 05-05-2004 07:31 AM

Fetchmail is probably the best solution as it does just what you ask for and it is a rock solid program that is widely used, so getting support (if needed) is usually just a quick Google search away.


Håkan

elluva 05-05-2004 09:56 AM

yes, well I googled my way through and it seems that fetchmail stores the emails in /var/spool/mail/<user>, isn't it possible to change this directory to somewhere in my homedir?
Another thing, how do you set up your mail client to read the mails from this local dir (lets say kmail)?

tnx for the fast reply

elluva 05-05-2004 10:34 AM

Now I managed to configure fetchmail so it get's my email from the server, the first thing I'd like is to be able to get it into kmail, how?

elluva 05-06-2004 12:16 PM

anybody any idea's? plz help :D

hw-tph 05-06-2004 03:18 PM

I have never used Kmail, but isn't there some sort of account "local" account type (as opposed to IMAP or POP3)? There are several possibly types, like UNIX mbox format, Maildir, local delivery and so on.


Håkan

elluva 05-07-2004 05:28 PM

yes, but I can't seem to figure out what this fields stand for:
locking method (choice between procmail, Mutt dotlock, Mutt dotlock privileged, FCNTL, None

Matt Collier 05-07-2004 05:36 PM

it's how you want to lock the mbox while you use it, most clients have their own way, kmail just lets you choose, depending upon what permissions you have and preference.
i prefer fcntl myself, since virtually everything supports this as a standard, so if a time comes where you write your own scripts to play with your mail, it's supported nicely

elluva 05-08-2004 03:30 AM

k, tnx

I will try it and if I still have problems, I'll ask them here ;)

elluva 05-08-2004 09:41 AM

ok, so I filled in the fields, I mailed myself and managed to get it using fetchmail. Then I tried to read it using kmail, but kmail doesn't notice the new mail. Not even when I explicitly ask him to look (File -> Check Mail).

When I copy an mail I had previously to /var/mail/<username> , then it does receive... how do I resolve this?

hw-tph 05-08-2004 12:55 PM

How is your fetchmail setup? I have two different setups - on my laptop I have fetchmail setup to deliver mail using procmail (actually copying the files to ~/mail/mbox). On my desktop it uses standard local delivery as I have an MTA for local use installed. This means fetchmail connects to my own machine and delivers the mails to username@localhost, so they end up in my /var/spool/mail/$USER directory.

All this is pretty easy to set up using fetchmailconf, which comes with fetchmail.


Håkan

elluva 05-08-2004 07:05 PM

the only thing i've set up is fetchmail, nothing else (with fetchmailconf). Can you maybe post your procmail config file? This way, I could be able to put my mail in my home dir and maybe kmail is able to read that mbox file...

I noticed another option in kmail, 'local maildir'. Does anybody know what this means?

tnx,
elluva

hw-tph 05-09-2004 06:42 AM

This is my $HOME/.procmailrc config file. This is setup to filter all mails through SpamAssassin, so it's quite a bit larger than you would need:
Code:

SHELL=/bin/bash
PATH=/bin:/usr/bin
PMDIR=$HOME/.procmail
LOGABSTRACT=all
MAILDIR=$HOME/mail
LOGFILE=$PMDIR/proclog
VERBOSE=off
DEFAULT=$MAILDIR/mbox

# SpamAssassin start
:0fw: spamassassin.lock
| /usr/bin/spamc

:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\
spam10

:0:
* ^X-Spam-Status: Yes
spamassassin-spam
# SpamAssassin end

...and here is my .fetchmailrc (edited of course):
Code:

# Configuration created Thu May  6 00:59:47 2004 by fetchmailconf
set postmaster "recipent@mycomputername.com"
set bouncemail
set no spambounce
set properties ""
poll pop.mymailprovider.com with proto POP3
      user 'remoteusername' there with password 'yeahasifidpostthat' is 'localusername' here options fetchall
          mda "/usr/bin/procmail -p -f %F"

Maildir is an excellent option and depending on your MTA setup that is possibly how your mail is delivered by fetchmail.

Håkan

elluva 05-09-2004 09:59 AM

tnx, this worked... ok, now I can read my mail with KMail. Procmail wasn't set up properly. ;)

The thing I wanted in the first place was having some central mailbox, which I can read my mail from with different mail clients (eg. KMail & Evolution & Sylpheed & Pine& ...). (see my first post)

How could I set this up, since Kmail now still moves my mail to its own dir.

Thanks for all help,
elluva

elluva 05-10-2004 10:12 AM

plz, can't be that nobody knows this...

g452 05-10-2004 02:44 PM

tell me somthing

does fetchmail retrieve emails from servers to a persons local pc and then later u use a email client to "download" it to your mail client from let's say /var/log/user ??? cause i dred going online checking my mail everytime i go online, i am looking for something that downloads mail to a central point without me having to open any email viewer like kmail or the sort and then i can check it at a later time when it is convienient to me ????

if that is true that fetchmail does whot i hope it does then i will be joining u elluva ... :D :D :D :D

laterz

hw-tph 05-10-2004 03:43 PM

fetchmail can be configured to use pretty much any delivery type you want. You can schedule it to download your mail every hour, or how often and however you want.

Try using the mbox format, most email client support reading it. That's how I have it setup, but on the other hand right now I only use Pine to read my mail.


Håkan

elluva 05-11-2004 07:08 AM

Well, I now use fetchmail to download my email to /var/log/mail/username and then procmail gets it to my home folder in mbox format in a single file /home/username/mail/mbox. It does this very well. I think this is what g452 wants a this is what I wanted as well. Now the thing I'd like is just to read my mail from that location. Now KMail still takes my mail out of the file and into my KMail mail folder.
This isn't what I wanted, though I know it has to be possible, 'cause this is one of the reasons why fetchmail is so popular (or not?). Still I can't seem to find how you can configure your mail client so you don't have this problem...

hw-tph 05-11-2004 07:54 AM

Sorry, I am not familiar with KMail so I cannot really help you with that. One option that is common in email clients is "Leave messages on server" (instead of deleting them when you have read them) but perhaps this is only available for POP3?


Håkan

elluva 05-11-2004 09:10 AM

that's indeed only with pop3, it really is a kmail thingie, since I installed evolution and there I didn't have that problem with the same options... Maybee, I'll just stop using kmail...

elluva 05-11-2004 09:14 AM

hey, I just thought of something... is it possible to make procmail deliver mail in the maildir format? Since kmail saves its mails in Maildir, I could just let them come in the same dir...

g452 05-11-2004 01:31 PM

well - i just had a swing at fetchmail and after some trial and error i got it to deliver mail to /var/spool/mail/&user - yipee ! - i checked in with mutt and gkrellm sais there is mail -

i never was a kmail fan - somehow never could get it to do whot i wanted and recently discovered evolution - and well haven't looked back since -

i think me and fetchmail gonna be very good friends cause i don't need to download emails anymore FM does it for me so all i have to do later is use evolution and read it !!!

i am strugling though with one thing i have slack 9.1 installed on 2 seperate partitions so they work individually - the first one is the full install and the second is full install for the exception of gnome and kde and xfree86 for the reason of trying out dropline gnome - now thing is this on the first clean install i can run fetchmailconf gui but the dropline system that is the same as first but only with dropline can't run FMconf ?? y is this ?? does it need xfree86 or something cause it complains bout python Tkinter and there is not much diff between the two installs ??? any ideas ???

btw - how do i run fetchmail at startup like a deamon ?????? or rather can it be done - besides for configuring fetchmail i don't want anything more to do with it except for it to fetch(my)mail ... :D :D :D :D :D :D

laterz

elluva 05-11-2004 04:27 PM

put in your .bash_profile:

fetchmail -d 300

300 specifies the number of seconds between 2 checks on mail, so this will result in a check after every 5 minutes...


All times are GMT -5. The time now is 11:10 PM.