Re: Create additional sub-folders postfix/courier

2009-02-11 Thread postfix
At 03:46 PM 2/11/2009, mouss wrote: Victor Duchovni a écrit : >>> SELECT >>> if(INSTR(maildir,'+'),concat(left(maildir,instr(maildir,'+')-1),'/Maildir/.',right(maildir,length(maildir)-instr(maildir,'+'))),CONCAT(maildir,'Maildir/')) >>> from mailbox where username ='%s' and active='1' >> you a

Re: Create additional sub-folders postfix/courier

2009-02-11 Thread mouss
Victor Duchovni a écrit : > On Wed, Feb 11, 2009 at 09:24:25PM +0100, mouss wrote: > >> post...@corwyn.net a ?crit : >>> And a last betterer/simpler way to do it. >>> >>> SELECT >>> if(INSTR(maildir,'+'),concat(left(maildir,instr(maildir,'+')-1),'/Maildir/.',right(maildir,length(maildir)-instr(ma

Re: Create additional sub-folders postfix/courier

2009-02-11 Thread Victor Duchovni
On Wed, Feb 11, 2009 at 09:24:25PM +0100, mouss wrote: > post...@corwyn.net a ?crit : > > And a last betterer/simpler way to do it. > > > > SELECT > > if(INSTR(maildir,'+'),concat(left(maildir,instr(maildir,'+')-1),'/Maildir/.',right(maildir,length(maildir)-instr(maildir,'+'))),CONCAT(maildir,'M

Re: Create additional sub-folders postfix/courier

2009-02-11 Thread mouss
post...@corwyn.net a écrit : > And a last betterer/simpler way to do it. > > SELECT > if(INSTR(maildir,'+'),concat(left(maildir,instr(maildir,'+')-1),'/Maildir/.',right(maildir,length(maildir)-instr(maildir,'+'))),CONCAT(maildir,'Maildir/')) > from mailbox where username ='%s' and active='1' > >

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread postfix
And a last betterer/simpler way to do it. SELECT if(INSTR(maildir,'+'),concat(left(maildir,instr(maildir,'+')-1),'/Maildir/.',right(maildir,length(maildir)-instr(maildir,'+'))),CONCAT(maildir,'Maildir/')) from mailbox where username ='%s' and active='1'

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread postfix
At 01:31 AM 2/11/2009, post...@corwyn.net wrote: At 01:05 AM 2/11/2009, Victor Duchovni wrote: On Wed, Feb 11, 2009 at 12:55:31AM -0500, post...@corwyn.net wrote: This is a bad idea. You are allowing external parties to construct mailbox filenames on your system. Potential for various directory

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread postfix
At 01:05 AM 2/11/2009, Victor Duchovni wrote: On Wed, Feb 11, 2009 at 12:55:31AM -0500, post...@corwyn.net wrote: This is a bad idea. You are allowing external parties to construct mailbox filenames on your system. Potential for various directory pathname injection attacks: user+./../../

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread Victor Duchovni
On Wed, Feb 11, 2009 at 12:55:31AM -0500, post...@corwyn.net wrote: > At 11:04 PM 2/10/2009, post...@corwyn.net wrote: >> At 05:24 PM 2/10/2009, mouss wrote: >> While I can readily create a user b...@example.com, who has a default >> maildir location for that sql of 'example.com/bob/' I can't q

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread postfix
At 11:04 PM 2/10/2009, post...@corwyn.net wrote: At 05:24 PM 2/10/2009, mouss wrote: While I can readily create a user b...@example.com, who has a default maildir location for that sql of 'example.com/bob/' I can't quite figure out how to change the SQL to get the folder for bob+t...@example

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread postfix
At 05:24 PM 2/10/2009, mouss wrote: You can create "dummy" mailboxes that use the folders as their maildir. for example: joe+s...@example.com/some/path/example.com/joe/Maildir/.Spam/ then tell amavisd-new to add the "+spam" extension to mail tagged as spam. This may or may not be easy depend

Re: Create additional sub-folders postfix/courier

2009-02-10 Thread mouss
Gabriel Tartaglia a écrit : > Hi all > > I have a mail server which is courier, postfix, amavisd, using Postgres > db and virtual mailboxes which I administer through postfixadmin. > > I want to be able to add a set of default folders to all mailboxes > created such as Possible Spam and some othe