Skip to content

From iRedMail

iRedMail is Postfix and Dovecot, set up for you. Read Coming from another server first, and From Postfix and Dovecot second: almost all of it applies. This page covers what iRedMail adds.

Who people are

iRedMail's accounts live in its backend, which is going away with it, so this is choice B: point inbuxa at the backend, let the copy bring the passwords across, then switch the domain to the internal directory.

Dovecot's configuration holds everything inbuxa needs, because Dovecot already reads the same backend: /etc/dovecot/dovecot-ldap.conf or /etc/dovecot/dovecot-mysql.conf (the PostgreSQL one is named for PostgreSQL). Copy the connection details and filters from there, not from this page, because they change between iRedMail releases.

OpenLDAP backend

Dovecot's LDAP file uses auth_bind = no and reads userPassword itself, so the account it binds as can read password hashes. That is what choice B needs. Carry across, as in the Postfix and Dovecot table:

  • hosts or uris, dn, dnpass and base;
  • pass_filter into Login Filter, and user_filter into Mailbox Filter, with %u replaced by ?. Both check accountStatus=active; keep that.

Then set Use Bind Authentication off, and:

Field Value
Password Attribute userPassword
Primary E-mail Attribute mail
E-mail Alias Attribute shadowAddress
Description Attribute cn

Mailing lists are entries of their own, with member addresses. Recreate them as mailing lists in inbuxa, and keep them out of the mailbox filter.

MySQL, MariaDB or PostgreSQL backend

An SQL directory, as for Postfix Admin, on the vmail database. Take the login and recipient queries from Dovecot's password_query, and rename its columns to what the form expects. The password column already has a prefix inbuxa reads, usually {SSHA512} or {CRYPT}; check a row before you rely on it.

Aliases, per-user forwarding and mailing lists are all rows in the forwardings table. A row that is an alias of one mailbox is an alias. The others become mailing lists or Sieve redirects; see aliases.

Copying the mail

iRedMail's Dovecot supports master users. Its documentation covers adding one to /etc/dovecot/dovecot-master-users. Then copy as in the Postfix and Dovecot example, with the separator iRedMail sets.

Mail is under /var/vmail, but copy it over IMAP rather than as files. Flags and folders come across properly that way.

Calendars and contacts

  • SOGo, if you installed it, holds calendars and address books. Each person exports a calendar as .ics and an address book from its menu, and imports both in the webmail. The webmail reads vCard and LDIF, so either export format works.
  • Roundcube holds its own contacts. Each person exports them as vCard.
  • sogo-tool backup writes SOGo's own format, which nothing else reads. It is a backup, not a way across.

What doesn't come across

iRedAdmin's settings, such as per-user service restrictions, throttling and greylisting, have no file to copy. Set up the ones you still want in the console. Amavis and SpamAssassin quarantines stay behind; inbuxa has its own spam filter, which learns again from what people mark.