---
name: "auth_enumerate"
section: "3"
platform: "linux"
package: "courier-authlib-dev"
version: "0.72.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/auth_enumerate"
---

# auth\_enumerate(3)

Obtain list of accounts

## NAME

auth\_enumerate - Obtain list of accounts

## 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***);**

## DESCRIPTION

**auth\_enumerate** enumerates all of the available accounts. **auth\_enumerate** repeatedly calls **callback\_func**, once for each account. **callback\_func** receives the following arguments:

• Account name.

• Account's numeric userid.

• Account's numeric groupid.

• Account's home directory.

• Account's mailbox (if defined, may be NULL, which indicates the default mailbox location).

• Account's options string (if defined, may be NULL)

• *callback\_arg*, verbatim.

After invoking **callback\_func** for the last account, **auth\_enumerate** invokes **callback\_func** one more time with all parameters set to NULL or 0.

If **auth\_enumerate** encounters an error it will terminate without calling **callback\_func** with all NULL or 0 parameters. This can be used to determine whether a partial list of accounts was received.

**Note**\

Some back-end Courier authentication modules do not implement account enumeration, so this function may not be available in all configurations.

## SEE ALSO

[**authlib**(3)](/authlib/3.md)\[1\], [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md)\[2\], [**auth\_login\_meta**(3)](/auth_login_meta/3.md)\[3\], [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md)\[4\], [**auth\_passwd**(3)](/auth_passwd/3.md)\[5\].

## NOTES

- 1\.

  [**authlib**(3)](/authlib/3.md)

  http://www.courier-mta.org/authlib/authlib.html

- 2\.

  [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_generic.html

- 3\.

  [**auth\_login\_meta**(3)](/auth_login_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_login.html

- 4\.

  [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_getuserinfo.html

- 5\.

  [**auth\_passwd**(3)](/auth_passwd/3.md)

  http://www.courier-mta.org/authlib/auth\_passwd.html
