+ Reply to Thread
Results 1 to 7 of 7

Thread: U_ServicesAccess Field in Database

  1. #1

    U_ServicesAccess Field in Database

    Is there any documentation available on how the U_ServicesAccess field value is calculated? I had it figured out for version 9, but now that I am (finally) upgrading, it looks like it has changed, and I haven't been able to pin it down. I looked in the API folder, but I don't see anything obvious.

  2. #2
    Hi,

    I dont think theres any documentation. I asked this to support long ago (many years). Here's the info I got, might help you.

    There are a lot of common values in db, only some are shared. In case of
    the access mode there seems to be 8 binary vaules - 00000000 - for each
    service (almost - e.g. SyncML and SIP doesn't seem to affect the
    number). Quarantine is the first digit and 0 means account has access to
    the quarantine so the decimal number has to be lesser then 10000000 =
    128.

    *** BTW One solution, since you cant use tool if your account are set to DB and youre unable to use tool due to shared fields, is to use Wingrep...

    Example to find out who uses SMS.

    tool.exe get account *@* u_sms | grep -B 1 "u_sms: 1"

    Hope it helps.

    Regards

  3. #3
    I see this in apiconst.pas file:

    U_SMTP = $45; // Bool Access mode - SMTP
    U_POP3IMAP = $46; // Bool Access mode - IMAP & POP3
    U_WebMail = $47; // Bool Access mode - Webmail
    U_AVScan = $04; // Bool Access mode - AV
    U_AS = $48; // Bool Access mode - AntiSpam
    U_CR = $49; // Bool Obsolete
    U_Quarantine = $49; // Bool Access mode - Challenge response
    U_IM = $4A; // Bool Access mode - IM
    U_GW = $4B; // Bool Access mode - Groupware
    U_SIP = $4E; // Bool Access mode - SIP
    U_SyncML = $56; // Bool Access mode - SyncML
    U_FTP = $224; // Bool Access mode - FTP
    U_SMS = $225; // Bool Access mode - SMS
    U_ActiveSync = $226; // Bool Access mode - ActiveSync
    U_WebDAV = $227; // Bool Access mode - WebDav

    How do you convert that to the bitmask stored in the database?

  4. #4
    This is what I used to have:

    Const SA_LocalDomain = 1
    Const SA_SMTP = 2
    Const SA_POPIMAP = 4
    Const SA_IM = 8
    Const SA_WebMail = 16
    Const SA_InstantAntiSpam = 32
    Const SA_Calendar = 64
    Const SA_ChallengeResponse = 128

    Anyone know what's changed?

  5. #5
    Hi, Changeip

    Some feedback I got from support on this, maybe it can help you.

    Regards

    xxx

    Regarding the Service Access bit mask. Please keep in mind that querying the user.db for this information is not ideal, as it is an internal structure which can anytime change between versions. Instead we recommend using API (tool) in order to access this information, where we try to maintain backward compatibility even if we change something internally.

    API

    API has several Boolean variables as already suggested by another user. The bit mask was never used to store this information, maybe in some really old version. In any case, the variables are the following.

    U_SMTP = $45; // Bool Access mode - SMTP
    U_POP3IMAP = $46; // Bool Access mode - IMAP & POP3
    U_WebMail = $47; // Bool Access mode - Webmail
    U_AVScan = $04; // Bool Access mode - AV
    U_AS = $48; // Bool Access mode - AntiSpam
    U_CR = $49; // Bool Obsolete
    U_Quarantine = $49; // Bool Access mode - Challenge response
    U_IM = $4A; // Bool Access mode - IM
    U_GW = $4B; // Bool Access mode - Groupware
    U_SIP = $4E; // Bool Access mode - SIP
    U_SyncML = $56; // Bool Access mode - SyncML
    U_FTP = $224; // Bool Access mode - FTP
    U_SMS = $225; // Bool Access mode - SMS
    U_ActiveSync = $226; // Bool Access mode - ActiveSync
    U_WebDAV = $227; // Bool Access mode - WebDav


    DB

    In DB there are two columns. First was used since version 6 and is still in use, with exactly the same bit structure as before, nothing changed. Only since v9 there's an additional column for other services that have been continuously added (and hence the name).

    U_ServicesAccess

    SA_LocalDomain = 1
    SA_SMTP = 2
    SA_POPIMAP = 4
    SA_IM = 8
    SA_WebMail = 16
    SA_InstantAntiSpam = 32
    SA_Calendar = 64
    SA_ChallengeResponse = 128

    U_AVScan

    SAO_AV = $01;
    SAO_SIP = $02;
    SAO_SYNCML = $04;
    SAO_ACTIVESYNC = $08;
    SAO_SMS = $10;
    SAO_FTP = $20;
    SAO_WEBDAV = $40;

    For domain there are similar columns D_ServicesAccess and D_OtherAccess.

  6. #6

  7. #7
    My pleasure, hope it helped.

    Regards

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts