[Dovecot] Issue with converting users from cyrus user.domain.com
I have been using cyrus for the past 6 years, but it is a pain to config. So ... I just installed dovecot 1.0.15 on a new debian 4r7 box.
In cyrus we were using usernames as "user.domain.tld".
In dovecot I realize I can:
auth_username_translation = .@
But this converts user.domain.tld to user@domain@tld which of course fails. Is there a regex or something I can apply to pull this off?
I also tried
auth_username_format = %n.%d
But I think this does the opposite of what I need.
Any help is GREATLY appreciated.
Thanks in advance
P.
On Sat, 2009-04-11 at 17:12 -0600, Preston Lord wrote:
I have been using cyrus for the past 6 years, but it is a pain to config. So ... I just installed dovecot 1.0.15 on a new debian 4r7 box.
In cyrus we were using usernames as "user.domain.tld".
In dovecot I realize I can:
auth_username_translation = .@
But this converts user.domain.tld to user@domain@tld which of course fails. Is there a regex or something I can apply to pull this off?
What do you use as passdb? The passdb can change the username, so this could be done with e.g. SQL.
Hi Timo,
I use:
/etc/dovecot/dovecot-sql.conf
driver = mysql connect = host=127.0.0.1 dbname=mailserver user=mailuser password=xxxxxxxx default_pass_scheme = PLAIN-MD5 password_query = SELECT email as user, password FROM view_users WHERE email='%u';
I was able to get it working if I changed the %u ... Is there a way to regex %u for @com in the config?
-- :::::: :::::: Preston J. Lord :: :::: :::::: Manager / Software Design Engineer :::::::::: :::::: plord@inetx.ca :: :::::::::::::: :: :: :::::::::: iNTRICATE NETWORKS :: :: :::::::: Toll Free 1-866-949-4638 :::::: :::::: www.iNETx.ca
Phone: 1-306-778-0800 Fax: 1-306-778-7675 #4 1081 Central Avenue North Swift Current, SK, CA S9H 4Z2
This email including attachments is confidential and legally privileged. If you are not the intended recipient, any redistribution or copying of this message is prohibited. If you have received this email in error please notify us immediately, by return email, and delete this email.
From: Timo Sirainen tss@iki.fi Date: Sat, 11 Apr 2009 21:24:13 -0400 To: Preston Lord plord@sasktel.net Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Issue with converting users from cyrus user.domain.com
passdb
On Sat, 2009-04-11 at 19:53 -0600, Preston Lord wrote:
driver = mysql connect = host=127.0.0.1 dbname=mailserver user=mailuser password=xxxxxxxx default_pass_scheme = PLAIN-MD5 password_query = SELECT email as user, password FROM view_users WHERE email='%u';
I was able to get it working if I changed the %u ... Is there a way to regex %u for @com in the config?
No, but I bet there are many different ways to do it with MySQL functions in the password_query.
On 4/11/2009, Preston Lord (plord@sasktel.net) wrote:
I have been using cyrus for the past 6 years, but it is a pain to config. So ... I just installed dovecot 1.0.15 on a new debian 4r7 box.
Clarification...
Is this 1.0.15, or 1.0rc15? 1.0rc15 is what Debian stable is using for some bizarre reason, and it is extremely old and a bit buggy...
If you are indeed usin1.0.15, you should seriously consider upgrading to 1.1.13...
Also, even though you may not think it necessary, it is always best to provide output of dovecot -n when asking for help (it would likely have made my question about version unnecessary)...
--
Best regards,
Charles
Hi Charles,
I did get this working using the sql I posted to the list earlier. I will make sure I post dovecot -n from now .
Just for the record:
# 1.0.15: /etc/dovecot/dovecot.conf log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login mail_privileged_group: mail mail_location: maildir:/home/vmail/%d/%n/Maildir mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: mechanisms: plain login passdb: driver: pam passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: static args: uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail
dovecot --version 1.0.15
I am running Debain Etch (4r9)
An apt-get shows me it is already the newest version.
I want to make sure I am running the latest stable release ... What is the best way to manually upgrade to the version you suggested?
P.
From: Charles Marcus CMarcus@Media-Brokers.com Reply-To: Dovecot Mailing List dovecot@dovecot.org Date: Sun, 12 Apr 2009 10:31:41 -0400 To: Preston Lord plord@sasktel.net Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Issue with converting users from cyrus user.domain.com
On 4/11/2009, Preston Lord (plord@sasktel.net) wrote:
I have been using cyrus for the past 6 years, but it is a pain to config. So ... I just installed dovecot 1.0.15 on a new debian 4r7 box.
Clarification...
Is this 1.0.15, or 1.0rc15? 1.0rc15 is what Debian stable is using for some bizarre reason, and it is extremely old and a bit buggy...
If you are indeed usin1.0.15, you should seriously consider upgrading to 1.1.13...
Also, even though you may not think it necessary, it is always best to provide output of dovecot -n when asking for help (it would likely have made my question about version unnecessary)...
--
Best regards,
Charles
On 4/12/2009, Preston Lord (plord@sasktel.net) wrote:
I want to make sure I am running the latest stable release ... What is the best way to manually upgrade to the version you suggested?
I think debian has 'unstable' repos where you can get the latest stable releases of certain software, but I'm not a debian guy so don't know the best place to go for that...
--
Best regards,
Charles
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sun, Apr 12, 2009 at 09:47:22AM -0600, Preston Lord wrote:
[...]
dovecot --version 1.0.15
Hmmm. The newest avaliable packaged version to etch seems to be 1.0.15, that's from backports [1], it seems. The standard etch package is 1.0.rc15 [2]
Even Lenny (stable by now) has 1.0.15 as default [3].
If you go to squeeze (aka "testing"), you'd get 1.1.13 [4].
So even upgrading to lenny (which I would recommend, if there are no reasons holding you back) would't bring you a newer Dovecot version. And upgrading to testing... well, it depends very much on what you are doing.
So if you want a newer version on etch or lenny, you'll have to compile it for yourself. With Debian, you have two options: just downloading the original sources and compiling (whicshould be fairly easy with dovecot!) or letting APT do it for you. The advantage of the second approach would be that the package comes already configured in a way that it fits the rest of the system, that the package database "knows" about the installed package (and would be "willing" to upgrade it with a later version) and that APT can do for you the legwork of geetting whatever packages needed to actually do the build (the so-called "build dependencies"). See [5] for some instructions on how to do that.
[1] http://packages.debian.org/etch-backports/dovecot-imapd [2] http://packages.debian.org/etch/dovecot-imapd [3] http://packages.debian.org/lenny/dovecot-imapd [4] http://packages.debian.org/squeeze/dovecot-imapd [5] http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html
Regards
- -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFJ40F1Bcgs9XrR2kYRAorWAJ0fPNl4aIuZ2REEu8Bj2EX8cSE/BwCfVnz/ VqKHR2PvpaC8+9GFf8lLNH0= =p7HC -----END PGP SIGNATURE-----
participants (4)
-
Charles Marcus
-
Preston Lord
-
Timo Sirainen
-
tomas@tuxteam.de