courier-authlib, userdb: entry not found

If you get error messages like this

Oct 18 15:38:47 server authdaemond: userdb: opened /etc/authlib/userdb.dat
Oct 18 15:38:47 server authdaemond: userdb: looking up 'user'
Oct 18 15:38:47 server authdaemond: userdb: entry not found

You should check that your user entry is really seperated from the the rest of the line with a tab – and not with spaces.

GMX: Migration von POP3 zu IMAP mit imapsync und offlineimap

Vorbedingung: In einem lokalen Maildir sind Mails eines GMX-Accounts gespeichert, welche in der Vergangenheit über POP3 (mit fetchmail) runtergeladen wurden. Das lokale Maildir ist über einen lokalen Courier-IMAP-Server zugänglich (Maildir++). Lokal wurden die Mails in einer Ordnerstruktur verwaltet. Auf GMX-Seite wurden die Mails parallel analog verwaltet, wobei allerdings keine direkte Synchronisation erfolgte.

Nun sollen beide Seiten einmalig mit imapsync synchronisiert und später in den regulären offlineimap-Abgleich eingebunden werden. Verwendet wurde dabei imapsync in der Version 1.286 und offlineimap in der Version 6.0.3

Im Folgendenden wird beschrieben wie ein solches Vorhaben aussehen kann. Es ist kein komplettes Howto sondern spiegelt lediglich die Erfahrungen wieder, die während der Migration gemacht wurden.

Continue reading “GMX: Migration von POP3 zu IMAP mit imapsync und offlineimap”

Migrating from courier imap to exchange 2007 using imapsync

The following blogpost describes my experience when migrating from courier imap to an exchange 2007 server with the help of imapsync. The intend is not to provide a complete howto but rather reflect my thought and experiences during the migration phase.

Continue reading “Migrating from courier imap to exchange 2007 using imapsync”

Superuser / administrators group in courier imap

One not obvious feature in courier imap is the superuser account. The feature is a bit hidden in documentation for courier-authlib (see man auth_generic). It is based on the IMAP group functionality of courier.

You can assign a user account to different groups independently from other (system) groups the belongs to. The group assignement is implemented with the option field in courier-authlib, see man auth_generic.

There is a special group name “administrators”. If you assign one account to that group you have automatically full access to all other users mailboxes and folders over the #shared namespace. This is especially usefull when doing e.g. email migration over IMAP from one server to another.

If you use courier-authlib-ldap there is neither a explicit option field nor a groups field in couriers LDAP scheme. But you can assign arbitrary text attributes to group setting with the LDAP_AUXOPTIONS variable. As I don’t use the sharedgroup attribute I simply misused it for the group setting by adding the following to /etc/authlib/authldaprc:

LDAP_AUXOPTIONS disableimap=disableimap,disablepop3=disablepop3,disablewebmail=disablewebmail,sharedgroup=group

Debugging Exchange IMAP sessions with openssl s_client

I was just curious about the fact that openssl s_client -connect exchangeserver:993 was not working the way I expected it to work. I saw the greeting of the server but wasn’t able to do send any commands such as A1 CAPABILITY. The same worked for all other servers in the past.

Interestingly enough telnet exchangeserver 143 worked, but for obvious reasons unencrypted connections are not an option.

The reason behind is that in fact IMAP and telnet protocol and uses CRLF as line endings and Exchange servers are a bit picky on this specific point. As openssl is not a native client like telnet it sends whatever the terminal uses.

However there is already an solution builtin openssl s_client. Just pass the additional crlf option:

$ openssl s_client -connect exchangeserver:993 -crlf