My question is why editing the c code?

Use the -q and specify the quota you want to use for the user when executing 
the vadduser command

vadduser: usage: [options] email_address [passwd]
options: -v (print the version)
         -q quota_in_bytes (sets the users quota, use NOQUOTA for unlimited)
         -c comment (sets the gecos comment field)
         -e standard_encrypted_password
         -n no_password
         -r[len] (generate a len (default 8) char random password)

vadduser -q NOQUOTA d...@demo.org
Please enter password for d...@demo.org:
enter password again:
Wed Apr 10 10:44:45 AM MDT 2024 > /root
demo.org vuserinfo d...@demo.org
name:   demo
passwd: $3$jO09Si5u$P1lesSv7jPsR4HEqMBMFr0
clear passwd: demo
comment/gecos: demo
uid:    0
gid:    0
flags:  0
gecos: demo
limits: No user limits set.
dir:       /home/vpopmail/domains/demo.org/demo
quota:     NOQUOTA
usage:     NOQUOTA
account created: Wed Apr 10 10:44:45 2024
last auth: Never logged in

Just my 2 cents here.

> On Apr 10, 2024, at 9:03 AM, Tony White <t...@ycs.com.au> wrote:
> 
> Hi Eric,
>   I am actually reading from the old server tables and inserting into
> the new one. Hence the reason for asking. I do really want to mash the
> add of ,4000c to the code. I will test it out tomorrow.
> 
> Thank you.
> 
>  regards
> Anthony White
> On 11/4/24 02:01, Eric Broch wrote:
>>  /home/vpopmail/bin/vmoduser -q NOQUOTA u...@domain.tld 
>> <mailto:u...@domain.tld> 
>> 
>> On 4/10/2024 9:57 AM, Tony White wrote:
>>> Eric, 
>>>   That suggests I can update the table directly and not 
>>> actually add the second element ,4000C. Is this assumption 
>>> correct? I need to update clients with their current allocation 
>>> from the old server. 
>>> 
>>> regards 
>>> Anthony White 
>>> On 11/4/24 01:37, Eric Broch wrote:
>>>> pw_shell=######S, #####C 
>>>> 
>>>> ######S = default quota bytes 
>>>> 
>>>> #####C = max msg quota 
>>>> 
>>>> Here is the actual code when adding a user if anyone reads 'c' and is 
>>>> interested. 
>>>> 
>>>>   if (limits.defaultquota > 0) { 
>>>>     if (limits.defaultmaxmsgcount > 0) 
>>>>       snprintf (quota, sizeof(quota), "%lluS,%lluC", limits.defaultquota, 
>>>>         limits.defaultmaxmsgcount); 
>>>>     else 
>>>>       snprintf (quota, sizeof(quota), "%lluS", limits.defaultquota); 
>>>>   } else { 
>>>>     if (limits.defaultmaxmsgcount > 0) 
>>>>       snprintf (quota, sizeof(quota), "%lluC", limits.defaultmaxmsgcount); 
>>>>     else 
>>>>       strcpy (quota, "NOQUOTA"); 
>>>>   } 
>>>> 
>>>> 
>>>> On 4/10/2024 9:11 AM, Tony White wrote:
>>>>> Is it possible it is a max file handle count? 
>>>>> 4000c = 16384d 
>>>>> I also do not understand why there is and S on 
>>>>> the first value. 
>>>>> 
>>>>> regards 
>>>>> Anthony White 
>>>>> On 10/4/24 23:40, Qmail wrote:
>>>>>> Ahh, then I also get the ,4000C - hmmm 
>>>>>> 
>>>>>> And when I look up the user in vqadmin it's shown under the column quota 
>>>>>> as  4091324,4000C !! 
>>>>>> 
>>>>>> 
>>>>>> Well I admit You did start out with a good questionđŸ˜‰ 
>>>>>> 
>>>>>> Cheers 
>>>>>> Finn 
>>>>>> 
>>>>>> Den 10-04-2024 kl. 15:17 skrev Tony White:
>>>>>>> Okay but I used the default values. 
>>>>>>> vadduser f...@ycs.com.au <mailto:f...@ycs.com.au> dickerydock 
>>>>>>> I did not specify the allocation of space 
>>>>>>> 
>>>>>>> regards 
>>>>>>> Anthony White 
>>>>>>> 
>>>>>>> On 10/4/24 22:04, Qmail wrote:
>>>>>>>> Hi again 
>>>>>>>> 
>>>>>>>> Hmm 
>>>>>>>> 
>>>>>>>> I tried this 
>>>>>>>> 
>>>>>>>> ./vadduser -q 40000 test1@mydomain test 
>>>>>>>> 
>>>>>>>> and 
>>>>>>>> 
>>>>>>>> ./vadduser -q NOQUOTA test@mydomain test 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> and there is NO ,4000C in my database 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Whats on You vadduser line ? and I can try that if You want 
>>>>>>>> 
>>>>>>>> /Finn 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Den 10-04-2024 kl. 13:24 skrev Tony White:
>>>>>>>>> Hi, 
>>>>>>>>>    Thanks for the response but all the users were 
>>>>>>>>> created with vadduser. 
>>>>>>>>> 
>>>>>>>>> regards 
>>>>>>>>> Anthony White 
>>>>>>>>> 
>>>>>>>>> On 10/4/24 19:08, Qmail wrote:
>>>>>>>>>> Hi Tony. 
>>>>>>>>>> 
>>>>>>>>>> Just checked my database and I do not have that value in any of my 
>>>>>>>>>> entries. 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> but ',4000C' seems to me as a value from a list where values was 
>>>>>>>>>> inserted into the new database - just a guess ? 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> I'm running latest qmail on a Rocky 9 latest and greatest 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> /Finn 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Den 10-04-2024 kl. 10:38 skrev Tony White:
>>>>>>>>>>> Hi Folks, 
>>>>>>>>>>>    I have a question that I hope someone can answer please. 
>>>>>>>>>>> Below are entries from the old and new database. 
>>>>>>>>>>> What is the meaning of second numeric value 4000C in the new table? 
>>>>>>>>>>> Every entry has it but the first changes with the allocation of 
>>>>>>>>>>> space. 
>>>>>>>>>>> The second does not. Trying to move clients from old database to 
>>>>>>>>>>> new. 
>>>>>>>>>>> 
>>>>>>>>>>> TIA :) 
>>>>>>>>>>> 
>>>>>>>>>>> old database vpopmail 
>>>>>>>>>>> 
>>>>>>>>>>> +---------------+-------------+ 
>>>>>>>>>>> | pw_name       | pw_shell    | 
>>>>>>>>>>> +---------------+-------------+ 
>>>>>>>>>>> | loanapples    | 50000000    | 
>>>>>>>>>>> 
>>>>>>>>>>> new database vpopmail.vpopmail 
>>>>>>>>>>> 
>>>>>>>>>>> +----------------------+-----------------+ 
>>>>>>>>>>> | pw_name              | pw_shell        | 
>>>>>>>>>>> +----------------------+-----------------+ 
>>>>>>>>>>> | 1oanapples           | 41943040S,4000C | 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> -- 
>>>>>>>>>>> regards 
>>>>>>>>>>> Anthony White 
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>  
>>>>>>>>>> To unsubscribe, e-mail: 
>>>>>>>>>> qmailtoaster-list-unsubscr...@qmailtoaster.com 
>>>>>>>>>> <mailto:qmailtoaster-list-unsubscr...@qmailtoaster.com> 
>>>>>>>>>> For additional commands, e-mail: 
>>>>>>>>>> qmailtoaster-list-h...@qmailtoaster.com 
>>>>>>>>>> <mailto:qmailtoaster-list-h...@qmailtoaster.com> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>> To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com 
>>>>>>>> <mailto:qmailtoaster-list-unsubscr...@qmailtoaster.com> 
>>>>>>>> For additional commands, e-mail: 
>>>>>>>> qmailtoaster-list-h...@qmailtoaster.com 
>>>>>>>> <mailto:qmailtoaster-list-h...@qmailtoaster.com> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --------------------------------------------------------------------- 
>>>>>>> To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com 
>>>>>>> <mailto:qmailtoaster-list-unsubscr...@qmailtoaster.com> 
>>>>>>> For additional commands, e-mail: 
>>>>>>> qmailtoaster-list-h...@qmailtoaster.com 
>>>>>>> <mailto:qmailtoaster-list-h...@qmailtoaster.com> 
>>>>>>> 
>>>>>> 
>>>>>> --------------------------------------------------------------------- 
>>>>>> To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com 
>>>>>> <mailto:qmailtoaster-list-unsubscr...@qmailtoaster.com> 
>>>>>> For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com 
>>>>>> <mailto:qmailtoaster-list-h...@qmailtoaster.com> 
>>>>>> 
>>>>> 
>>> 
> 

Reply via email to