Postfix Virtual Hosting With LDAP Backend And With Dovecot As IMAP/POP3 Server On Ubuntu Kamic Koala 9.10 - Page 7

Step 9: Install and configure proftpd

First we will install proftpd and its requirements:

aptitude install proftpd proftpd-mod-ldap

Depending on your load you can decide between stand alone and inet.d.

Edit /etc/proftpd/proftpd.conf:

vi /etc/proftpd/proftpd.conf

And change from:

# Use this to jail all users in their homes
# DefaultRoot                   ~

To:

# Use this to jail all users in their homes
DefaultRoot                   ~

Now edit /etc/proftpd/modules.conf:

vi /etc/proftpd/modules.conf

And change from:

# Install proftpd-mod-ldap to use this
#LoadModule mod_ldap.c

To:

# Install proftpd-mod-ldap to use this
LoadModule mod_ldap.c

And from:

# Install proftpd-mod-ldap to use this
# LoadModule mod_quotatab_ldap.c

To:

# Install proftpd-mod-ldap to use this
LoadModule mod_quotatab_ldap.c 

No edit /etc/proftpd/ldap.conf and set the following:

<IfModule mod_ldap.c>
   
   AuthOrder       mod_ldap.c
   AuthPAM         off
   LDAPUseTLS                      off
   PersistentPasswd                off
   LDAPServer                      127.0.0.1
   LDAPDNInfo                      cn=abook,dc=webhabitat,dc=be readonly
   LDAPDoAuth                      on "dc=webhabitat,dc=be" # (&(uid=%u)(objectclass=posixAccount))

</IfModule>

Now restart postfix and your domain postmasters created in phamm can login to their home directories. Note not the email accounts.

/etc/init.d/proftpd restart

This concludes the complete how to.

Share this page:

7 Comment(s)

Add comment

Comments

From: Zabidin at: 2009-12-30 06:44:01

Hi,

 I stuck at this part.

 

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/phamm.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ISPEnv2.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/amavis.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/pureftpd.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/perversia.ldif 

 It said about permission. I don't know which permission. I install as root, should be no problem.

From: Anonymous at: 2009-12-15 21:28:46

Several months ago I followed a similar guide on 9.1

http://www.howtoforge.com/postfix-virtual-hosting-with-ldap-backend-and-with-dovecot-pop3-imap-on-ubuntu-8.10

I have been upgrading since but lacked the ability for users to change their own passwords.   Phamm 5.15 issue permissions issue.

 

I'm thinking about trying to do an in place upgrade on a very busy mail server.   

 Are there any "gotcha's" to lookout for when I Try to upgrade the schema?

Is this even possible?

From: Matteo at: 2011-03-17 21:01:29

server:/etc/ldap/slapd.d/cn=config/cn=schema# ldapadd -Y EXTERNAL -H ldapi:// -f /etc/ldap/schema/db.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=module{0},cn=config"
ldap_add: Naming violation (64)

From: Alexandre Moraes at: 2010-08-27 16:51:13

Trouble with maildrop:

(user unknown. Command output: ERR: authdaemon: s_connect() failed: No such file or directory Invalid user specified. )

Fix:

touch /etc/postfix/maildroprc and add:

DEFAULT="/home/vmail/domains/$1/$2"

vim /etc/postfix/master.cf and modify:

maildrop  unix  -       n       n       -       -       pipe

   flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

to:

maildrop  unix  -       n       n       -       -       pipe

  flags=DRhu user=vmail argv=/usr/bin/maildrop /etc/postfix/maildroprc ${nexthop} ${recipient}

From: Dominik at: 2011-03-24 09:43:11

I had the same error message, but, I don't want to use maildrop, I prefere dovecot. my problem was the postfixTransport attribute on the virtual domain. I forgot to change the plugins/mail.xml of phamm, so every new domain had maildrop in the postfixTransport attribute of the ldap. with phpldapadmin, navigate to hosting, select view childs, as table, select all, edit, paste dovecot: into the postfixTransport attribute and update all. Cheers Dominik

From: kewlrichie at: 2009-12-21 17:33:32

If you want your mail to end up in /home/vmail/domains so the full path of an email mailbox looks like this /home/vmail/domains/example.tld/bob@example.tld, which phamm and ldap is expecting it to be, you would need to change.

mail_location = maildir:/home/vmail/%d/%u

to

mail_location = maildir:/home/vmail/domains/%d/%u

From: Pavel Sebek at: 2010-06-24 08:20:50

Hi,

i would like correct a mistake in guide:

FROM:

----------------------------------------------------

 the file main.php:

 

Change (line 308):

$entry["maildrop"] = "postmaster";

To

$entry["mail"] = "dummy@".$domain_new;

-------------------------------------

TO:

-------------------------------------------------------

the file main.php:

 

Change (line 308):

$entry["maildrop"] = "postmaster";

To

$entry["maildrop"] = "dummy@".$domain_new;

----------------------------------------