I have strange issues with virtualdomains. 
Some background:
Freebsd 4.7 
hostname is defaultdomain.com, and running "hostname" command returns defaultdomain.com
in imapd.conf
virtdomains: yes
defaultdomain: defaultdomain.com

I am using mysqlauxprop which runs this SQL statement: select password from xxx
where user=%u and domain=%r
some additional domains I have are example1.com example2.com example3.com

when I login to pop3 or imap as "user" which belongs to example1.com the log
shows:
select password from xxx where user=user and domain=com
Of course login fails.

Using [EMAIL PROTECTED] or [EMAIL PROTECTED] from command line always works. 
I know that cyrus would drop mail from mail.defaultdomain.com
but is it supposed to drop example from defaultdomain.com if the realm not supplied
explicitly?

Also trying to login to cyradmin:
cyradm --user [EMAIL PROTECTED] --auth login --server localhost
produces failure with "domain=com" again.

But if I run:
 cyradm --user [EMAIL PROTECTED] --auth login --server localhost
the full "anything.defaultdomain.com" shows up in log!!!! (of course the login fails).
Or if I run [EMAIL PROTECTED] the log shows "domain=example1.com" and I can
login.

A strange workaround for cyradmin and "user" is to setup a line like this in
/etc/hosts
127.0.0.1 whatever.defaultdomain.com example.com localhost
whatever.defaultdomain.com must be first, otherwise it wont work.

With the above line in /etc/hosts almost everything works ok:
mail is being delivered properly
i can login as "[EMAIL PROTECTED]" to both pop3 (telnet) and imap (mutt and
imtest),
I can login to pop3 and imtest with "user" and "[EMAIL PROTECTED]".
BUT when I use mutt to login as "[EMAIL PROTECTED]" or "user" it fails again with
same "domain=com" in log.
Where as [EMAIL PROTECTED] works fine.
I cannot understand why pop3 and imtest (with -r and without, as "user" and as
[EMAIL PROTECTED]) works but mutt doesnt???


Anything I am doing wrong?

Reply via email to