Feisei
November 20th, 2008, 04:29 AM
I'm running postfix and courier-imap with virtual mailboxes. For some reason my mail program won't display the mail folders for a virtual user (let's say his name is Jack).
I can send an email to Jack from another (non virtual) account just fine. When I check the actual file system I see the newly arrived email sitting there in the mail folder. So the postfix part of the mail system is working fine.
I checked my mail logs and it shows that the virtual user was authenticated succesfully by the courier authentication daemon. Seems all good to me.
But for some reason I just cannot see the email in my mail program. When I ask it (Thunderbird) to search for imap folders it just gives me an empty result.
Any idea what could be wrong?
Here are some of my config files:
/etc/courier/authdaemonrc
authmodulelist="authuserdb authpam"
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
daemons=5
authdaemonvar=/var/run/courier/authdaemon
DEBUG_LOGIN=1
DEFAULTOPTIONS=""
LOGGEROPTS=""
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = server.local
mydestination = localhost
mynetworks = 127.0.0.0/8, 192.168.1.0/24
virtual_mailbox_domains = example.com
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtp_tls_key_file = /etc/ssl/private/smtpd.key
smtp_tls_CAfile = /etc/ssl/certs/cacert.pem
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = noanonymous
/etc/postfix/vmailbox
jack@example.com example/jack/
mail.log
Nov 20 17:19:11 webserver imapd-ssl: Connection, ip=[::ffff:192.168.1.21]
Nov 20 17:19:11 webserver authdaemond: received auth request, service=imap, authtype=login
Nov 20 17:19:11 webserver authdaemond: authuserdb: trying this module
Nov 20 17:19:11 webserver authdaemond: userdb: opened /etc/courier/userdb.dat
Nov 20 17:19:11 webserver authdaemond: userdb: looking up 'jack'
Nov 20 17:19:11 webserver authdaemond: userdb: home=/var/mail/vhosts/example/jack, uid=0, gid=0, shell=<unset>, mail=/var/mail/vhosts/example/jack, quota=<unset>, gecos=<unset>, options=<unset>
Nov 20 17:19:11 webserver authdaemond: found systempw in userdbshadow
Nov 20 17:19:11 webserver authdaemond: authuserdb: sysusername=<null>, sysuserid=0, sysgroupid=0, homedir=/var/mail/vhosts/example/jack, address=jack, fullname=<null>, maildir=/var/mail/vhosts/example/jack, quota=<null>, options=<null>
Nov 20 17:19:11 webserver authdaemond: password matches successfully
Nov 20 17:19:11 webserver authdaemond: Authenticated: sysusername=<null>, sysuserid=0, sysgroupid=0, homedir=/var/mail/vhosts/example/jack, address=jack, fullname=<null>, maildir=/var/mail/vhosts/example/jack, quota=<null>, options=<null>
I can send an email to Jack from another (non virtual) account just fine. When I check the actual file system I see the newly arrived email sitting there in the mail folder. So the postfix part of the mail system is working fine.
I checked my mail logs and it shows that the virtual user was authenticated succesfully by the courier authentication daemon. Seems all good to me.
But for some reason I just cannot see the email in my mail program. When I ask it (Thunderbird) to search for imap folders it just gives me an empty result.
Any idea what could be wrong?
Here are some of my config files:
/etc/courier/authdaemonrc
authmodulelist="authuserdb authpam"
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
daemons=5
authdaemonvar=/var/run/courier/authdaemon
DEBUG_LOGIN=1
DEFAULTOPTIONS=""
LOGGEROPTS=""
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = server.local
mydestination = localhost
mynetworks = 127.0.0.0/8, 192.168.1.0/24
virtual_mailbox_domains = example.com
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtp_tls_key_file = /etc/ssl/private/smtpd.key
smtp_tls_CAfile = /etc/ssl/certs/cacert.pem
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = noanonymous
/etc/postfix/vmailbox
jack@example.com example/jack/
mail.log
Nov 20 17:19:11 webserver imapd-ssl: Connection, ip=[::ffff:192.168.1.21]
Nov 20 17:19:11 webserver authdaemond: received auth request, service=imap, authtype=login
Nov 20 17:19:11 webserver authdaemond: authuserdb: trying this module
Nov 20 17:19:11 webserver authdaemond: userdb: opened /etc/courier/userdb.dat
Nov 20 17:19:11 webserver authdaemond: userdb: looking up 'jack'
Nov 20 17:19:11 webserver authdaemond: userdb: home=/var/mail/vhosts/example/jack, uid=0, gid=0, shell=<unset>, mail=/var/mail/vhosts/example/jack, quota=<unset>, gecos=<unset>, options=<unset>
Nov 20 17:19:11 webserver authdaemond: found systempw in userdbshadow
Nov 20 17:19:11 webserver authdaemond: authuserdb: sysusername=<null>, sysuserid=0, sysgroupid=0, homedir=/var/mail/vhosts/example/jack, address=jack, fullname=<null>, maildir=/var/mail/vhosts/example/jack, quota=<null>, options=<null>
Nov 20 17:19:11 webserver authdaemond: password matches successfully
Nov 20 17:19:11 webserver authdaemond: Authenticated: sysusername=<null>, sysuserid=0, sysgroupid=0, homedir=/var/mail/vhosts/example/jack, address=jack, fullname=<null>, maildir=/var/mail/vhosts/example/jack, quota=<null>, options=<null>