Hi,
I have a question, see below, which someone was helping me with, but their answer does not really cover what I want to know, because they say they don't know how kmail works.
Anyone have a real/better/full answer to my question ?
Which is, in short :- what locking method should I use for Kmail to read a local mbox file that sendmail is delivering to ?
Extract from below:
I can't say how Kmail works. It should handle that case proper as long as there is a setup option to get the user's mail by accessing the mbox. You should not care about anything with that.
Yes, Kmail has an option to read 'local mbox' accounts - but you have to select the locking method for it - which one should I be using ?
Thanks, John.
> = Me (John) = reply
> According to sendmail doc, only if .procmailrc file exists will sendmail > deliver to procmail. I don't have any .procmailrc files, so I assume > procmail is not used. However, even if it was used, then as there are > no recipies to catch any emails, then they will all go to the default > spool file anyway.
In any way there must be an LDA configured in sendmail.mc. By default on Redhat and Fedora systems that is Procmail. It can be a different program as well, like Maildrop or the Cyrus deliver. Again, Sendmail does not store any message itself. That does the LDA (local delivery agent).
If you use no /etc/procmailrc or ~.procmailrc then you use no filtering, sorting or whatever is possible using Procmail. but Procmail is invoked to store the message in the mail spool.
> So the point is that all mail goes into a file:/var/spool/mail/USER
Right.
> I am only talking about 1 machine, my server. > It runs sendmail... which delivers incoming emails to local disk file > /var/spool/mail/USER. > I am asking about a local user, who uses Kmail to access the same > local disk file:/var/spool/mail/USER on the same machine.
> My understanding (expectation) is that if I have 2 applications reading > and writing to the same file on the same machine (same fs/disk), then > they should use some locking system - to stop them both accessing it > at the same time.
That is correct and the case.
> OK, only sendmail is writing to the file, but Kmail will remove it - so we
> should avoid conflicts ?
Procmail is writing and Kmail want to have full access, ok.
> So I hope that is a clear explanation of why I am asking: > > What locking method should I use ?
I can't say how Kmail works. It should handle that case proper as long as there is a setup option to get the user's mail by accessing the mbox. You should not care about anything with that.
> If the answer really is 'none', I'd be very surprised - but I'll trust your
> answer if thats the case.
You would only have to care if you intend to write your own mail client ;)
> I don't see how IMAP/POP are relevent in my situation - its all on a local
> fs/disk, so I don't think I'm running IMAP or POP (don't even know what
> IMAP is).
Even if you receive the mail by Sendmail on the same machine where you use Kmail you can use an IMAP/POP3 server. I just suggested that as it sounded to me as if you would get errors when using Kmail. Something like "cannot access because the file is locked". Then I would guess Kmail does not handle the situation proper and you should switch to an IMAP/POP3 server and setup Kmail to no access the mbox file but the IMAP/POP3 server.
> If I want to read mail from an outside source, I'll use (and have done) POP,
> and that works fine.
Ok, you could do that on the same machine as well.
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger