April 23, 2008

Fedora Directory Server (FDS) + Postfix Mail Server (Part 1)

Every multi-user application have user database to stored user information that have access into application. Postfix Mail Server is multi user application that can be integrated with LDAP Server (FDS). Let’s start to configure.

Ingredients:

· Fedora Directory Server packages (http://directory.fedora.redhat.com).

· Postfix packages, MTA for sending email. (CD/DVD).

· Devecot packages, IMAP Server and also POP3 server. (CD/DVD).

· Squirremail packages, MUA web based. (CD/DVD).

· Mozilla Thunderbird packages, MUA desktop based (http://www.mozilla.com).

· mkntpwd packages, to create SAMBA password (http://www.nomis52.net/data/mkntpwd.tar.gz).

· Apache and PHP packages, for web server. (CD/DVD).

Configuration

· Fedora Directory Server (FDS)

Your FDS in your system is already running with default configuration. Lets configure FDS that can be integrated with Postfix.

o Add object and attribute. Add objectclass “mailgroup” and add two attributes “mail” and “mgrpDeliverTo” to every user account.

o Add sambaLMPassword and sambaNTPassword into ACI self access, if you want to synchronize it with userPassword.

o Add ACI permission in self access (write -> read).

· Postfix

o LDAP aliases (/etc/postfix/ldap-aliases.cf)

In here you can find user email mapping configuration with unix/LDAP user. Setting your server_host and server_base depend on your FDS configuration.

bind = no

version = 3

timeout = 20

size_limit = 1

expansion_limit = 0

start_tls = no

tls_require_cert = no

server_host = ldap://svr6.xx.eu/

search_base = ou=Groups,dc=xx,dc=eu

scope = sub

query_filter = (mail=%s)

result_attribute = mgrpDeliverTo

special_result_filter = %s@%d

o LDAP User (/etc/postfix/ldap-user.cf)

bind = no

version = 3

timeout = 20

size_limit = 1

expansion_limit = 0

start_tls = no

tls_require_cert = no

server_host = ldap://svr6.xx.eu/

scope = sub

search_base = ou=Groups,dc=xx,dc=eu

query_filter = (mail=%s)

o Mail hosting (/etc/postfix/main.cf)

In here you can configure mail server for sending email, receiving email, blocking email, forwarding email, etc. smtp_recipient_restriction use to allow sender to send email only to some destination. always_bcc is use for back-up mail in server.

myhostname = svr6.xx.eu

myorigin = xx.eu

inet_interfaces = all

mydestination = xx.eu

virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf

local_recipient_maps = $alias_maps, ldap:/etc/postfix/ldap-users.cf

unknown_local_recipient_reject_code = 550

mynetworks = 127.0.0.0/28, 10.252.8.0/24, 10.252.9.0/24

alias_maps = hash:/etc/aliases

home_mailbox = Maildir/

smtpd_recipient_restrictions = reject_unauth_destination

always_bcc = archieve@xx.eu

No comments: