AUTH_ENUMERATE(3)
β¨ AUTH_ENUMERATE π
okay bestie, welcome to auth_enumerate(3) β it's part of the S. Varshavchik cinematic universe (aka the Courier auth library, iykyk) and she is literally the friend who knows everybody. Sit down, get comfy, we're gonna spill the tea on how to get a whole list of accounts. π
πΈ NAME πΈ
auth_enumerate β Obtain list of accounts. that's it, that's the whole vibe. she collects accounts like we collect stickers. π¦
β¨ SYNOPSIS β¨
#include <courierauth.h>
auth_enumerate(int (*callback_func)
(const char *, uid_t, gid_t, const char *,
const char *, const char *, void *), void *callback_arg);
like, look at that function pointer. she's giving main character energy. π«Ά
π DESCRIPTION π
So <pink>auth_enumerate</pink> enumerates all of the available accounts. all of them. the whole roster. no gatekeeping. π
The way it works is: she repeatedly calls <purple>callback_func</purple>, once for each account. that's the whole thing. one call per account, like she's going down the group chat tagging everyone individually. β¨
Every time she calls <purple>callback_func</purple>, it receives these args, in this exact order:
- The account name. π
- The account's numeric userid.
- The account's numeric groupid.
- The account's home directory. π
- The account's mailbox β if it's defined, and btw it may be
NULL, which means "default mailbox location, bestie, idk go find it". π - The account's options string β again, if it's defined, and again it may be
NULL. <purple>callback_arg</purple>, verbatim. like, exactly as you passed it, no edits, no filter, no notes. π«Ά
And here's the iconic part: after she invokes <purple>callback_func</purple> for the last account, she invokes <purple>callback_func</purple> one more time with all parameters set to NULL or 0. that's your little "we're done here, that's a wrap" signal. π¬ periodt.
β οΈ but lowkey important: if<pink>auth_enumerate</pink>encounters an error, it will terminate without calling<purple>callback_func</purple>with allNULLor0parameters. so if you never get that final all-NULL/0call, that's how you can tell whether a partial list of accounts was received. π no cap, that's the whole diagnostic trick.
π Note Some back-end Courier authentication modules do not implement account enumeration, so this function may not be available in all configurations. sad but true, some backends just don't wanna be perceived. π
π¦ SEE ALSO π¦
authlib(3)[1]auth_generic_meta(3)[2]auth_login_meta(3)[3]auth_getuserinfo_meta(3)[4]auth_passwd(3)[5]
go read the whole family, they're all slay. π
β NOTES β
authlib(3)https://www.courier-mta.org/authlib/authlib.htmlauth_generic_meta(3)https://www.courier-mta.org/authlib/auth_generic.htmlauth_login_meta(3)https://www.courier-mta.org/authlib/auth_login.htmlauth_getuserinfo_meta(3)https://www.courier-mta.org/authlib/auth_getuserinfo.htmlauth_passwd(3)https://www.courier-mta.org/authlib/auth_passwd.html
and that's the page!! π written by S. Varshavchik, dated 01/11/2026, from the Courier auth lib situation β so when you cite her, cite her right, okay? mwah. π§πΈβ¨
π¦ where this page comes from
- ubuntu stonking: courier-authlib-dev 0.73.1-2ubuntu1 Β· GPL-3+~with-OpenSSL-exception
- Copyright 2004 S. Varshavchik. See COPYING for -->
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms