Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) - Page 2

5 Configure Postfix

Now we have to tell Postfix where it can find all the information in the database. Therefore we have to create six text files. You will notice that I tell Postfix to connect to MySQL on the IP address 127.0.0.1 instead of localhost. This is because Postfix is running in a chroot jail and does not have access to the MySQL socket which it would try to connect if I told Postfix to use localhost. If I use 127.0.0.1 Postfix uses TCP networking to connect to MySQL which is no problem even in a chroot jail (the alternative would be to move the MySQL socket into the chroot jail which causes some other problems).

Please make sure that /etc/mysql/my.cnf contains the following line:

vi /etc/mysql/my.cnf

[...]
bind-address            = 127.0.0.1
[...]

If you had to modify /etc/mysql/my.cnf, please restart MySQL now:

/etc/init.d/mysql restart

Run

netstat -tap | grep mysql

to make sure that MySQL is listening on 127.0.0.1 (localhost.localdomain):

root@server1:/usr/src# netstat -tap | grep mysql
tcp        0      0 localhost.localdo:mysql *:*                     LISTEN      7224/mysqld
root@server1:/usr/src#

Now let's create our six text files.

vi /etc/postfix/mysql-virtual_domains.cf

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT domain AS virtual FROM domains WHERE domain='%s'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual_forwardings.cf

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT destination FROM forwardings WHERE source='%s'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual_mailboxes.cf

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='%s'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual_email2email.cf

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT email FROM users WHERE email='%s'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual_transports.cf

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT transport FROM transport WHERE domain='%s'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual_mailbox_limit_maps.cf

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT quota FROM users WHERE email='%s'
hosts = 127.0.0.1

Then change the permissions and the group of these files:

chmod o= /etc/postfix/mysql-virtual_*.cf
chgrp postfix /etc/postfix/mysql-virtual_*.cf

Now we create a user and group called vmail with the home directory /home/vmail. This is where all mail boxes will be stored.

groupadd -g 5000 vmail
useradd -g vmail -u 5000 vmail -d /home/vmail -m

Next we do some Postfix configuration. Go sure that you replace server1.example.com with a valid FQDN, otherwise your Postfix might not work properly!

postconf -e 'myhostname = server1.example.com'
postconf -e 'mydestination = server1.example.com, localhost, localhost.localdomain'
postconf -e 'mynetworks = 127.0.0.0/8'
postconf -e 'virtual_alias_domains ='
postconf -e 'virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf'
postconf -e 'virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf'
postconf -e 'virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf'
postconf -e 'virtual_mailbox_base = /home/vmail'
postconf -e 'virtual_uid_maps = static:5000'
postconf -e 'virtual_gid_maps = static:5000'
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_sasl_authenticated_header = yes'
postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/smtpd.cert'
postconf -e 'smtpd_tls_key_file = /etc/postfix/smtpd.key'
postconf -e 'transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf'
postconf -e 'virtual_create_maildirsize = yes'
postconf -e 'virtual_maildir_extended = yes'
postconf -e 'virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf'
postconf -e 'virtual_mailbox_limit_override = yes'
postconf -e 'virtual_maildir_limit_message = "The user you are trying to reach is over quota."'
postconf -e 'virtual_overquota_bounce = yes'
postconf -e 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps'

Afterwards we create the SSL certificate that is needed for TLS:

cd /etc/postfix
openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) [Some-State]:
<-- Enter your State or Province Name.
Locality Name (eg, city) []:
<-- Enter your City.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
<-- Enter your Organization Name (e.g., the name of your company).
Organizational Unit Name (eg, section) []:
<-- Enter your Organizational Unit Name (e.g. "IT Department").
Common Name (eg, YOUR name) []:
<-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com").
Email Address []:
<-- Enter your Email Address.

Then change the permissions of the smtpd.key:

chmod o= /etc/postfix/smtpd.key

 

6 Configure Saslauthd

First run

mkdir -p /var/spool/postfix/var/run/saslauthd

Then edit /etc/default/saslauthd. Set START to yes and change the line OPTIONS="-c -m /var/run/saslauthd" to OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r":

vi /etc/default/saslauthd

#
# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#

# Should saslauthd run automatically on startup? (default: no)
START=yes

# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"

# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"

# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent  -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam       -- use PAM
# rimap     -- use a remote IMAP server
# shadow    -- use the local shadow password file
# sasldb    -- use the local sasldb database file
# ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"

# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""

# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5

# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# WARNING: DO NOT SPECIFY THE -d OPTION.
# The -d option will cause saslauthd to run in the foreground instead of as
# a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish
# to run saslauthd in debug mode, please run it by hand to be safe.
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

Then create the file /etc/pam.d/smtp. It should contain only the following two lines (go sure to fill in your correct database details):

vi /etc/pam.d/smtp

auth    required   pam_mysql.so user=mail_admin passwd=mail_admin_password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=mail_admin passwd=mail_admin_password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1

Next create the file /etc/postfix/sasl/smtpd.conf. It should look like this:

vi /etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: mail_admin_password
sql_database: mail
sql_select: select password from users where email = '%u'

Next add the postfix user to the sasl group (this makes sure that Postfix has the permission to access saslauthd):

adduser postfix sasl

Then restart Postfix and Saslauthd:

/etc/init.d/postfix restart
/etc/init.d/saslauthd restart

 

7 Configure Courier

Now we have to tell Courier that it should authenticate against our MySQL database. First, edit /etc/courier/authdaemonrc and change the value of authmodulelist so that it reads:

vi /etc/courier/authdaemonrc

[...]
authmodulelist="authmysql"
[...]

Then make a backup of /etc/courier/authmysqlrc and empty the old file:

cp /etc/courier/authmysqlrc /etc/courier/authmysqlrc_orig
cat /dev/null > /etc/courier/authmysqlrc

Then open /etc/courier/authmysqlrc and put the following lines into it:

vi /etc/courier/authmysqlrc

MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD mail_admin_password
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
MYSQL_QUOTA_FIELD quota

During the installation, the SSL certificates for IMAP-SSL and POP3-SSL are created with the hostname localhost. To change this to the correct hostname (server1.example.com in this tutorial), delete the certificates...

cd /etc/courier
rm -f /etc/courier/imapd.pem
rm -f /etc/courier/pop3d.pem

... and modify the following two files; replace CN=localhost with CN=server1.example.com (you can also modify the other values, if necessary):

vi /etc/courier/imapd.cnf

[...]
CN=server1.example.com
[...]

vi /etc/courier/pop3d.cnf

[...]
CN=server1.example.com
[...]

Then recreate the certificates...

mkimapdcert
mkpop3dcert

... and restart Courier:

/etc/init.d/courier-authdaemon restart
/etc/init.d/courier-imap restart
/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop restart
/etc/init.d/courier-pop-ssl restart

By running

telnet localhost pop3

you can see if your POP3 server is working correctly. It should give back +OK Hello there. (Type quit to get back to the Linux shell.)

root@server1:/etc/courier# telnet localhost pop3
Trying ::1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK Hello there.
quit
+OK Better luck next time.
Connection closed by foreign host.
root@server1:/etc/courier#

 

8 Modify /etc/aliases

Now we should open /etc/aliases. Make sure that postmaster points to root and root to your own username or your email address, e.g. like this:

vi /etc/aliases

[...]
postmaster: root
root: postmaster@yourdomain.tld
[...]

or like this (if administrator is your own username):

[...]
postmaster: root
root:   administrator
[...]

Whenever you modify /etc/aliases, you must run

newaliases

afterwards and restart Postfix:

/etc/init.d/postfix restart

Share this page:

32 Comment(s)

Add comment

Comments

From: Antonio J. Delgado at: 2009-07-10 18:39:34

One thinkg I do before this is to hold the postfix package. Thereby I use the command:

echo "postfix hold" | dpkg --set-selections

 And apt won't update postfix in the future and the quotas still working.

Nice tutorial.

From: Pascal at: 2009-09-24 03:55:21

ERROR: Connection dropped by IMAP server

This is error that i got, and when i check log file :

 Sep 24 03:26:12 ser1 imapd: Connection, ip=[::1]
Sep 24 03:26:12 ser1 imapd: LOGIN FAILED, user=sale@example.dom, ip=[::1]
Sep 24 03:26:17 ser1 imapd: LOGOUT, ip=[::1], rcvd=53, sent=332
Sep 24 03:26:34 ser1 imapd: Connection, ip=[::1]
Sep 24 03:26:34 ser1 imapd: LOGIN FAILED, user=sale@example.com, ip=[::1]
Sep 24 03:26:39 ser1 imapd: LOGOUT, ip=[::1], rcvd=53, sent=332
Sep 24 03:26:53 ser1 postfix/postfix-script[4679]: refreshing the Postfix mail system
Sep 24 03:26:53 ser1 postfix/master[4562]: reload configuration /etc/postfix
Sep 24 03:29:42 ser1 imapd: Connection, ip=[::1]
Sep 24 03:29:42 ser1 imapd: chdir example.com/sales/: No such file or directory
Sep 24 03:29:45 ser1 imapd: Connection, ip=[::1]
Sep 24 03:29:45 ser1 imapd: chdir example.com/sales/: No such file or directory
Sep 24 03:29:49 ser1 imapd: Connection, ip=[::1]
Sep 24 03:29:49 ser1 imapd: chdir example.com/sales/: No such file or directory
Sep 24 03:30:45 ser1 postfix/smtpd[4662]: timeout after END-OF-MESSAGE from localhost.localdomain[127.0.0.1]
Sep 24 03:30:45 ser1 postfix/smtpd[4662]: disconnect from localhost.localdomain[127.0.0.1]
Sep 24 03:51:46 ser1 imapd: Connection, ip=[::1]
Sep 24 03:53:07 ser1 imapd: Connection, ip=[::1]

------

Any idea for my problem ..

thanks anyway

From: xdanx at: 2010-01-01 22:22:51

Hey mate, you need to send a mail first.

 you get Sep 24 03:29:45 ser1 imapd: chdir example.com/sales/: No such file or directory

because you didn't send a mail first . 

Run

mailx sales@example.com 

 Cheers, 

Dan

From: Anonymous at: 2010-11-11 02:37:36

ERROR: Connection dropped by IMAP server

I want it very much, because i'am too.

From: Larry at: 2009-11-26 01:27:59

I have been using this setup for my mail server and love it.   I have a problem that I have not been able to resolve and I was wondering if someone could help me out.   My server needs to have multiple IP addresses bound to one interface.   My problem is that postfix always wants to send mail using the highest IP address.  This behaviour will not work for my setup.  I have tried having Postfix bind to a specific address, but it breaks the ClamAV/Amasvisd.   Any suggestions on how I can work with this. 

From: Silvio Relli at: 2009-06-13 19:44:40

Hello

On page 2, when configuring postfix, giving this command:

postconf -e 'mydestination = server1.example.com, localhost, localhost.localdomain'

Il will not work, because server1.example.com is both on mydestination and in the domain table (on the db).

Postfix will say in the log: postfix/trivial-rewrite[1896]: warning: do not list domain server1.example.com in BOTH mydestination and virtual_mailbox_domains

Simply don't put server1.example.com inside mydestination

 Other users had the same problem: http://www.howtoforge.com/forums/showpost.php?p=42337&postcount=12

 

Ciao,

Sivlio

From: Dzy at: 2009-08-02 20:08:31

very good tutorial, thanks. 

 but having some trouble with smtp server, sending mail to world from webmail, where smtp is called as localhost is just fine, the problem begins in outlook, where i have to call smt as mail.address.tld.

error i got: 

Aug  2 22:57:56 ubuntu postfix/smtpd[8539]: NOQUEUE: reject: RCPT from unknown[x.x.x.x]: 554 5.7.1 <world@some-address.tld>: Relay access denied; from=<local@other-address.tld> to=<world@some-address.tld> proto=ESMTP helo=<[x.x.x.x]>. 

 any questions? or quick solution?

From: Anonymous at: 2009-09-18 00:42:01

So do we, anyfixes?

From: Jay at: 2009-09-18 00:56:34

If you get the RELAY ACCESS DENIED error in webmail or SquirrelMail open do this...  /usr/sbin/squirrelmail-configure   <-- then choose 2, for server settings, then change sending mail from SMTP to sendmail :)

From: Anonymous at: 2010-06-07 06:25:03

@Jay - That worked for me. Thanks!

 

If you get the RELAY ACCESS DENIED error in webmail or SquirrelMail open do this...  /usr/sbin/squirrelmail-configure   <-- then choose 2, for server settings, then change sending mail from SMTP to

 

 

From: Pablo R. Ferretti at: 2009-08-28 20:35:03

root@t300:/etc/postfix/sasl# tail /var/log/mail.log
Aug 28 17:16:35 t300 postfix/smtpd[3526]: connect from adm.xxx.com.br[189.xxx.xxx.5]
Aug 28 17:16:35 t300 postfix/smtpd[3526]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Aug 28 17:16:35 t300 postfix/smtpd[3526]: warning: adm.xxx.com.br[189.xxx.xxx.5]: SASL LOGIN authentication failed: generic failure
Aug 28 17:16:35 t300 postfix/smtpd[3526]: lost connection after AUTH from adm.xxx.com.br[189.xxx.xxx.5]
Aug 28 17:16:35 t300 postfix/smtpd[3526]: disconnect from adm.xxx.com.br[189.xxx.xxx.5]

Edit file: /etc/postfix/sasl/smtpd.conf

Insert line: saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux

/etc/init.d/postfix restart

/etc/init.d/saslauthd restart

resolved problem!!

 

From: at: 2010-03-05 13:00:14

GREAT !!!!!!!!!!!!!!!!!!

This reply resolve my 8 month issue no body remove this error . I was not sleeping from last 8 months to having this issue this issue .

I asked from so many perosns 

Thanks Again !!! 

This forums must be together with followed tutorial http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu9.04

From: Antonio J Delgado at: 2009-06-22 11:13:41

In my case the 10th step didn't work until a change the provideer of the package dcc to this:
wget http://www.rhyolite.com/dcc/source/dcc.tar.Z && tar xzvf dcc.tar.Z

From: Joshua Flory at: 2009-07-15 01:08:56

Be careful in part 10 here.  The file name you download here doesn't reference the version, but the directory this gets extracted to has a different version than the one shown here.

 For example when I did this I got version 1.3.111 so I had to change just the step:

cd dcc-dccproc-1.3.104

to

cd dcc-dccproc-1.3.111

The rest of those commands stayed the same.

From: simple69 at: 2009-06-14 15:52:23

Awesome, thanks for this great guide falko.  Worked perfect the first time.:)

From: UNi at: 2009-10-16 19:41:18

This resolved the IMAP issue:

mkdir /home/vmail/example.com
chown -R vmail.vmail /home/vmail/example.com/yourname
maildirmake /home/vmail/example.com/yourname

 

-UNi

From: Khosro at: 2010-05-27 11:44:39

Hi UNi,

Thanks for your instructions.I have got this error " ERROR: Connection dropped by IMAP server." ,but your instructions solved my problem.

I only changed your instruction like this :

If your email address is "sales@example.com", so do the following instructions :

root@d3:~# mkdir /home/vmail/example.com/
root@d3:~# chown -R vmail.vmail /home/vmail/example.com/sales
root@d3:~# maildirmake /home/vmail/example.com/sales
root@d3:~# chown -R vmail.vmail /home/vmail/example.com/sales
 

Khosro.

From: Anonymous at: 2009-10-16 16:08:17

I have a problem ERROR: Connection dropped by IMAP server.

From: Louis_16 at: 2009-06-24 07:47:28

Thank's a lot for all this thankable job !

It was much more than helpful. It works perfectly and it solves all my needs.

Thnak's again.

From: Angelo A. at: 2009-06-29 03:55:56

I followed this tutorial and it actually works, there was a problem with the change_sql plugin because they have thier plugin site down.

I got a copy of this instead  squirrelmail-change-sqlpass-plugin-3.3.tbz

I am hoping this is the equivalent at the very least, anywys when I try to login I get this error:

ERROR: Connection dropped by IMAP server.

Normally I would check all the logs for errors but I am just starting out with Ubuntu and POSTFIX and am not sure what to look for or where all the logs are.

Any assistance would be greatly appreciated.

This is on an Ubuntu 9.04 server box, no head on it.

 

From: Glenn at: 2009-06-29 13:37:26

I am getting the exact same problem - dropped by imap server.... please help.

From: Rui Rocha at: 2009-08-23 14:50:05

The problem that IMAP dropeed by peer is because your mailbox didn't get any e-mail yet, and therefore the folder is not created.

 Try to send an e-mail to the account that you created and then check it again. I know that you follow the mailx on the tutorial, but imagine that your SMTP has not relay, then the e-mail that you sent, never got the mailbox!! Try to send an e-mail by hotmail, or something like that.

Thank, probably, you will get a BLANK PAGE. If it is so, pls unable the plugins. They are in conflict. I don't know yet the solution, but if it occurs is because of that.

VERY NICE AND GREAT TUTORIAL!!

Thanks

Rui

From: Fhox at: 2009-06-29 07:35:26

On 06/29/2009

SECURITY: SquirrelMail Webserver Compromised

Other option for download plugin's

 ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/squirrelmail/

 Slds
Fhox

From: Exp at: 2009-07-13 08:41:47

Hey excellent work!!! it worked at first too!!!

 I'd like to know how to install vacation with the configuration from this HOWTO.

 Thank you very much.

From: at: 2009-07-17 02:57:12

It's an awsome tuto... Thanks Falko.

what should I do next ? 

From: simple69 at: 2009-11-11 21:19:07

Make sure you follow the instructions for the mailx.  You have to send a test email to the email address first so that the system creates the maildir and such

From: rakeshakurathi at: 2010-01-14 16:47:41

using... i mean the installation process is specific for  one version...

 and follow the instructions line by line...

 i have taken 3 days to actually execute my mail server....

 if u any errors. don try to check where u have gone wrong ,just unistall the postfix first and redo it ----

 thanks falko....for ur tutorial .. can u help me to configure this mail server to outlook and thunderbird..

 

 

 

 

 

From: blatch at: 2011-12-15 11:58:28

i am using multilogin plugins and i have 3 domains. i select one of them from the homepage of squirrelmail. my problem is that 2 domains works but the other not working. i am using change_sqlpass plugins. And the error is Could not make database connection. how can it be worked?

From: Kaikun at: 2009-11-01 12:06:19

I have the same problem... either telnet or squirrelmail I cannot connect...

 

Nov  1 21:01:30 server02 pop3d: Connection, ip=[::ffff:114.149.77.124]
Nov  1 21:01:59 server02 pop3d: LOGIN, user=sales@my_domain.net, ip=[::ffff:114.149.77.124], port=[61349]
Nov  1 21:01:59 server02 pop3d: scancur opendir("cur"): No such file or directory
 

 

- Help!!!

From: D-Bo at: 2009-09-25 14:42:05

Will Spamassassin still poll local.cf for configuration? Will 'whitelist_from' work with this configuration?

From: Nakarti at: 2009-09-30 18:55:36

In trying to add sql_changepass to The Perfect Server with ISPConfig 3(since that howto gives a management console and worked the first try for me,) I had not installed PearDB before adding the sql changepass, and now that I have, get the error: "Could not find Pear DB library" when I try it.

Other questions on this error refer to whether peardb is installed, which it is, it has the components others list as missing, is there another service I have to restart than apache for PearDB to load properly?

(Courier has a terrible init script!)

From: DR at: 2009-09-06 21:08:31

Getting the exact same ERROR: Connection dropped by IMAP server.

 Here is the log:

Session is hitting the server but the server seems to be timing out or something... Sep  6 01:18:53 postfix postfix/smtp[17790]: 4C875306257: to=<sales@xxx.xxx.com>, relay=none, delay=2351, delays=2321/0.03/30/0, dsn=4.4.1, sta$
Sep  6 01:18:53 postfix postfix/smtp[17793]: 0B4BF306269: to=<myaccount@xxx.xxx.com>, relay=none, delay=362, delays=332/0.07/30/0, dsn=4.4.1, st$
Sep  6 01:18:53 postfix postfix/smtp[17792]: 6E90B306268: to=<myaccount@xxx.xxx.com>, relay=none, delay=546, delays=516/0.05/30/0, dsn=4.4.1, st$
Sep  6 01:18:53 postfix postfix/smtp[17791]: C8B6D306261: to=<myaccount@xxx.xxx.com>, relay=none, delay=1134, delays=1104/0.04/30/0, dsn=4.4.1, $
Sep  6 01:19:04 postfix imapd: Connection, ip=[::1]
Sep  6 01:19:04 postfix imapd: chdir xxx.xxx.com/myaccount/: No such file or directory
Sep  6 01:28:23 postfix postfix/qmgr[16842]: 6E90B306268: from=<myaccount@gmail.com>, size=2420, nrcpt=1 (queue active)
Sep  6 01:28:23 postfix postfix/qmgr[16842]: 0B4BF306269: from=<myaccount@mydomain.com>, size=1438, nrcpt=1 (queue active)
Sep  6 01:28:53 postfix postfix/smtp[17889]: connect to postfix.xxx.xxx.com[##.##.###.###]:25: Connection timed out
Sep  6 01:28:53 postfix postfix/smtp[17888]: connect to postfix.xxx.xxx.com[##.##.###.###]:25: Connection timed out
Sep  6 01:28:53 postfix postfix/smtp[17889]: 0B4BF306269: to=<myaccount@xxx.xxx.com>, relay=none, delay=963, delays=933/0.03/30/0, dsn=4.4.1, st$
Sep  6 01:28:53 postfix postfix/smtp[17888]: 6E90B306268: to=<myaccount@xxx.xxx.com>, relay=none, delay=1146, delays=1116/0.37/30/0, dsn=4.4.1, $

I suspect this could be a problem: Sep  6 01:19:04 postfix imapd: chdir xxx.xxx.com/myaccount/: No such file or directory

This tutorial is great...I feel like I'm almost there. I can get mail in through the firewall. I can get it to the server, i just cannot seem to get the connection to not timeout. Gah!

Any help would be greatly, greatly, appreciated.