# Cyrus-imapd mailbox creating problem [solved]

## Kosa

Hi, I'm trying to setup Postfix + Cyrus-imapd + MySQL and I have troubles creating mailboxes. I'm very unsure how to do this, Postfix and Cyrus seems to be configured ok, because i can send e-mail, but Postfix gives me

```

Jul 17 14:35:24 www1 postfix/pipe[30499]: 9E4A41646B9: to=<info@coolweb.cz>, relay=cyrus, delay=0, status=bounced (data format error. Command output: info: Mailbox does not exist )

```

I can even authenticate to Cyrus, through SASL and MySQL but again get error

```

Jul 17 14:30:10 www1 pop3[30483]: login: [192.168.1.2] info@coolweb.cz plaintext User logged in

Jul 17 14:30:13 www1 pop3[30483]: Unable to locate maildrop for info@coolweb.cz: Mailbox does not exist

```

I tried "cyradm --user cyrus localhost", but i don't know how to set password so i was unable to login.

Thanks for adviceLast edited by Kosa on Sun Jul 17, 2005 5:31 pm; edited 1 time in total

----------

## nms

First of all, when using IMAP (which I'm guessing is your choice when using Cyrus-IMAPd) you need to go with .maildir, not Mailbox (check your /etc/postfix/main.cf and related documentation) which might solve the creation problem.

Second, your log snippet shows 'pop3', which also is not related to IMAP.

If this does not clarify or help in any way, please describe your setup in greater detail.

----------

## Kosa

Thanks for hint, half is solved  :Smile:  After first login to IMAP, Cyrus created mailbox and I'm able to login either with POP3 or IMAP. I can grab messages to IMAP with Outlook and receive them with POP3, so mailbox seems to be ok. Btw. as i can see, Postfix/Cyrus is trying to deliver mail to mailbox "info", but i guess it should be info@coolweb.cz shouldn't it?

My postconf -n looks like this:

```

alias_database = hash:/etc/mail/aliases

alias_maps = hash:/etc/mail/aliases

broken_sasl_auth_clients = yes

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/lib/postfix

debug_peer_level = 2

default_destination_concurrency_limit = 2

home_mailbox = .maildir/

html_directory = /usr/share/doc/postfix-2.2.2-r1/html

local_destination_concurrency_limit = 2

mail_owner = postfix

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

mydomain = coolweb.cz

myhostname = mail.coolweb.cz

newaliases_path = /usr/bin/newaliases

queue_directory = /var/spool/postfix

readme_directory = /usr/share/doc/postfix-2.2.2-r1/readme

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

smtpd_recipient_restrictions = permit_sasl_authenticated        permit_my_networks      reject

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = $myhostname

smtpd_sasl_security_options = noanonymous

unknown_local_recipient_reject_code = 550

virtual_gid_maps = static:407

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains-maps.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

virtual_transport = cyrus

virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid-maps.cf

```

and /etc/imapd.conf

```

# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/imapd.conf,v 1.5 2004/08/27 06:02:45 langthang Exp $

# Don't forget to use chattr +S (if you are using ext[23])

# when you change these directories (read the docs).

configdirectory:        /var/imap

partition-default:      /var/spool/imap

sievedir:               /var/imap/sieve

virtdomains:            userid

createonpost:           yes

tls_ca_path:            /etc/ssl/certs

tls_cert_file:          /etc/ssl/cyrus/server.crt

tls_key_file:           /etc/ssl/cyrus/server.key

# Don't use an everyday user as admin.

admins:                 cyrus

hashimapspool:          yes

allowanonymouslogin:    no

allowplaintext:         yes

# Allow renaming of top-level mailboxes.

#allowusermoves:         yes

# Use this if sieve-scripts could be in ~user/.sieve.

#sieveusehomedir:       yes

# Use saslauthd if you want to use pam for imap.

# But be warned: login with DIGEST-MD5 or CRAM-MD5

# is not possible using pam.

#sasl_pwcheck_method:   saslauthd

####################################################

## This is a recommended authentication method if you

## emerge cyrus-sasl with 'postgres' or 'mysql'

## To use with mysql database uncomment those lines below.

sasl_pwcheck_method: auxprop

sasl_auxprop_plugin: sql

## possible values for sasl_auxprop_plugin 'mysql', 'pgsql', 'sqlite'.

sasl_sql_engine: mysql

## all possible values.

sasl_mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM

## or limit to CRAM-MD5 only

#sasl_mech_list: CRAM-MD5

## change below to suit your setup.

sasl_sql_user:          xxxxxxx

sasl_sql_passwd:        xxxxxxx

sasl_sql_database:      email

sasl_sql_hostnames:     localhost

#sasl_password_format:  crypt

sasl_sql_select:        SELECT passwd FROM users WHERE user = '%u@%r'

```

----------

## Kosa

Huh, log message was very strange  :Sad: 

Main problem was about cyrus and postfix users weren't members of mail group. But i noticed that there will'be some permission problem only after changing transport to LMTP.

----------

