|
|
|
|
||||||
| comp.mail.imap Discussion of IMAP-based mail systems. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi, I'd like to install an IMAP server to access my local stored mailbox files. I don't need a new system/software/thing to get the mail from my mail provider. I'm happy with the current installation. I have different Mail accounts, all mails/accounts in different directories. I have pine running to access these directories, this works fine! Now I don't want pine to access these files in the directories, I want pine to access a IMAP server and the IMAP server to make the read/write of the mailbox files. I have downloaded UW IMAP, but was not able to access/read any mail with pine. As I understand, one has to tell the IMAP server where to read the mailbox files. I read in the documentation that it's possible to change the functions (definitions) where to read the mailbox files. But there I'm lost. I tried some directories/files from my system and recompiled the server but still wasn't able to read any mail. Now I prefer to keep UW IMAP with it's default configuration and change my Mailbox installation (as I know the internals of my mail system but not the one from UW IMAP). But what is the 'standard' way to store mails so that UW IMAP will be able to read it? Is it possible to access different mail directories with mail from different mail accounts as it is with pine reading the files and directories directly? Any appreciated, hints, documentation, Andreas |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
andreas wrote:
> I'd like to install an IMAP server to access my local stored mailbox > files. And those files are in which format? > I don't need a new system/software/thing to get the mail from my mail > provider. I'm happy with the current installation. And the current installation is...? At least you should say if you are working in a Unix environment, a Windows environment or whatever. > I have different Mail accounts, all mails/accounts in different > directories. I have pine running to access these directories, this works > fine! > > Now I don't want pine to access these files in the directories, I want > pine to access a IMAP server and the IMAP server to make the read/write > of the mailbox files. > > I have downloaded UW IMAP, but was not able to access/read any mail with > pine. As I understand, one has to tell the IMAP server where to read the > mailbox files. No, in general you don't have to tell UW IMAP anything (did you read the documentation?), it searches in the "usual" places for mailboxes. The "usual" being /var/mail or /var/spool/mail, maybe others. > I read in the documentation that it's possible to change > the functions (definitions) where to read the mailbox files. But there I'm lost. Yes, I usually change it to use a mail directory inside each user's home dir. That makes it cleaner when the user has many mailboxes. There are two ways to do that change: - Modify a string in the code, or - Create a file, /etc/c-client.cf which contains 2 lines: I accept the risk set mail-subdirectory mail All this is documented in the source code package. What it does is that the user's mailboxes are now in $HOME/mail, as in: /home/sample-user/mail/INBOX /home/sample-user/mail/Sent /home/sample-user/mail/Trash > I tried some directories/files from my system and recompiled the server > but still wasn't able to read any mail. > > Now I prefer to keep UW IMAP with it's default configuration and change > my Mailbox installation (as I know the internals of my mail system but > not the one from UW IMAP). But what is the 'standard' way to store mails > so that UW IMAP will be able to read it? Do you mean format or place? Formats handled by UW IMAP are mbox and other I don't remember. > Is it possible to access different mail directories with mail from > different mail accounts as it is with pine reading the files and > directories directly? The normal operation, where you have a SMTP mail server alongside your IMAP server, is that the SMTP server receives the mail and stores it in /var/mail/<username> and the IMAP server when requested by a mail client (pine in your case) reads that mailbox and optionally moves the messages to the user's mailbox (if the user's mailbox is somewhere else, as in the case above where I want it to be inside the user's home directory). The IMAP server may also move messages between mailboxes (not automatically but using the operations available on the client). If you notice the difference between the SMTP mailbox and the one that may be used by the IMAP server: the first one is named after the user, and it could be the only one used, but the IMAP server, probably under a mail client request, creates the main mailbox which is not always named INBOX as I showed above, sometimes is mbox, sometimes is the original (i.e. is not moved to the user's directory, only the other mailboxes are created there). I haven't looked into why different names are used, as I said it probably is a mail client request, but I've seen that it is different under Windows/Thunderbird, Solaris/Outlook, Solaris/GNUMail which are the ones I've used. > Any appreciated, hints, documentation, All the documentation is on the UW site, and also comes with the sources, some of it (the part not recommended) is in the c-client library. -- René Berber |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
andreas a@t mrs d.t ch wrote:
> I'd like to install an IMAP server to access my local stored mailbox > files. > > I don't need a new system/software/thing to get the mail from my mail > provider. I'm happy with the current installation. > > I have different Mail accounts, all mails/accounts in different > directories. I have pine running to access these directories, this works > fine! > > Now I don't want pine to access these files in the directories, I want > pine to access a IMAP server and the IMAP server to make the read/write > of the mailbox files. > > > I have downloaded UW IMAP, but was not able to access/read any mail with > pine. As I understand, one has to tell the IMAP server where to read the > mailbox files. I read in the documentation that it's possible to change > the functions (definitions) where to read the mailbox files. But there > I'm lost. > > I tried some directories/files from my system and recompiled the server > but still wasn't able to read any mail. > > Now I prefer to keep UW IMAP with it's default configuration and change > my Mailbox installation (as I know the internals of my mail system but > not the one from UW IMAP). But what is the 'standard' way to store mails > so that UW IMAP will be able to read it? > > Is it possible to access different mail directories with mail from > different mail accounts as it is with pine reading the files and > directories directly? > > Any appreciated, hints, documentation, UW-IMAP can work very well if your mailbox files are in the right place and (preferably) you are prepared to use mbx format. But the recommended way to change the mailbox location is to modify the source code and recompile - which isn't that difficult, but not everyone's idea of an easy configuration system. The normal mailbox locations are explained in the documentation files which come with the UW-IMAP package. Otherwise I'd suggest looking at Dovecot, which has a much more flexible configuration system. John -- John Allen Bofferdange, Luxembourg allen{at}vo{dot}lu http://www.homepages.lu/allen |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 3 Jun 2006 12:42:08 -0700, René Berber <rberber@mailandnews.com> wrote:
> andreas wrote: > > >> I'd like to install an IMAP server to access my local stored mailbox >> files. > > And those files are in which format? mbox I guess. Each file starts with the message "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA" But I'm not sure, whether the file format is relevant for my server setup. But then, I'm asking here, as I don't have a clue what is going on with this setup stuff. >> I don't need a new system/software/thing to get the mail from my mail >> provider. I'm happy with the current installation. > > And the current installation is...? > > At least you should say if you are working in a Unix environment, a > Windows environment or whatever. I'm running Linux, and some own scripts to get all the mails from the different mail accounts and store them in the correct mail boxes. <snip> >> I read in the documentation that it's possible to change the >> functions (definitions) where to read the mailbox files. But there >> I'm lost. > > Yes, I usually change it to use a mail directory inside each user's > home dir. That makes it cleaner when the user has many mailboxes. > > There are two ways to do that change: > > - Modify a string in the code, or > - Create a file, /etc/c-client.cf which contains 2 lines: > I accept the risk > set mail-subdirectory mail Well, this conflicted with pine, if running on the same system as the server. > All this is documented in the source code package. What it does is > that the user's mailboxes are now in $HOME/mail, as in: > > /home/sample-user/mail/INBOX > /home/sample-user/mail/Sent > /home/sample-user/mail/Trash I tried this anyway but I run into some other problem. I compiled UW-IMAP with some other default and creating /etc/c-client.cf both with no result. Then I started nmap and found out, that imap didn't have any port open at all (yes, I started imap as root to use the lower ports) Is there some --verbose option for imap? How does one find out what is wrong, if something does not work? >> I tried some directories/files from my system and recompiled the server >> but still wasn't able to read any mail. >> >> Now I prefer to keep UW IMAP with it's default configuration and change >> my Mailbox installation (as I know the internals of my mail system but >> not the one from UW IMAP). But what is the 'standard' way to store mails >> so that UW IMAP will be able to read it? > > Do you mean format or place? > > Formats handled by UW IMAP are mbox and other I don't remember. Standard place. But you gave the answer above being /var/mail/<username> or /var/spool/mail/<username>. <snip useful information> >> Any appreciated, hints, documentation, > > All the documentation is on the UW site, and also comes with the > sources, some of it (the part not recommended) is in the c-client > library. Ok, I'll check the source in this case. I read some of the files in the docs directory but they still left me with lots of questions. At the moment, I'm with the question as of why can't I see any open port of IMAP (with nmap). There is no log what might be wrong in my /var/log/* files. Thanks for your time and information! Andreas |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Wed, 07 Jun 2006 20:06:02 +0200, John Allen <allen{at}vo{dot}lu> wrote:
> andreas a@t mrs d.t ch wrote: <snip> >> I have downloaded UW IMAP, but was not able to access/read any mail with >> pine. As I understand, one has to tell the IMAP server where to read the >> mailbox files. I read in the documentation that it's possible to change >> the functions (definitions) where to read the mailbox files. But there >> I'm lost. >> >> I tried some directories/files from my system and recompiled the server >> but still wasn't able to read any mail. <snip> > UW-IMAP can work very well if your mailbox files are in the right > place and (preferably) you are prepared to use mbx format. But the > recommended way to change the mailbox location is to modify the source > code and recompile - which isn't that difficult, but not everyone's > idea of an easy configuration system. You're right, it's not as easy as I thought it would be. But it looks like it's my software that doesn't behave as expected (from a unix standard configuration point of view). Compiling the software is no problem for me, the difficult part will be to document the changes to re-apply them for a system update. So I guess, that's why lots of software can be configured with config files. They tend to survive software updates. > The normal mailbox locations are explained in the documentation files > which come with the UW-IMAP package. Well, if you know to look for /var/spool/mail/ you can find some entry in the FAQ, but not as an answer to where the mailbox files are stored. Anyway, is there some information on a mail setup under Linux (howto or something else?) > Otherwise I'd suggest looking at Dovecot, which has a much more > flexible configuration system. Thanks for your information. I'll look into Dovecot if I don't get UW-IMAP running the next few days. Thanks, Andreas |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
andreas a@t mrs d.t ch wrote:
> Well, if you know to look for /var/spool/mail/ you can find some entry > in the FAQ, but not as an answer to where the mailbox files are stored. > Anyway, is there some information on a mail setup under Linux (howto or > something else?) Andreas, I had a look at the files, and I think the information is sort of present in the CONFIG file in the "docs" folder. As I recall, in the unpatched state, on Linux, UW-IMAP assumes an INBOX in /var/spool/mail, and other folders are by default in the users home directory, ie for Linux something like /home/allenjo/ if allenjo is my username. Following the instructions in CONFIG, I patched my system and compiled it to use mbx format, with the INBOX and all other folders in /home/allenjo/Mail/. This worked fine for several years, until I switched to maildir and Dovecot. John -- John Allen Bofferdange, Luxembourg allen{at}vo{dot}lu http://www.homepages.lu/allen |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Fri, 09 Jun 2006 20:31:42 +0200, John Allen <allen{at}vo{dot}lu> wrote:
> andreas a@t mrs d.t ch wrote: >> Well, if you know to look for /var/spool/mail/ you can find some entry >> in the FAQ, but not as an answer to where the mailbox files are stored. >> Anyway, is there some information on a mail setup under Linux (howto or >> something else?) > > I had a look at the files, and I think the information is sort of > present in the CONFIG file in the "docs" folder. John, thanks. That's the file I looked first. It doesn't tell me where the 'default' mailbox path is, but I think that wouldn't anyway. I changed it according to the example, no success. It might be due to some other problem. As mentioned in some other message, nmap doesn't show any open IMAP port so I guess, pine is not able to connect and read any message from the server. > As I recall, in the unpatched state, on Linux, UW-IMAP assumes an > INBOX in /var/spool/mail, and other folders are by default in the > users home directory, ie for Linux something like /home/allenjo/ if > allenjo is my username. > > Following the instructions in CONFIG, I patched my system and compiled > it to use mbx format, with the INBOX and all other folders in > /home/allenjo/Mail/. This worked fine for several years, until I > switched to maildir and Dovecot. I still don't know how to read multiple mailbox files from one account but I guess first, I have to be able to read my INBOX. Thanks for all the , I'll try again, Andreas |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Fri, 10 Jun 2006, andreas wrote:
> John, thanks. That's the file I looked first. It doesn't tell me where > the 'default' mailbox path is, but I think that wouldn't anyway. I > changed it according to the example, no success. The default mailbox path is your UNIX home directory. The default INBOX path is the mail spool file (e.g., /var/mail/jones). Make sure that works before making other changes. > It might be due to some other problem. As mentioned in some other > message, nmap doesn't show any open IMAP port so I guess, pine is not > able to connect and read any message from the server. imapd does not open any TCP ports. It runs under [x]inetd. Please review the information in the BUILD file starting with "UNIX INSTALLATION NOTES". -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum. |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On Fri, 9 Jun 2006 18:24:43 -0700, Mark Crispin <MRC@CAC.Washington.EDU> wrote:
> On Fri, 10 Jun 2006, andreas wrote: >> John, thanks. That's the file I looked first. It doesn't tell me where >> the 'default' mailbox path is, but I think that wouldn't anyway. I >> changed it according to the example, no success. > > The default mailbox path is your UNIX home directory. The default INBOX > path is the mail spool file (e.g., /var/mail/jones). > > Make sure that works before making other changes. I guess this will be step 2... (see below) >> It might be due to some other problem. As mentioned in some other >> message, nmap doesn't show any open IMAP port so I guess, pine is not >> able to connect and read any message from the server. > > imapd does not open any TCP ports. It runs under [x]inetd. > > Please review the information in the BUILD file starting with "UNIX > INSTALLATION NOTES". .... and this will be my 1st step. Up to now, I didn't see any use in inetd or xinetd. I guess, this will be my first server that needs a listener. This will take me some time to check, what other server may/need to be started with xinetd. Thanks so far, Andreas |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
On 10 Jun 2006 07:08:04 GMT, andreas a@t mrs d.t ch <andreas> wrote:
> On Fri, 9 Jun 2006 18:24:43 -0700, Mark Crispin > <MRC@CAC.Washington.EDU> wrote: >> On Fri, 10 Jun 2006, andreas wrote: >>> It might be due to some other problem. As mentioned in some other >>> message, nmap doesn't show any open IMAP port so I guess, pine is >>> not able to connect and read any message from the server. >> >> imapd does not open any TCP ports. It runs under [x]inetd. >> >> Please review the information in the BUILD file starting with "UNIX >> INSTALLATION NOTES". > > ... and this will be my 1st step. Up to now, I didn't see any use in > inetd or xinetd. I guess, this will be my first server that needs a > listener. > > This will take me some time to check, what other server may/need to be > started with xinetd. Ok, I've got xinetd running. So far so good. And imap starts a well, see below. >>> John, thanks. That's the file I looked first. It doesn't tell me >>> where the 'default' mailbox path is, but I think that wouldn't >>> anyway. I changed it according to the example, no success. >> >> The default mailbox path is your UNIX home directory. The default >> INBOX path is the mail spool file (e.g., /var/mail/jones). >> >> Make sure that works before making other changes. Now the trouble starts. - I copied one file of my mailbox to /var/mail/andreas - compiled imapd with no changes to env_unix.c (make slx) - copied imapd to /usr/local/exec/ - created a /etc/xinetd.d/imap - checked services for an imap entry - started xinetd - checked /var/log/daemon.log (imapd read imap and started with one service) - started pine and tried to connect to my server... nothing I see the status message [Opening "INBOX" <.> ] and after some 20 seconds [No folder opened] daemon.log and mail.log: Jun 14 21:41:46 localhost xinetd[4469]: START: imap pid=4514 from='client ip' Jun 14 21:41:46 localhost imapd[4514]: imap service init from 'client ip' Jun 14 21:41:47 localhost imapd[4514]: Logout user=??? host='client hostname' ['client ip'] Jun 14 21:41:47 localhost xinetd[4469]: EXIT: imap pid=4514 duration=1(sec) pine is configured with inbox-path = {'server ip'/user=andreas}INBOX telnet to the server gives: andreas@client:~ > telnet server 143 Trying 'server ip'... Connected to 'server hostname'. Escape character is '^]'. * OK [CAPABILITY IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS STARTTLS LOGINDISABLED] ['server ip'] IMAP4rev1 2006.365 at Wed, 14 Jun 2006 21:44:38 +0200 (CEST) I tried the same with a changed env_unix.c. I changed printf (tmp,"%s/%s",MAILSPOOL,myusername ()); to sprintf (tmp,"%s/Mail/INBOX", myhomedir()); compiled & copied imapd, restarted xinetd and tried to connect. With the same effect. If anybody has some idea, or can tell me what I'm doing wrong or where I might ... Andreas And yes, here's the log from pine: About to open folder "INBOX" inbox is: "INBOX" IMAP 21:55:21 6/14 mm_log warning: rsh to IMAP server timed out IMAP 21:55:21 6/14 mm_log babble: Trying IP address ['server ip'] IMAP DEBUG 21:55:22 6/14: * OK [CAPABILITY IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS STARTTLS LOGIN IMAP DEBUG 21:55:22 6/14: 00000000 STARTTLS IMAP DEBUG 21:55:22 6/14: 00000000 NO Server certificate not installed IMAP 21:55:22 6/14 mm_log error: Server disables LOGIN, no recognized SASL authenticator IMAP DEBUG 21:55:22 6/14: 00000001 LOGOUT IMAP DEBUG 21:55:22 6/14: * BYE localhost IMAP4rev1 server terminating connection IMAP 21:55:22 6/14 mm_notify bye: {'server ip'/user=andreas}INBOX: localhost IMAP4rev1 server termin IMAP DEBUG 21:55:22 6/14: 00000001 OK LOGOUT completed I'm somewhat confused about the STARTTLS and LOGINDISABLED features in this log. Any information on them? And I know that I don't have any server certificate, that's why I didn't compile with OpenSSL even though I have it on my system. |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Wed, 14 Jun 2006, andreas wrote:
> I see the status message [Opening "INBOX" <.> ] and after some 20 > seconds [No folder opened] This indicates that you never logged in. > Jun 14 21:41:46 localhost xinetd[4469]: START: imap pid=4514 from='client ip' > Jun 14 21:41:46 localhost imapd[4514]: imap service init from 'client ip' > Jun 14 21:41:47 localhost imapd[4514]: Logout user=??? host='client hostname' ['client ip'] > Jun 14 21:41:47 localhost xinetd[4469]: EXIT: imap pid=4514 duration=1(sec) Further evidence that you never got logged in. > I tried the same with a changed env_unix.c. I changed > printf (tmp,"%s/%s",MAILSPOOL,myusername ()); > to > sprintf (tmp,"%s/Mail/INBOX", myhomedir()); > compiled & copied imapd, restarted xinetd and tried to connect. > With the same effect. This isn't surprising, since it never got as far as this. > About to open folder "INBOX" inbox is: "INBOX" > IMAP 21:55:21 6/14 mm_log warning: rsh to IMAP server timed out This is why you had to wait 20 seconds. If you don't want to use rsh-IMAP, set rsh-timeout in your Pine configuration to 0. > IMAP DEBUG 21:55:22 6/14: 00000000 STARTTLS > IMAP DEBUG 21:55:22 6/14: 00000000 NO Server certificate not installed > IMAP 21:55:22 6/14 mm_log error: Server disables LOGIN, no recognized SASL authenticator And this is why you didn't get logged in. This imapd binary is build with OpenSSL and mandatory encryption. Since no server certificate is installed, it couldn't negotiate encryption. Since encryption is mandatory, it didn't let you log in. > I'm somewhat confused about the STARTTLS and LOGINDISABLED features in > this log. Any information on them? Please refer to RFC 3501; search for both STARTTLS and LOGINDISABLED. Both are discussed in detail in multiple places. > And I know that I don't have any > server certificate, that's why I didn't compile with OpenSSL even though > I have it on my system. Here's something that you are did wrong. Either you built with OpenSSL, even though you said that you did not do so, or the binary that xinetd starts is a different binary (one built with OpenSSL). An imapd binary built without OpenSSL will not show STARTTLS and LOGINDISABLED as capabilities, nor would it issue a "Server certificate not installed". Your next course of action is one of the following: Install the necessary certificate so you can get STARTTLS working OR Install a binary that is built without OpenSSL Also, please review the BUILD and SSLBUILD documents, since this is all discussed in both documents. -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum. |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
On Wed, 14 Jun 2006 14:44:28 -0700, Mark Crispin <MRC@CAC.Washington.EDU> wrote:
> On Wed, 14 Jun 2006, andreas wrote: >> About to open folder "INBOX" inbox is: "INBOX" >> IMAP 21:55:21 6/14 mm_log warning: rsh to IMAP server timed out > > This is why you had to wait 20 seconds. If you don't want to use > rsh-IMAP, set rsh-timeout in your Pine configuration to 0. Ok, I replaced rsh-path with /usr/bin/ssh. This solved the problem. >> IMAP DEBUG 21:55:22 6/14: 00000000 STARTTLS >> IMAP DEBUG 21:55:22 6/14: 00000000 NO Server certificate not installed >> IMAP 21:55:22 6/14 mm_log error: Server disables LOGIN, no recognized SASL authenticator > > And this is why you didn't get logged in. This imapd binary is build with > OpenSSL and mandatory encryption. Since no server certificate is > installed, it couldn't negotiate encryption. Since encryption is > mandatory, it didn't let you log in. Ok, I see. My fault. As I didn't want any encryption, I just didn't read the paragraphs mentioning it. I wasn't aware, encryption is the default. <snip> > Your next course of action is one of the following: > > Install the necessary certificate so you can get STARTTLS working Well... I tried and looked into the certificate stuff.... :-) (I went for straight to the other possibility) > OR > Install a binary that is built without OpenSSL After building without OpenSSL, everything was easy. I don't know how many stupid guys end up on this list asking the same silly questions but perhaps it would to have some message after the build process to indicate the type of imap one created something OpenSSL = ON / needed / YES imap revision = 4 IP versions = 4 & 6 BTW, I went back to the stable 2004g but still want to tell you, the xinetd config for imap has an error, it should say /usr/local/etc (and not exec) (I have to admit that I still tested the exec as I don't know the internals of xinetd... but imapd does not load with the wrong path) Anyway, thanks for your and your patience! Andreas |
|
![]() |
| Outils de la discussion | |
|
|