The Local Delivery module processes messages routed to accounts on your Server. It uses the Mailbox manager to store messages in account INBOXes.
When the Router passes an address to the Local Delivery module, the module checks the domain name: if the domain name ends with the string .local, the Local Delivery module accepts the address, removes the .local suffix from the domain name, and stores the message in the account with that name. The "local" part of the address is ignored. This feature is used to create Unified Domain-Wide Accounts.
- Example:
- a message sent to the address
abcdef@nnnnn.local
will be accepted with the Local Delivery module and the message will be stored in the nnnnn account.The Local Delivery module does not process any other addresses on the "first" call.
When the Local Delivery module is called with the Router for "final delivery" attempt, it accepts all addresses with an empty domain name part, and it routes the messages to the accounts specified with the "local part" of the address.
- Example:
- a message sent to the address
- abcdef
- will be accepted with the Local Delivery module and the message will be stored in the abcdef account.
The account name can be the user name (local) part of the original address the message was sent to, or it can be a different name specified within the Router records.
One of the Local Delivery module options is Check If Account Exists. When this option is enabled, the module uses the Account Manager to check if the specified account is registered with the Server.
If the account is not registered, the module either returns the "User Unknown" error code to the Router or it reroutes the message to some other address (see below).
If this option is turned off, the Local Delivery module does not check if an account exists. As a result, the Router accepts the address, and after all other addresses are routed, the message is queued to the Local Delivery module. When the module tries to open an account, it fails to find it and rejects a message, But in this case the message is rejected later, and the Local Delivery module generates an error report message.
There are very few situations when you may want to turn this option off. The only benefit is faster routing.
If there is no registered account with the specified name, the Local Delivery module tries to find the account with the name
Unknown
. If such an account exists, the message is stored in that account.The Local delivery module checks if the account with the specified name is already registered with the Server. All registered accounts are stored in the Accounts folder inside the CommuniGate/Accounts Folder.
Note: After an account is created, you can move it from the Accounts folder to any place on any disk if you leave an account alias in the Accounts folder.
When the account file is found, the Account Enabled option is checked. If this option is not selected, all messages are rejected with the User mailbox is disabled error code.
If the Check If Account Exists option is enabled, and the Server account does not exist, the Local Delivery module can either Reject a message, or it can Route it to some other address.
If you select the Reroute option, you should specify an E-mail address that will be used to reroute all messages directed to unknown accounts. It can be a name of a registered local account, or it can be an E-mail address of an account on another server: the unknown account address is substituted with the specified address, and the Router restarts to process that address.
The specified "rerouting" address may contain the asterisk sign. In this case the name of the unknown local account is used to substitute the asterisk sign.
- Example:
- the Reroute address is:
- bad-*@monitoring.department.com
- then if a message is sent to
- james@mycompany.com
- where mycompany.com is the domain name of your Server, and there is no account james on your Server, the message is rerouted to:
- bad-james@monitoring.department.com
The Router can route an entire domain to a certain local account, if the .local domain suffix is used (see above).
- Example:
- client1.com = Cl1.local
- This router line will direct all messages sent to the client1.com domain to the Cl1 local account.
Unified domain-wide accounts are useful if the client systems retrieves messages from your server using the CommuniGate POP or similar software that distributes retrieved messages locally. Alternatively, the client system can use a regular single-user mailer and then distribute retrieved messages manually.
While the information in the local part of the client1.com addresses is not used for routing, it is not discarded. When the Local Delivery module stores the message in the Cl1 account, it stores the local parts of the addresses in the X-Real-To: message headers.
Note: the <*@client1.com> = client1 foreign alias record also stores all messages sent to the client1.com domain in the client1 account, but if such a record is used, the information about the local part (account name) would be lost, and the client software that retrieves messages from a Unified account would have to rely on the To: and Cc: message headers. Those headers do not always contain the correct information, and they never reflect any change in the local part of the address you could have been done with some additional routing records.
After an address is accepted with the Local Delivery module, the message is queued to the Module queue. The Module takes messages from its queue, opens the Account and tries to store a message in the account (in the account INBOX in case of multi-mailbox accounts).
The Local Delivery module checks is the Account Enabled option is on. If it is off, the message is rejected.
The Local Delivery module calculates the current size of the account mailbox[es] and rejects a message if the account storage quota would be exceeded.
The Local Delivery module uses the Mailbox manager to store a message in various types of accounts. It adds the Return-Path header to the message headers, and it can also add the X-Real-To headers (see above).
Under Construction