[Dovecot] Variable expansion in LDA vs POP/IMAP

2007-05-25 Thread Stephane Enten
Hello all,

I'm trying to understand when exactly the variable substitution
happens in Dovecot, as I get different results in the LDA and in the POP/IMAP 
server.

Here's my general setup:
 - Postfix MTA, delivers mail via Dovecot LDA
 - users list sits in a database 
 - mail directory is stored in the database, but with
   Dovecot variables inside

Delivery works perfectly fine, Dovecot's deliver get a "mail"
column from the database (that looks like this: 
/mail/01/%2LMd/%2.2LMd/%LMd/mail/%Ln/ ) and expands variables,
delivers the mail into the maildir's location.

Now if I try to access the mailbox through Dovecot's POP/IMAP server,
it looks like it gets the right field from the database, but won't expand
the variables:

May 24 18:31:14 mail1 dovecot: imap-login: Login: user=, method=PLAIN, 
rip=127.0.0.1, lip=127.0.0.1, secured
May 24 18:31:14 mail1 dovecot: IMAP(X): Effective uid=1021, gid=304, home=
May 24 18:31:14 mail1 dovecot: IMAP(X): maildir: 
data=/mail/01/%2LMd/%2.2LMd/%LMd/mail/%Ln/
May 24 18:31:14 mail1 dovecot: IMAP(X): maildir: 
root=/mail/01/%2LMd/%2.2LMd/%LMd/mail/%Ln, index=/srv/mail/01/%2LMd
/%2.2LMd/%LMd/mail/%Ln, control=, inbox=
May 24 18:31:14 wmail1-v dovecot: IMAP(X): Disconnected

Am I missing something to get the pop/imap part expand those ?

-- 
Stephane Enten
# /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: pop3 pop3s imap imaps
disable_plaintext_auth: no
shutdown_clients: 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
login_process_per_connection: no
login_processes_count: 5
verbose_proctitle: yes
first_valid_uid: 1000
mail_debug: yes
maildir_copy_with_hardlinks: yes
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
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  verbose: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: dovecot
  group: dovecot



Re: [Dovecot] Variable expansion in LDA vs POP/IMAP

2007-05-27 Thread Stephane Enten
On Sat, May 26, 2007 at 06:26:40PM +0300, Timo Sirainen wrote:
 > > you should NOT be doing select 
 > > concat('/mail/01/%2LMd/%2.2LMd/%LMd/mail/%Ln') as maildir
 > 
 > Actually that does work. It's only the value returned from database
 > that's not expanded. I think that'd be a bad idea because then any
 > usernames or paths containing '%' characters would break.

I understand that the only intended expanded string is the query one,
not the answer.

But then something's weird cause it's actualy expanded by deliver (in my
setup they share the same dovecot-auth process hence the same SQL
query).

Thanks for your help, I'll go for mail_location instead.

-- 
Stephane Enten