Multiple domains, Cyrus won't listen!
Veigar Freyr Jökulsson
veigar at tviund.is
Wed Sep 11 19:12:16 EDT 2002
You need to specify for each domain wich ip to bind to, for example:
SERVICES {
# tviund.is
imap cmd="imapd -C /etc/imapd.conf" listen="194.144.146.145:imap"
prefork=1
pop3 cmd="pop3d -C /etc/imapd.conf" listen="194.144.146.145:pop3"
prefork=1
sieve cmd="timsieved -C /etc/imapd.conf"
listen="194.144.146.145:sieve" prefork=0
lmtpunix cmd="lmtpd -C /etc/imapd.conf"
listen="/var/imap/socket/lmtp" prefork=1
etc. etc.
--
Veigar Freyr Jökulsson
veigar at tviund.is
----- Original Message -----
From: "Ray Anderson" <rsa at i-deasatwork.com>
To: "Cyrus (E-mail)" <info-cyrus at lists.andrew.cmu.edu>
Sent: Wednesday, September 11, 2002 7:29 PM
Subject: Multiple domains, Cyrus won't listen!
> Greetings:
>
> I've exhausted nearly all resources to get this problem worked out, and am
> at my wits end. I'm trying to displace a Microsoft Exchange 5.5 server
with
> a Cyrus / Sendmail solution.
>
> The goal is to host multiple domains, without having the mailboxes shared
> across the domains. All of this on the SAME MACHINE!
>
> I have three domains that are on virtual IP addresses as follows:
> domain1 => 192.168.9.4 (eth0)
> domain2 => 192.168.9.7 (eth0:0)
> domain3 => 192.168.9.8 (eth0:1)
>
> I.e. if in the sendmail virtusers table there is no address for
> user1 at domain1.com, but there is a mailbox for user1 at domain2.com, I want
the
> mail to bounce. I've configured the server following the great tutorial
at
> http://home.earthlink.net/~jaymzh666/cyrus/cyrus_sasl.html but I'm
> experiencing the following problems:
>
> When I run /usr/cyrus/bin/master &, the log shows this: (It's not even
> doing the inital db check schtuff)
> Sep 11 08:49:43 mail_server master: setrlimit: Unable to set file
> descriptors limit to -1: Operation not permitted
> Sep 11 08:49:43 mail_server master[2645]: process started
> Sep 11 08:49:43 mail_server master[2645]: ready for work
>
> All attempts to connect to any of the "virtual" servers fails with "cannot
> connect" whether with telnet <host> imap or with cyradm. I can telnet to
> port 25 and 80 on any of the other host names, ipchains is clear, and
> there's no firewalling in place on the ip addresses.
>
> It's as if the master process gets enough information to load itself into
> memory but doesn't spawn any of the listening daemons. I've run a few of
> the commands in the /etc/master.conf file manually as user cyrus, and they
> appear to work ok, i.e. If I run
>
> $ ./ctl_cyrusdb -C /etc/cyrus/domain1.conf -r
>
> the log shows this:
> Sep 11 09:06:57 mail_server ctl_cyrusdb[2783]: recovering cyrus databases
> Sep 11 09:06:58 mail_server ctl_cyrusdb[2783]: done recovering cyrus
> databases
>
> If I try to run
>
> $ ./imapd -C /etc/cyrus/domain1.conf
> listen="domain1.localdomain.com:imap" prefork=1
>
> the log shows this:
> Sep 11 09:09:15 mail_server imapd: could not getenv(CYRUS_SERVICE);
exiting
>
> Thanks a ton for your time on this, I'm nearly pulling my hair out. :)
>
> Best regards,
>
> -=Ray
> -----------------------------------------------
> Ray Anderson
> Senior Business Analyst
> PRIDE Industries
> Office: 916.788.2444
> Cell: 916.798.9439
> rsa at prideindustries.com
> www.prideindustries.com
> -----------------------------------------------
>
> ------------ netstat -an (with master
> running) -------------------------------
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 0.0.0.0:1024 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:901 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
> tcp 0 0 192.168.9.4:22 192.168.9.3:35121
> ESTABLISHED
> tcp 0 0 192.168.9.4:22 192.168.9.3:35120
> ESTABLISHED
> udp 0 0 0.0.0.0:1024 0.0.0.0:*
> udp 0 0 192.168.9.4:137 0.0.0.0:*
> udp 0 0 192.168.9.7:137 0.0.0.0:*
> udp 0 0 192.168.9.8:137 0.0.0.0:*
> udp 0 0 0.0.0.0:137 0.0.0.0:*
> udp 0 0 192.168.9.4:138 0.0.0.0:*
> udp 0 0 192.168.9.7:138 0.0.0.0:*
> udp 0 0 192.168.9.8:138 0.0.0.0:*
> udp 0 0 0.0.0.0:138 0.0.0.0:*
> udp 0 0 0.0.0.0:111 0.0.0.0:*
> Active UNIX domain sockets (servers and established)
> Proto RefCnt Flags Type State I-Node Path
> unix 2 [ ACC ] STREAM LISTENING 1348
> /var/state/saslauthd/mux
> unix 2 [ ACC ] STREAM LISTENING 1574
> /var/lib/mysql/mysql.sock
> unix 2 [ ACC ] STREAM LISTENING 1597
> /tmp/.font-unix/fs7100
> unix 12 [ ] DGRAM 928 /dev/log
> unix 2 [ ] DGRAM 9813
> unix 2 [ ] DGRAM 1709
> unix 2 [ ] DGRAM 1607
> unix 2 [ ] DGRAM 1522
> unix 2 [ ] DGRAM 1491
> unix 2 [ ] DGRAM 1399
> unix 2 [ ] DGRAM 1327
> unix 2 [ ] DGRAM 1135
> unix 2 [ ] DGRAM 996
> unix 2 [ ] DGRAM 937
>
> -------complete /etc/cyrus.conf
> # standard standalone server implementation
> START
> {
> # do not delete this entry!
>
> # domain1
> mboxlist-d1 cmd="ctl_mboxlist -C /etc/cyrus/domain1.conf -r"
> deliver-d1 cmd="ctl_deliver -C /etc/cyrus/domain1.conf -r"
> recover-d1 cmd="ctl_cyrusdb -C /etc/cyrus/domain1.conf -r"
>
> # domain2
> mboxlist-d2 cmd="ctl_mboxlist -C /etc/cyrus/domain2.conf -r"
> deliver-d2 cmd="ctl_deliver -C /etc/cyrus/domain2.conf -r"
> recover-d2 cmd="ctl_cyrusdb -C /etc/cyrus/domain2.conf -r"
>
> # domain3
> mboxlist-d3 cmd="ctl_mboxlist -C /etc/cyrus/domain3.conf -r"
> deliver-d3 cmd="ctl_deliver -C /etc/cyrus/domain3.conf -r"
> recover-d3 cmd="ctl_cyrusdb -C /etc/cyrus/domain3.conf -r"
>
> # this is only necessary if using idled for IMAP IDLE
> # idled cmd="idled"
> }
>
> # UNIX sockets start with a slash and are put into /var/imap/socket
> SERVICES
> {
> # domain1
> imap-d1 cmd="imapd -C /etc/cyrus/domain1.conf"
> listen="d1.localdomain.com:imap" prefork=1
> pop3-d1 cmd="pop3d -C /etc/cyrus/domain1.conf"
> listen="d1.localdomain.com:pop3" prefork=1
> lmtpunix-d1 cmd="lmtpd -C /etc/cyrus/domain1.conf"
> listen="/var/imap/domain1.com/socket/lmtp" prefork=1
>
> # domain2
> imap-d2 cmd="imapd -C /etc/cyrus/domain2.conf"
> listen="d2.localdomain.com:imap" prefork=1
> pop3-d2 cmd="pop3d -C /etc/cyrus/domain2.conf"
> listen="d2.localdomain.com:pop3" prefork=1
> lmtpunix-d2 cmd="lmtpd -C /etc/cyrus/domain2.conf"
> listen="/var/imap/domain2.com/socket/lmtp" prefork=1
>
> # domain3
> imap-d3 cmd="imapd -C /etc/cyrus/domain3.conf"
> listen="d3.localdomain.com:imap" prefork=1
> pop3-d3 cmd="pop3d -C /etc/cyrus/domain3.conf"
> listen="d3.localdomain.com:pop3" prefork=1
> lmtpunix-d3 cmd="lmtpd -C /etc/cyrus/domain3.conf"
> listen="/var/imap/domain3.com/socket/lmtp" prefork=1
> }
> EVENTS
> {
>
> # domain1
> checkpoint-d1 cmd="ctl_mboxlist -C /etc/cyrus/domain1.conf -c"
> period=30
> delprune-d1 cmd="ctl_deliver -C /etc/cyrus/domain1.conf -E 3"
> period=1440
> tlsprune-d1 cmd="tls_prune -C /etc/cyrus/domain1.conf"
> period=1440
>
> # domain2
> checkpoint-d2 cmd="ctl_mboxlist -C /etc/cyrus/domain2.conf -c"
> period=30
> delprune-d2 cmd="ctl_deliver -C /etc/cyrus/domain2.conf -E 3"
> period=1440
> tlsprune-d2 cmd="tls_prune -C /etc/cyrus/domain2.conf"
> period=1440
>
> # domain3
> checkpoint-d3 cmd="ctl_mboxlist -C /etc/cyrus/domain3.conf -c"
> period=30
> delprune-d3 cmd="ctl_deliver -C /etc/cyrus/domain3.conf -E 3"
> period=1440
> tlsprune-d3 cmd="tls_prune -C /etc/cyrus/domain3.conf"
> period=1440
> }
>
> --------- /etc/cyrus/domain1.conf-----------
> configdirectory: /var/imap/domain1.com
> partition-default: /var/spool/imap/domain1.com
> servername: domain1.localdomain.com
> admins: cyrus root
> srvtab: /var/imap/srvtab
> allowanonymouslogin: no
> allowplaintext: yes
> sasl_pwcheck_method: saslauthd
> lmtp_overquota_perm_failure: yes
>
> --------- /etc/cyrus/domain2.conf-----------
> configdirectory: /var/imap/domain2.com
> partition-default: /var/spool/imap/domain2.com
> servername: domain2.localdomain.com
> admins: cyrus root
> srvtab: /var/imap/srvtab
> allowanonymouslogin: no
> allowplaintext: yes
> sasl_pwcheck_method: saslauthd
> lmtp_overquota_perm_failure: yes
>
> --------- /etc/cyrus/domain3.conf-----------
> configdirectory: /var/imap/domain3.com
> partition-default: /var/spool/imap/domain3.com
> servername: domain3.localdomain.com
> admins: cyrus root
> srvtab: /var/imap/srvtab
> allowanonymouslogin: no
> allowplaintext: yes
> sasl_pwcheck_method: saslauthd
> lmtp_overquota_perm_failure: yes
>
> --------- /etc/hosts-----------
> 127.0.0.1 localhost
> 192.168.9.4 domain1.localdomain.com
> 192.168.9.8 domain2.localdomain.com
> 192.168.9.7 domain3.localdomain.com
>
> --------- /etc/sysconfig/network-scripts/ifcfg-eth0 -----------
> DEVICE=eth0
> BOOTPROTO=static
> BROADCAST=192.168.9.255
> IPADDR=192.168.9.4
> NETMASK=255.255.255.0
> NETWORK=192.168.9.0
> ONBOOT=yes
>
> --------- /etc/sysconfig/network-scripts/ifcfg-eth0:0 -----------
> DEVICE=eth0:0
> BOOTPROTO=static
> BROADCAST=192.168.9.255
> IPADDR=192.168.9.7
> NETMASK=255.255.255.0
> NETWORK=192.168.9.0
> ONBOOT=yes
>
> --------- /etc/sysconfig/network-scripts/ifcfg-eth0:1 -----------
> DEVICE=eth0:1
> BOOTPROTO=static
> BROADCAST=192.168.9.255
> IPADDR=192.168.9.8
> NETMASK=255.255.255.0
> NETWORK=192.168.9.0
> ONBOOT=yes
>
More information about the Info-cyrus
mailing list