Virtual Domains + Cyrus ImapdCan anyone help me!

dima at tverufps.ru dima at tverufps.ru
Tue Nov 30 13:40:57 EST 2004


Hi everyone!

i have a problem with virtual domains setup on my mail-server.
Mail server is: OpenBSD 3.6 + Cyrus-imap 2.2.10 + Cyrus-sasl 2.1.20 + MySQL 4.0.20

And it's work fine. But now i have to create something neer 50
accounts on this server from another domain and every user must have
his own mailbox. As it was at old mail-server. It must not be a mail forwarding or redirect.
I deside to add virtual mailboxes to the existing mail server.

This is my imapd.conf:

postmaster: postmaster
admins:cyrus root cyrus
allowplaintext: yes
configdirectory: /var/imap
lmtpsocket: /var/imap/socket/lmtp
partition-default: /var/spool/imap
plaintextloginpause: 3
reject8bit: no
rfc2046_strict: 1
############################################
virtdomains:userid
loginrealms:domain2.org
defaultdomain:domain1.org
#############################################
srvtab: /dev/null
duplicatesuppression: yes
loglevel: 256
unixhierarchysep: no
altnamespace: yes
password_format:        plaintext
sasl_pwcheck_method:    auxprop
sasl_auxprop_plugin:    sql
sasl_sql_engine:        mysql
sasl_mech_list:         PLAIN
sasl_sql_user:          cyrus
sasl_sql_passwd:        cyrus
sasl_sql_hostnames:     localhost
sasl_sql_database:      mail
sasl_sql_select:        SELECT password FROM user WHERE username = '%u'
sasl_sql_verbose:       yes


I create some virtual users with cyradm
 cyradm -u cyrus localhost
IMAP Password:
              localhost> lm
INBOX (\HasNoChildren)                user.dm at domain2.org (\HasNoChildren)
user.dm (\HasNoChildren)


directory was created by cyradm:

/var/spool/imap/domain/domain2.org/user/dm/

my postfix's main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
default_privs = nobody
myhostname = ms.domain1.org
mydomain = domain1.org
myorigin = $mydomain
luser_relay=postmaster at domain1.org
mailbox_transport=cyrus
fallback_transport=lmtp:unix:/var/imap/socket/lmtp

alias_maps = mysql:/etc/postfix/aliases.cf

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8

setgid_group = postdrop
message_size_limit=51200000
broken_sasl_auth_clients = yes
readme_directory = no
sendmail_path = /usr/sbin/sendmail
html_directory = no
manpage_directory = /usr/local/man
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
unknown_local_recipient_reject_code = 450
#######################################################################
home_mailbox = Mailbox
#######################################################################
virtual_transport = cyrus
virtual_mailbox_base = /var/spool/imap/domain
#virtual_mailbox_domains = domain2.org
#virtual_alias_maps = mysql:/etc/postfix/virtual.cf
virtual_alias_maps = hash:/etc/postfix/virtual
#########################################################################
relay_domains = mysql:/etc/postfix/relay.cf
smtpd_sender_restrictions = mysql:/etc/postfix/access.cf
transport_maps = mysql:/etc/postfix/transport.cf
smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, permit_tls_clientcerts
smtpd_sender_restrictions = permit_sasl_authenticated
smtpd_client_restrictions = permit_sasl_authenticated


cat virtual

domain2.org             wwww
postmaster at domain2.org  posmaster
dm at domain2.org          dm
@domain2.org            dm at domain2.org - default way for unknown_users at domain2.org

postmap virtual

But i cant deliver mail to virtual mailbox...

Nov 30 21:39:49 vm36 postfix/pipe[4708]: 72E96F2B5: to=<dm at domain2.org>, relay=cyrus, delay=1, status=bounced (data format error. Command output: dm: Mailbox does not exist )






---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list