Virtual Domain problem

Brad brad at bradandkim.net
Mon Feb 21 10:59:21 EST 2005


I am trying to set up Postfix, Cyrus and MySQL to handle virtual
domains.  I have a way that works OK using separate Cyrus configs for
each domain and running multiple instances of each Cyrus service.  The
problem with that is I am left using procmail to filter out mail by
domain and hand to deliver with the -C option.  Bcc does not play well
with procmail.

So I am changing this setup to have Postfix deliver directly to Cyrus
and trying to get Cyrus going with virtual domains.  I prefer the
separate IP for each domain method as I don't want to make users log in
with fully qualified email address.  Every time I log into pop and enter
user/pass, my mysql logs show a query for the default domain.  My mysql
setup is pretty much the setup used in web-cyradm.  I am trying this
with both cyrus-imapd-2.1.12 and cyrus-imapd-2.2.10.

Can anyone see why Cyrus is not passing the correct domain name to the
SQL auxprop plugin?

Here are clips of my configs:

---imapd.conf---
configdirectory: /var/imap/domain1.com
partition-default: /var/spool/imap/domain1.com
servername: domain1.com
admins: root, cyrus
allowanonymouslogin: no
sasl_pwcheck_method: auxprop
sasl_sql_engine: mysql
sasl_sql_database: mail
sasl_sql_select: SELECT password FROM accountuser WHERE username = '%u'
and domain_name = '%r'
auxprop_plugin: mysql
sasl_mech_list: PLAIN
allowplaintext: yes
sievedir: /usr/sieve
sendmail: /usr/sbin/sendmail
sieve_maxscriptsize: 32
sieve_maxscripts: 5
sasl_sql_user: user
sasl_sql_passwd: pass
sasl_sql_hostnames: localhost
sasl_sql_verbose: yes
imapidresponse: no
quotawarn: 90
virtdomains: yes
partition-domain2: /var/spool/imap/domain2.com
configdirectory-domain2:  /var/imap/domain2.com
servername-bandk: domain2.com
defaultdomain: default
unixhierarchysep: yes
-------------------------------------------
---cyrus.conf---

START {
mboxlist               cmd="ctl_cyrusdb -r" prefork=5
deliver                cmd="ctl_cyrusdb
}

SERVICES {
imapd                   cmd="imapd" listen="imap" prefork=1
pop3                    cmd="pop3d" listen="pop3" prefork=1
}

EVENTS {
 checkpoint              cmd="ctl_cyrusdb -c" period=30
}
---------------------------------------------------
---/etc/hosts---

127.0.0.1                 morpheus localhost.localdomain localhost
xxx.xxx.xxx.47            mail.domain1.com
xxx.xxx.xxx.47            domain1.com
xxx.xxx.xxx.50            mail.domain2.com

Thanks,

Brad
-- 

---
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