Skip to content

Instantly share code, notes, and snippets.

@tareko
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save tareko/10293776 to your computer and use it in GitHub Desktop.

Select an option

Save tareko/10293776 to your computer and use it in GitHub Desktop.
dovecot won't deliver to the right place
# Authentication for SQL users. Included from auth.conf.
#
# <doc/wiki/AuthDatabase.SQL.txt>
passdb {
driver = sql
# Path for SQL configuration file, see example-config/dovecot-sql.conf.ext
args = /etc/dovecot/dovecot-sql.conf.ext
}
# "prefetch" user database means that the passdb already provided the
# needed information and there's no need to do a separate userdb lookup.
# <doc/wiki/UserDatabase.Prefetch.txt>
#userdb {
# driver = prefetch
#}
#userdb {
# driver = sql
# args = /etc/dovecot/dovecot-sql.conf.ext
#}
# If you don't have any user-specific settings, you can avoid the user_query
# by using userdb static instead of userdb sql, for example:
# <doc/wiki/UserDatabase.Static.txt>
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/vmail/%d/%n
}
# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.0.20-xenU i686 Debian 7.4 ext3
mail_home = /var/vmail/%d/%n
mail_location = maildir:/var/vmail/%d/%n/Maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = " imap sieve pop3"
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service imap-login {
inet_listener imaps {
port = 993
ssl = yes
}
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
args = uid=vmail gid=vmail home=/var/vmail/%d/%n
driver = static
}
protocol lda {
mail_plugins = " sieve"
}
driver = mysql
connect = host=127.0.0.1 dbname=mailserver user=user password=pass
default_pass_scheme = PLAIN-MD5
password_query = SELECT email as user, password FROM virtual_users WHERE email='%u';
Apr 9 dovecot: lda(vmail): Error: User vmail doesn't have home dir set, disabling duplicate database
Apr 9 postfix/smtpd[9951]: disconnect
Apr 9 14:24:41 core postfix/smtpd[6535]: connect from
Apr 9 14:24:41 core dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Apr 9 14:24:41 core dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Apr 9 14:24:41 core dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_pgsql.so
Apr 9 14:24:41 core dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_sqlite.so
Apr 9 14:24:41 core dovecot: auth: Debug: auth client connected (pid=0)
Apr 9 14:24:41 core postfix/smtpd[6535]: E471C6057D: client=
Apr 9 14:24:41 core postfix/cleanup[6542]: E471C6057D: message-id=<53459@aaa>
Apr 9 14:24:41 core postfix/qmgr[2309]: E471C6057D: from=<me@my.com>, size=867, nrcpt=1 (queue active)
Apr 9 14:24:42 core dovecot: lda: Debug: Loading modules from directory: /usr/lib/dovecot/modules
Apr 9 14:24:42 core dovecot: lda: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: Effective uid=1005, gid=1001, home=
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail//vmail/Maildir
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: maildir++: root=/var/vmail//vmail/Maildir, index=, control=, inbox=/var/vmail//vmail/Maildir, alt=
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: userdb lookup skipped, username taken from passwd lookup for process euid
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: none: root=, index=, control=, inbox=, alt=
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: Destination address: vmail@MYHOST (source: user@hostname)
Apr 9 14:24:42 core dovecot: lda(vmail): Error: User vmail doesn't have home dir set, disabling duplicate database
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts.
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: sieve: script file /var/vmail//vmail/.dovecot.sieve not found
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: sieve: user's script /var/vmail//vmail/.dovecot.sieve doesn't exist (using default script location instead)
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: sieve: no default script configured for user
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: sieve: user has no valid location for a personal script
Apr 9 14:24:42 core dovecot: lda(vmail): Debug: sieve: no scripts to execute: reverting to default delivery.
Apr 9 14:24:42 core postfix/smtpd[6535]: disconnect from
Apr 9 14:24:42 core dovecot: lda(vmail): : saved mail to INBOX
Apr 9 14:24:42 core postfix/pipe[6544]: E471C6057D: to=<>, relay=dovecot, delay=0.14, delays=0.09/0.01/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
Apr 9 14:24:42 core postfix/qmgr[2309]: E471C6057D: removed
Apr 9 14:24:51 core dovecot: auth: Debug: auth client connected (pid=6546)
Apr 9 14:24:51 core dovecot: auth: Debug: client in: AUTH#0111#011PLAIN#011service=imap#011secured#011session=CM1sN6D2GgB/AAAB#011lip=127.0.0.1#011rip=127.0.0.1#011lport=993#011rport=43546#011resp=<hidden>
Apr 9 14:24:51 core dovecot: auth-worker(6548): Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Apr 9 14:24:51 core dovecot: auth-worker(6548): Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Apr 9 14:24:51 core dovecot: auth-worker(6548): Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_pgsql.so
Apr 9 14:24:51 core dovecot: auth-worker(6548): Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_sqlite.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment