PMDF popstore & MessageStore Manager's Guide


Previous Next Contents Index

4.3.4.11 list_users Command: list user accounts

The list_users command is used to list accounts. Note that only accounts contained within the manager's management group will be listed. The parameter names and associated values accepted by the command are listed in Table 4-14.

Table 4-14 list_users command parameters
parameter=value   Description
group=name Optional Restrict the listing to only accounts contained in the specified group, name. When not specified, the group associated with the manager generating the listing is assumed. Wild cards are not permitted.
on_error=file-spec Required Name of the formatting file to use to format the results when the command fails.
on_success=file-spec Required Name of the formatting file to use to format the results when the command succeeds.
pformat=file-spec Required Name of the formatting file to use to format each account listing. The recognized substitution strings for this formatting file are listed in Tables 4-10 and 4-15.
rooted=bvalue Optional Boolean value, 0 or 1, indicating whether or not an exact lookup is performed. When bvalue is 0, only the entry, if any, exactly matching the username string is returned. When bvalue is 1, then the username string is treated as a prefix and any forwarding beginning with the supplied username string will be returned. When not specified, a bvalue of 0 is assumed.
username=string Optional List accounts whose username match the pattern specified by string. string can contain wild cards. If this parameter is omitted, then * is assumed and a listing of all accounts is generated.

The username parameter can appear in the command at most once. If the username parameter is omitted and rooted=1 is specified, then all accounts will be returned. Note that username lookups are done in a case-insensitive manner.

An example command to list all accounts starting with the letter d is shown below:


command=list_users&username=d&rooted=1&pformat=lusr.txt& 
  on_success=lusr_success.txt&on_error=lusr_error.txt 
An example formatting file is shown in Example 4-2. This is the formatting file used by the interactive, command line management interface.

Example 4-2 list_users formatting file

%first{                                       Quota  Message  Quota used} 
%first{ Username                           (kbytes)    Count    (kbytes)} 
%first{ ----------------------------------------------------------------} 
%flags_manage{ |*}%username{%-32s} %quota_k{%10.2f}  %message_count{%7u}    %quota_used_k{%8.2f} 
%last{ ----------------------------------------------------------------} 
%last{*Note: privileged users are flagged with an asterisk} 

Table 4-15 list_users command substitution strings
Substitution string Type Format Description
%filename string %-s Full file specification for the profile file representing the account.
%flags string %s Comma separated string representation of the account's usage flags. Built from the words DELETE, DISUSER, DISMAIL, LOCKPWD, MANAGE, MIGRATED, and PWD_ELSEWHERE.
%flags_delete string Disabled|Enabled See text.
%flags_dismail string Disabled|Enabled See text.
%flags_disuser string Disabled|Enabled See text.
%flags_lockpasswd string Disabled|Enabled See text.
%flags_manage string Disabled|Enabled See text.
%flags_migrated string Disabled|Enabled See text.
%flags_pwd_elsewhere string Disabled|Enabled See text.
%glen uint %u Length in bytes of the contents of the group_name field.
%group_name uint %s Contents of the group_name field.
%last_billing string %s Date and time when the account was last billed. This field is initialized to the creation date and time for the acount after which it is subsequently set by site-supplied account procedures.
%last_connect string %s Date and time of last connect ( i.e., date and time when the user last connected to the POP3 server with their POP3 client).
%last_disconnect string %s Date and time of last disconnect ( i.e., date and time when the user last disconnected from the POP3 server with their POP3 client).
%last_pwd_change string %s Date and time that this user's password was last changed.
%message_count uint %u Count of stored messages.
%olen uint %u Length in bytes of the contents of the owner field.
%overdraft_b uint %u Message overdraft quota in units of bytes.
%overdraft_k
%overdraft_m
%overdraft_g
float %.2f Message overdraft quota in units of, respectively, kbytes ( _k), mbytes ( _m), or gbytes ( _g).
%owner string %s Contents of the owner field.
%past_block_days uint %u Accumulated message storage for past ( i.e., deleted) messages as measured in units of block days.
%past_block_days_remainder uint %u Accumulated round off of the past_block_days field as measured in units of byte minutes.
%private string %s Contents of the site-specific private data storage field.
%quota_b uint %u Primary message storage quota in units of bytes.
%quota_k
%quota_m
%quota_g
float %.2f Primary message storage quota in units of, respectively, kbytes ( _k), mbytes ( _m), or gbytes ( _g).
%quota_used_b uint %u Storage in bytes consumed by messages currently stored for the account.
%quota_used_g
%quota_used_k
%quota_used_m
float %.2f Storage in kbytes ( _k), mbytes ( _m), or gbytes ( _g) consumed by messages currently stored for the account.
%received_bytes uint %u Cumulative count of message bytes stored for the account.
%received_messages uint %u Cumulative count of messages stored for the account.
%slen uint %u Length in bytes of the contents of the private field.
%store uint popstore|MessageStore|native See text.
%total_connect_s uint %u Total elapsed connect time expressed in units of seconds.
%total_connect_m
%total_connect_h
%total_connect_d
float %.2f Total elapsed connect time expressed, respectively, in units of minutes ( _m), hours ( _h), or days ( _d).
%total_connect_dhms string %s Total, elapsed connect time expressed in a format showing days, hours, minutes, and seconds: dd hh:mm:ss.
%total_connections uint %u Total number of connections made to the account.
%ulen uint %u Length in bytes of the contents of the username field.
%username string %s Username field.
%version uint %u Profile file version format field.

The formatting fields for the %store and %flags_ substitution strings work differently than other substitution strings. These fields are interpreted, respectively, as three and two strings separated by a vertical bar, |. In the case of the %store substitution string, the first string is substituted when the account is a popstore account, the second when it is a MessageStore account, and the third when it is a profile file marked as being native. In the case of the %flags_ substitution strings, the first string is that substituted when the associated flag is not set and the second string that when the field is set. For instance, the formatting instructions


Management privileges: %flags_manage{Disabled|Enabled} 
produce the output


Management privileges: Disabled 
for an account which does not have the MANAGE usage flag set. For an account with the MANAGE usage flag set, the output would instead be


Management privileges: Enabled 


Previous Next Contents Index