Migrating to CommuniGate Pro

Intro
Installation 
Migration
SysAdmin
Objects
Transfer
Access
Directory
Data Files
Clusters
WebMail
Miscellaneous
Licensing
HowTo
If your system was already running some type of mail server, you may want to integrate your existing E-mail environment into the CommuniGate Pro messaging system.

Supporting Network Users

Users that access their mail accounts using any standard Internet Protocol (POP, IMAP) do not have to switch their mailer applications or change mailer settings - CommuniGate Pro supports not only the published mail access protocols standards, but most of unofficial protocol extensions, too.


Supporting Local Users

Some users registered with the server OS may access their mail accounts using legacy mailer applications that read mailbox files directly. Since these mailers bypass Internet protocols, the CommuniGate Pro server has no control over those mailers.

The CommuniGate Pro Server keeps all user accounts and mailboxes inside its "base directory". On a properly configured system direct user access to the base directory is prohibited to ensure that account mailboxes and other Server files stay intact.

When you create a CommuniGate Pro account for a local user who needs mail access via legacy mailers, select the External INBOX option. In this case, the account INBOX will not be created inside the CommuniGate Pro base directory. Instead, the mailbox location will be taken from the user domain settings. Usually, you specify /var/mail/* or /var/spool/mail/* - the "standard" location where legacy mailers expect to see user mailboxes.

When the Server accesses these external mailboxes, it uses the OS file-locking mechanism to synchronize its activity with legacy mailers.

Note: legacy mailers were not designed to support simultaneous access to mailboxes. They can destroy data in your mailbox if you open two legacy mailer sessions with the same mailbox and delete messages in one of the sessions. CommuniGate Pro cannot fix this, since these mailers bypass the server, it can only guarantee (using file locks) that legacy mailers do not destroy a mailbox while CommuniGate Pro is working with it.

For more details, see the Sharing section.


Using Legacy Mailboxes

The default format for CommuniGate Pro mailboxes is the BSD-type text mailbox format: a mailbox is a text file with messages separated with an empty line and a line starting with the symbols From .

Since most legacy mail systems use this format, the existing mailbox files can be used when migrating to CommuniGate Pro. You should either copy the old mailbox files into the proper places in the CommuniGate Pro account directories, or you can specify that some accounts have external INBOXes (see above), and the old mailbox files will be used "in place".

Note: when CommuniGate Pro stores a message in a BSD-type mailbox, it adds additional fields to the separator (From) line. These fields are ignored by legacy mailers and mail servers, but they allow the CommuniGate Pro Server to keep the message status and unique message ID information. When you make your CommuniGate Pro Server use a BSD-type mailbox composed with an old mail system, it issues warnings (Log records) about missing fields in the message separators. The Server still opens such mailboxes: it creates empty status flag sets for such messages, and it generates unique IDs on-fly. As users read, move, and/or delete old mail from their mailboxes, messages stored with the old mail system disappear, and the Server stops complaining when opening these mailbox files.


Converting Passwords

If your old mail server authenticated clients using the Unix OS account and passwords (the passwd and shadow files), you can simply enable the Use OS Password option for those accounts and the CommuniGate Pro Server will use the OS authentication procedures for them.

Since the OS Passwords are one-way encrypted, they cannot be used for secure SASL authentication metohds. The following procedure can be used to allow migrated users employ the secure SASL methods:

Users can connect to the newly created accounts using their old OS Passwords - i.e. the same passwords they used with the legacy mail system. When users try to modify their account passwords, the new passwords will be stored as CommuniGate Passwords. All users that have updated their passwords will be able to use the secure SASL authentication methods.

Sometimes you cannot use this method. For example, you migrating users from a different server, and you do not register them all with the Unix OS on the new server, but you do have the passwd file from the old server. In this case, you may want to enter the Unix-style (crypt-encrypted) passwords as the CommuniGate (internal) Passwords.

To make the CommuniGate Pro server process its internal password string as a U-crpt (crypt-encrypted) password, store it in the Account Settings with one-byte binary 002 prefix. If you want to create a user test using the CLI interface, and the Unix (crypt-encrypted) password for that user is AslUzT1JkPsocc, then use the following CLI command:
createaccount "test" {Password="\002AslUzT1JkPsocc";}

If you create users by importing an account list from a text file, place the Unix passwords strings into the UnixPassword column, not into the Password column. In this case, the Loader will automatically add the binary 002 prefix to all password strings.

Account Settings of the new accounts should specify one of the CommuniGate Pro password encryption methods (clear text or A-crpt). Users will be able to log in using their old Unix passwords. When they update their passwords, new CommuniGate Password strings will be stored using the specified CommuniGate Pro password encryption method. All users that have updated their passwords will be able to use the secure SASL authentication methods.

Some servers produced by the Netscape and Software.com companies store user passwords using several encrytption methods. When passwords are retrieved from those servers, they have the following form:
{method}eNcoDeD
where method specifies one of the standard encryption methods, and the eNcoDeD string is a base64-encoded encrypted password.

CommuniGate Pro can use these passwords in the same way it uses the Unix-encrypted passwords, and they should be entered in the same way: you should use the binary 002 prefix in the CLI commands and/or your should place those passwords into the UnixPassword field of the Import file.

The following encryption methods are supported:

Sample Import file:
NameUnixPassword
user2 YIdhkjeHDKbYsji
user1 {SHA}Ue4Erbim2TC7CmuukMOBejeytr2=
user3 {MD5}zverMUhsgJUIDjeytr2=
user4 {crypt}YIdhkjeHDKbYsji
Password Type
Unix-crypt
SHA1-digested
MD5-digested
Unix-crypt, same as for the user1 account


Migrating from sendmail

If you are migrating from a sendmail-based mail system, you may find the following information useful:

The aliases file
the sendmail aliases file allows the administrator to redirect local mail to one or several addresses. Sendmail uses the term "alias" for too many different things, so you should select the proper CommuniGate Pro feature to implement different types of sendmail "aliases":
  • Each account can have one or several aliases. Mail sent to any account alias name is routed to the account itself. If the domain.dom account john.smith has j.smith and smith aliases, mail sent to j.smith@domain.dom and smith@domain.dom addresses is delivered to the john.smith@domain.dom account. When an account is renamed, its aliases automatically start to point to the new name, and when an account is removed, all its aliases are removed, too.
  • Domain Forwarder objects allow you to redirect mail sent to a domain address to any other address. The domain.dom forwarder susan.smith can reroute all mail sent to susan@domain.dom address to susan@otherisp.dom address.
  • Domain Group objects allow you to redirect mail sent to some domain address to any set of addresses.
  • The Router module allows you to redirect mail sent to a certain address to any other address. The Router Alias Record <*.smith@domain.dom> = Smith@domain.dom will reroute mail sent to john.smith@domain.dom and to susan.smith@domain.dom to the Smith@domain.dom address.
  • The Account Rules allow the administrator and/or the users themselves to redirect/forward/mirror all or certain mail to one or several addresses.
  • The Server-Wide Rules allow the administrator to redirect/forward/mirror all or certain mail to one or several addresses.
  • The shared or foreign mailboxes feature allows a user to grant access to a mailbox to other users; in many cases a shared mailbox is a much better alternative to mail distribution.
  • The LIST module provides a very powerful mailing list distribution mechanism.

procmail processing
The Server-Wide, Domain-Wide, and Account-Level Automated Rules allow administrators and users to perform automatic mail processing and filtering using the powerful condition checking and processing operations built into the CommuniGate Pro Server.
For the situations where messages should be processed using an external filter or processor, the Execute Automated Rules operation can be used to start the specified external program as a separate OS task (for example, the Rules can be used to process all or certain incoming messages with the same procmail program).

Restricted Relaying
Unlike sendmail, CommuniGate Pro does not use syntax rules to prevent unauthorized relaying. Instead, it uses the Router and really checks if message delivery to a specified address would result in SMTP transfer to a "stranger" host.


Copying Mailboxes from Other POP Servers

When migrating from other mail servers, you may want to copy all messages from an account on the old server to the already created account on the new server.

The CommuniGate Pro software package includes the MovePOPMail program. This program connects to the old POP server, logs in, retrieves all messages, and submits it to the new SMTP server:

MovePOPMail [--verbose] [--delete] POPserver POPname POPpassword SMTPserver SMTPrecipient

POPserver
the IP address of the old (source) POP3 server; if that POP server operates on a non-standard TCP port, you can specify the port number using the colon sign: 192.0.2.3:111 - POP server at the 192.0.2.3 address, port 111.

POPname
the POP account name - i.e. the name of the source account on the POP server.

POPpassword
the POP account password.

SMTPserver
the IP address of the new (target) SMTP server; if that SMTP server operates on a non-standard TCP port, you can specify the port number using the colon sign: 192.0.2.4:26 - SMTP server at the 192.0.2.4 address, port 26.

SMTPrecipient
the address to send the retrieved messages to. Usually - the account name on the new server.

--verbose
an optional parameter. When specified, the progress information is sent to the standard output.

--delete
an optional parameter. When specified, the program deletes all retrieved messages from the POP account.

Sample:

MovePOPMail --verbose 192.0.0.4 john "jps#dhj" 192.0.1.5 john


Copying Mailboxes from Other IMAP Servers

When migrating from other mail servers, you may want to copy all mailboxes and all messages from an account on the old server to the already created account on the new server.

The CommuniGate Pro software package includes the MoveIMAPMail program. This program connects to the old and new IMAP servers, logs into both, retrieves the list of mailboxes in the old account, creates all missing mailboxes in the new account, and copies all messages from mailboxes in the old account to the mailboxes in the new account. The program also copies the list of "subscribed mailboxes".

MoveIMAPMail [--verbose] [--list search] OldServer oldName oldPassword NewServer newName newPassword

oldServer
the IP address of the old (source) IMAP4 server; if that IMAP server operates on a non-standard TCP port, you can specify the port number using the colon sign: 192.0.2.3:144 - IMAP server at the 192.0.2.3 address, port 144.

oldName, oldPassword
strings to use when logging into the source IMAP server.

newServer
the IP address of the new (target) IMAP4 server; if that IMAP server operates on a non-standard TCP port, you can specify the port number using the colon sign: 192.0.2.5:145 - IMAP server at the 192.0.2.5 address, port 145.

newName, newPassword
strings to use when logging into the target IMAP server.

--verbose
an optional parameter. When specified, the progress information is sent to the standard output.

--list search
an optional parameter. When specified, the following search string is used to find all mailboxes in the source account. Some IMAP servers show the entire user directory or even system directory if the default search string "*" is used. Consult with your old IMAP server manual to learn the search string to use.

Sample:

MoveIMAPMail --list "Mail/*" 192.0.0.4 john "jps#dhj" 192.0.1.5 johnNew dummy


Copying All Mailboxes from Other Servers

After you have created the accounts on your new CommuniGate Pro Server, you may want to copy mail from all mailboxes on the old server to the accounts on the new server.

The CommuniGate Pro software package includes the MoveAccounts program. This program uses a tab-delimited text file that contains account names and passwords. It can be the same file you have used to Import Accounts to a CommuniGate domain.

The program scans the file and uses either the MailPOPMail or the MailIMAPMail program to move messages for each account. These programs should be located in your current directory.

MoveAccounts [--POP | --IMAP] [--verbose] [--delete] [--list search] file sourceServer targetServer

file
the name of a tab-delimited file that contains account names and passwords.

sourceServer
the IP address of the old (source) server (POP or IMAP); can include the port number.

targetServer
the IP address of the new (target) server (SMTP or IMAP); can include the port number.

--POP, --IMAP
parameters that specify whether MovePOPMail or MoveIMAPMail program should be used. If none is specified, the MovePOPMail program is used.

--verbose, --delete, --list search
optional parameters passed to the MovePOPMail or MoveIMAPMail program.

The first line of the file should contain the data field names. The fields with names Name and Password must be present.

If the field NewName exists, it is used as the SMTPrecipient parameter when the MovePOPMail program is started, or as the newName parameter for the MoveIMAPMail program. Otherwise the same Name field data is used.

If the --IMAP parameter is specified, the program checks if the NewPassword field exists. If it does, the data in that field are passed as the newPassword parameter to the MoveIMAPMail program. Otherwise, the same Password field data is used.

All fields with other names are ignored.

Sample:

AccountList file
NameLimitPassword
john10Kj27ss#45
jim120Kdud-ee
george31Mmia#hj!

MoveAccounts --POP AccountList 192.0.0.3 192.0.1.5

If you cannot obtain the clear-text passwords for all accounts you want to copy, and the old server is using the Unix passwd or shadow file, you may want to create a special version of that file where all encrypted password strings are replaced with the encrypted string of a known password. If you use the --IMAP method, then you should enable the Use OS Password option for all target CommuniGate Pro accounts, and, if the CommuniGate Pro Server runs on a different computer, you should also copy the modified passwd file to that system. After all account data are copied, you may restore the original passwd file(s).


Switching Servers

Very often it is essential to switch to the new server without any interruption in the services you provide.

If you install the new CommuniGatePro server on the same system as the old mail server, you should:

All this can be done while your old server is still active.

Now, you should stop your old server activity by either changing its port numbers to non-standard values, or by disconnecting it from the external network.

Use the AccountMove program to copy all messages from your old server to CommuniGate Pro.

When all messages are copied, change the CommuniGate Pro SMTP port number back to 25, POP port number - to 110, and IMAP port number to 143. Now CommuniGate Pro will operate as your mail server, without any interruption in the services you provide.

You may want to keep the old server running for several hours - in case its queue contained some delayed outgoing messages. Just check that the old server does not try to use the standard ports.


Moving to Secondary Domains

If you create several Secondary domains in CommuniGate Pro, you may want to move accounts from your old server(s) to a Secondary CommuniGate Pro domain, not to its Main Domain.

In this case, you should add the NewName field to your account list file, and copy all names into that column, adding the @domainname string to each name.

If you use the IMAP protocol to move messages between the servers, you may use a simpler method:


Migrating from CommuniGate/MacOS and SIMS

If you want to move your users from a CommuniGate for MacOS server, you can build the account list file using the CommuniGate/MacOS extractor utility.

If you want to move your users from a Stalker Internet Mail Server (SIMS), you can build the account list file using the SIMS extractor utility.


CommuniGate® Pro Guide. Copyright © 1998-2000, Stalker Software, Inc.