Home
Report bugs
Screen shots
Documentation
Download
News
Autodir

Mail groups and aliases


Mail Aliases

intraPerson has full support for mail aliases. It creates following types of mail aliases.

Personal Aliases

Personal aliases are for individual users and created when mail box is different from the uid of the user. In that case mailbox name mapped to uid name in ldap alias entries.

For example, in iperson.conf configuration file, if mail domain is given as example.com and new user with uid user222 created and her work mail is Jeson@example.com then personal mail alias Jeson to user222 is created.

Group Aliases

All users belonging to particular group are made members of that mailing list by adding all group members mail 'if exist' to it.

Note

If all users in particular group does not have work mail then group alias does not exist unless and until at least one group member has her work mail listed.

Everyone Aliases

This is catch all alias where when mail is sent to everyone@<your_mail_domain> then mail is sent to all users in ldap and provided their work mail exists.

Other Aliases

These mail aliases are <group>-owner aliases directed towards postmaster so that when mail delivery errors happen, these are reported back to postmaster by mail server instead of sending these to the original sender. These aliases exist only for group mailing lists and for everyone mailing list only. Make sure postmaster mail user exist to catch these errors.

Configuring mail servers for ldap aliases

There are number of good mail servers for Linux and explanation for each mail server how to configure ldap based aliases will make a separate guide in itself! In this section I explain generalities so that any mail server can be configured from this info and as an example, Postfix configuration for ldap based aliases.

Note

Before proceeding It is assumed that reader has understanding of mail aliases and are familiar with Sendmail style alias file.

Note

The terminology I use here is from aliases man page. Please refer to it.

Any mail server which supports ldap based simple aliases expect two attributes names. One attribute is for name similar to the left side field in aliases file and other attribute for address similar to right side of aliases file.

intraPerson uses nisMailAlias attribute for name, rfc822MailMember attribute for addresses. These two attribute names are key to configuring mail servers for ldap based aliases.

Generally these attributes are used in defining ldap search filters as we see with Postfix example which follows this section.

Apart from above two key attribute names, additional information is needed by mail servers which is given below:

  • Ldap server location. IP address of ldap server -- for mail server to find it.

  • Where aliases entries are, within ldap server. Default value for this is ou=Aliases,dc=example,dc=com. If suffix in slapd.conf as well as in iperson.conf changed, then this value will change accordingly. For example, if suffix value is given as dc=intraperson,dc=com, then location of aliases will be ou=Aliases,dc=intraperson,dc=com.

Example with Postfix

Postfix configuration file main.cf need to be edited to add support for ldap based aliases.

There are two steps to configuring Postifix for ldap based aliases:

Step 1

First step is to inform Postfix from which source alias info is to be taken. Default is to get this info from local file /etc/postfix/aliases. Apart from this we can tell Postfix to get it from ldap, SQL and others. This can be done with configuration directive alias_maps as:

alias_maps = hash:/etc/postfix/aliases, ldap:myldap

In this example, we are asking Postfix to get mail alias info first from /etc/postfix/aliases and then from ldap.

What is interesting here is the tag myldap. This tag name can be whatever one likes. myldap name here should be taken as only example. This tag name later used to give more details about ldap server location and other info we discussed in previous section. But caution should be taken so that this tag name is not misspelled later.

Step 2
Ldap server location

Where ldap server is located is to be know to Postfix server in order to fetch mail aliases. Following configuration directive tells Postfix where to find ldap server using ip address of ldap server.

myldap_server_host	=	127.0.0.1

Here we are instructing Postfix server to look for ldap server on localhost. Other configurations may differ where ldap server could be located some where else rather then on local system. In those cases, above ip address need to be changed accordingly.

Note

myldap is tag name as we discussed before. It must be same as we used with alias_maps in first step.

Aliases location in ldap server

Postfix need to know, within the ldap server, where actually alias entries are located. This can be specified as:

myldap_search_base	= ou=Aliases,dc=example,dc=com

Note

Please refer back to first section for more info.

How to search for required alias

When mail arrives, Postfix has to find required alias entry among other ldap alias entries. Search filter we define, helps Postfix find required alias entry in ldap among others. The required search filter can be defined using following Postfix configuration directive:

myldap_query_filter	= (&(objectClass=nisMailAlias)(cn=%s))

Important

Above search filter can be used as is without modification.

Note

Refer back to First section for more info about nisMailAlias.

Final mail addresses

Even after finding right alias entry, Postfix needs to know where within the found entry, is those mail address to which mail is to be delivered finally. intraPerson stores final mail addresses in attribute rfc822MailMember. This needs to be informed to Postfix through following directive:

myldap_result_attribute		= rfc822MailMember

Note

Refer back to First section for more info about rfc822MailMember.



Contact: ramana at intraperson dot com

extralinux.com Logo SourceForge.net Logo