Configuring imapd server port

From NikiWiki
Jump to: navigation, search

How to install and configure the port of IMAP server for Os/2

- Download the IMAP server from Hobbes and unzip it somewhere;

- create a directory to store the INBOX files for all the users, for example c:\var\mail, and one directory for each user, for example c:\home\default\mail\username;

- in \MPTN\ETC create an empty file named passwd and add to the inetd.lst file (create it if missing) the line:

 imap tcp imapd

- configure inetd for autostart at system startup (in \TCPIP\BIN\tcpstart.cmd)

- run the command pw2add for each user; user name will be username as in c:\home\default\mail\username and password will be what you like (it is just to connect to the local imapd server); home directory will be c:\home\default\mail\username;

- copy the file imap.cmd to \TCPIP\BIN and edit it to reflect the imapd.exe location;

- for each user, run

 mailutil create "#driver.mbx/c:\var\mail\username"

then start inetd. Note: don't run inetd from the same directory where imapd.exe is! If you look at the window where inetd is running, for any imapd command received you should see only a single line like:

 spawnning imapd socket=xxxx

Server is up and running! Above configuration was tested with both Thunderbird and Squirrelmail. If you connect with Thunderbird, you must turn off the use of the "IDLE" command. You can turn off idle by de-selecting "Use IDLE command" in Thunderbird's advanced settings box of your e-mail account's server settings.

Folders within other folders

For what I was able to understand, Inbox can't contain subfolders, nor can Trash, Sent or Drafts folders, while folders created by users can contain other folders within them, but not messages.

Creating folders within folders requires manual intervention on the server. Imagine you just started the server and connected with an IMAP client. In c:\home\default\mail\username you will have the following files:

 Drafts
 Sent
 Trash 
 mailbox.lst

To have a "Friends" folder containing subfolders, you need to

- manually create c:\home\default\mail\username\Friends folder and

- add Friends to mailbox.lst file

Then, with Thunderbird you will be able to create subfolders in "Friends" folder. Selecting "Friends" you will get an error message:

 SELECT failed: permissione denied: Friends

but opening the menu you can safely choose "New subfolder...". Note: you will not be able to move messages into "Friends", but will be able to move messages to "Friends" subfolder(s). I'm currently not able to delete folders from Thunderbird: you will have to do that manually.

I'm still trying to understand how to automatically fetch mail from external pop servers and append to the INBOX file.