Re: [Exim] Per virtual user quotas?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Tamas TEVESZ
Päiväys:  
Vastaanottaja: Elwood Blues
Kopio: exim-users
Aihe: Re: [Exim] Per virtual user quotas?
On Thu, 25 Oct 2001, Elwood Blues wrote:

 > Quite close. I hit apon this yesterday:
 >   quota = ${extract{2}{:}{${lookup{${local_part}}\
 >           lsearch{/mail/conf/${domain}/passwd}{$value}{3M}}}}

>
> The only thing that doesnt seem to work is setting a default if no
> value is listed (the {$value}{3M} part). If no quota is listed in
> the file, the user doesnt get limited at all. Am running Exim version 3.31


that's tricky. the cause seem to be this:

${lookup{${local_part}}lsearch{/mail/conf/${domain}/passwd}{$value}fail}
(assume its "salesdroid" doesn't fail) returns you:

Nt3AixExJlFZE:5M

extracting "{2}", you get: "5M"

if it doesn't have a quota specified (and it doesn't matter whether
you have the last : in the line or not) you'll get:

> ${lookup{salesdroid2}lsearch{passwd}{$value}{3M}}

Nt3AixExJlFZE

> ${lookup{salesdroid2}lsearch{passwd}{$value}{3M}}

Nt3AixExJlFZE
(the difference is the last : in the line in the passwd file)

extracting "{2}" out of this is naturally empty.

how it needs to be done is i'm thinking about, but i can't type three
words without my phone ringing so i'm putting it up for you :)



--
[-]