Preston Lord
2009-Apr-11 23:12 UTC
[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 at 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.
Timo Sirainen
2009-Apr-12 01:24 UTC
[Dovecot] Issue with converting users from cyrus user.domain.com
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 at 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090411/d9f280d6/attachment-0002.bin>
Preston Lord
2009-Apr-12 01:53 UTC
[Dovecot] Issue with converting users from cyrus user.domain.com
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 at 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 at iki.fi> > Date: Sat, 11 Apr 2009 21:24:13 -0400 > To: Preston Lord <plord at sasktel.net> > Cc: <dovecot at dovecot.org> > Subject: Re: [Dovecot] Issue with converting users from cyrus user.domain.com > > passdb
Charles Marcus
2009-Apr-12 14:31 UTC
[Dovecot] Issue with converting users from cyrus user.domain.com
On 4/11/2009, Preston Lord (plord at 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
Preston Lord
2009-Apr-12 15:47 UTC
[Dovecot] Issue with converting users from cyrus user.domain.com
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 at Media-Brokers.com>
> Reply-To: Dovecot Mailing List <dovecot at dovecot.org>
> Date: Sun, 12 Apr 2009 10:31:41 -0400
> To: Preston Lord <plord at sasktel.net>
> Cc: <dovecot at dovecot.org>
> Subject: Re: [Dovecot] Issue with converting users from cyrus
user.domain.com
>
> On 4/11/2009, Preston Lord (plord at 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