The easiest way would be to put:
/server/apache/bin/apachectl start
into "/etc/rc.local". The better way to do it would be to create an /etc/init/apache.conf upstart script, I believe the correct values would be something along the lines of:
start on runlevel [2345]
stop on runlevel [!2345]
expect daemon
exec /server/apache/bin/apachectl start
pre-stop exec /server/apache/bin/apachectl stop
Then run "initctl start apache" to start it and "initctl stop apache" to stop it. For more information on upstart configuration files like the above, see "man 5 init".
The tutorial is from May 9th, 2010.
v1.2.6 2009-10-05
The last dovecot version before that date
v2.0.rc1 2010-07-02
The next dovecot version after that date
So the tutorial probably will use a 1.x configuration, while nowadays we will use dovecot 2.x.
Well and A LOT has changed in how the configuration is set since then.
Now I found this http://wiki2.dovecot.org/Upgrading/2.0
Next to some other info, it provides a way to convert the config from 1.2 to 2.0.
Here's even more about upgrading http://wiki2.dovecot.org/Upgrading
I have no solution though (yet)
Edit:
Better solution
Just forget that tuorial from http://library.linode.com and use this up to date much better tutorial
http://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
It also shows you how to install spam filter, anti virus detection and add more security to your mail server. Also with this solution you'll be able to very easily add multiple domains.
I had the solution below working first, now I switched to that solution and it works and does what I want perfectly.
Question related solution
But if you must exactly find a solution for the dovecot problem like described in the question, here's how I solved the problem...
also install:
apt-get install dovecot-sieve
apt-get install dovecot-managesieved
apt-get install dovecot-mysql
if you like, read the hints on upgrading the old 1.x config
http://wiki2.dovecot.org/Upgrading
My dovecot.conf:
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir
namespace {
inbox = yes
location =
prefix = INBOX.
separator = .
type = private
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
mode = 0600
user = vmail
}
user = root
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
#userdb {
# args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
# driver = static
#}
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
log_path = /home/vmail/dovecot-deliver.log
mail_plugins = sieve
postmaster_address = postmaster@example.com
plugin {
sieve_global_path = /var/vmail/globalsieverc
# The include extension fetches the :personal scripts from this
# directory. When ManageSieve is used, this is also where scripts
# are uploaded.
sieve_dir = ~/sieve
# The location of the user's active script:
sieve = ~/.dovecot.sieve
# Directory for :global include scripts (for v1.1 include extension)
sieve_global_dir = /var/vmail/sieve
sieve_maxscriptsize = 128
}
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
My dovecot-db.conf.ext
driver = mysql
connect = host=127.0.0.1 dbname=mail user=mail_admin password=your_password
default_pass_scheme = CRYPT
#password_query = SELECT email as user, password FROM users WHERE email='%u';
#user_query = SELECT email as user, password, 5000 as uid, 5000 as gid, '/var/vmail/%d/%n' as home FROM view_users WHERE email='%u';
password_query = SELECT email AS user, password, 5000 AS userdb_uid, 5000 AS userdb_gid, '/var/vmail/%d/%n' AS userdb_home FROM users WHERE email = '%u';
user_query = SELECT email AS user, password, 5000 AS uid, 5000 AS gid, '/var/vmail/%d/%n' AS home FROM users WHERE email = '%u';
My /etc/postfix/sasl/smtpd.conf (note the auxprop_plugin:sql, sql_engine:mysql, and the '%u@%r')
pwcheck_method: saslauthd
mech_list: plain login pam
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: your_password
sql_database: mail
sql_select: select password from users where email = '%u@%r'
Sources:
I've gathered all infos about this by googling, and don't know where I was everywhere, but the last problem
2013-01-03 16:43:27 lda: Error: userdb lookup(info@example.com): Disconnected unexpectedly
2013-01-03 16:43:27 lda: Fatal: Internal error occurred. Refer to server log for more information.
I solved reading some of http://workaround.org/ispmail/lenny/configure-dovecot
Basically, I found that you get good results when you google whatever error output you get in here:
/home/vmail/dovecot-deliver.log
/var/log/mail.log
/var/log/mail.err
/var/log/syslog
Best Answer
Ubuntu uses Upstart.
http://upstart.ubuntu.com/
It looks like in this case that starting up networking starts up the other networking services, including Samba. Likely in this case that Samba is misconfigured, so it couldn't start up. You can either fix Samba or uninstall it if you are not using it.