[Dovecot] dovecot not delivering emails in the right folder
paulino at calderonpale.com
paulino at calderonpale.com
Sun Feb 6 00:11:18 EET 2011
Hello everyone,
I'm having trouble getting postfix + dovecot to work correctly.
It seems like Postfix is receiving and delivering the emails correctly but
dovecot is placing/looking for them in the wrong folder therefore the
clients aren't receiving any new emails.
I switched from courier and followed a tutorial found here:
http://library.linode.com/email/postfix/dovecot-mysql-debian-5-lenny
Dovecot's log:
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: Module
loaded: /usr/lib/dovecot/modules/lda/lib90_cmusieve_plugin.so
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: auth
input: adomain.com/test/@adomain.com
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: auth
input: uid=5000
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: auth
input: gid=5000
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: auth
input: home=/home/vmail/adomain.com/adomain.com/test/
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: maildir:
data=/home/vmail/adomain.com/adomain.com/test/
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info: maildir:
root=/home/vmail/adomain.com/adomain.com/test,
index=/home/vmail/adomain.com/adomain.com/test, control=, inbox=
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info:
cmusieve: Using sieve path: /home/vmail/globalsieverc
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info:
cmusieve: Executing script /home/vmail/globalsievercc
deliver(adomain.com/test/@adomain.com): 2011-02-04 21:48:04 Info:
msgid=<AANLkTimZi7pD2eSFNipHtmS5HZVstk9UF6kjWEyqynz- at mail.gmail.com>:
saved mail to INBOX
It seems like is using a wrong folder value since it should be using
/home/vmail/adomain.com/test. Another odd thing is that postfix is
replacing the email address with /folder/user at adomain.com.
Postfix after receiving an email:
3:48:04 domain postfix/smtpd[29365]: 8FDC1A339:
client=mail-yx0-f169.google.com[209.85.213.169]
Feb 5 03:48:04 domain postfix/cleanup[29369]: 8FDC1A339:
message-id=<AANLkTimZi7pD2eSFNipHtmS5HZVstk9UF6kjWEyqynz- at mail.gmail.com>
Feb 5 03:48:04 domain postfix/qmgr[27253]: 8FDC1A339:
from=<xxx at gmail.com>, size=1815, nrcpt=1 (queue active)
Feb 5 03:48:04 domain postfix/pipe[29370]: 8FDC1A339:
to=<adomain.com/test/@adomain.com>, orig_to=<test at adomain.com>,
relay=dovecot, delay=0.21, delays=0.2/0.01/0/0.01, dsn=2.0.0, status=sent
(delivered via dovecot service)
Feb 5 03:48:04 domain postfix/qmgr[27253]: 8FDC1A339: removed
My config files:
main.cf
==============================
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
message_size_limit = 30720000
mydestination = localhost, localhost.localdomain
myhostname = adomain.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
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
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_cert_file = /etc/postfix/cert.ca.crt
smtpd_tls_key_file = /etc/postfix/cert.ca.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains =
virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,
mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
dovecot.conf:
======================
protocols = imap imaps
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir
mail_debug = yes
disable_plaintext_auth = no
ssl_cert_file = /etc/postfix/cert.crt
ssl_key_file = /etc/postfix/cert.key
namespace private {
separator = .
prefix = INBOX.
inbox = yes
}
protocol lda {
log_path = /home/vmail/dovecot-deliver.log
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = postmaster at adomain.com
mail_plugins = cmusieve
global_script_path = /home/vmail/globalsieverc
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
auth default {
user = root
mechanisms = plain login
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb static {
args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
dovecot version: 1.0.15
# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf
driver = mysql
connect = host=127.0.0.1 dbname=mail user=mail_admin password=xxx
default_pass_scheme = CRYPT
password_query = SELECT email as user, password FROM users WHERE email='%u';
Thanks, any help/pointers will be greatly appreciated.
More information about the dovecot
mailing list