AUTH_META(3)

πŸ’– AUTH_META β€” the auth metadata situation πŸ’–

okay so bestie, this is auth_meta(3) from S. Varshavchik's Courier auth library. it's genuinely not scary, i promise. it's just a lil struct that carries extra optional metadata around. periodt. πŸŽ€


✨ NAME ✨

auth_meta β€” Authentication metadata πŸ¦‹


🌸 SYNOPSIS 🌸

#include <courierauth.h>

struct auth_meta *meta=auth_meta_init_default(void);

void auth_meta_destroy_default(struct auth_meta *meta);

πŸ’… DESCRIPTION πŸ’…

so the whole vibe of the auth_meta structure is: it hands over additional, optional metadata to auth_login_meta(3), auth_generic_meta(3), and auth_getuserinfo_meta(3). that's it. that's the job. she's a supporting character but she's giving main character energy fr fr. πŸ‘‘

her little anatomy:

struct auth_meta {
    char **envvars;
};

and here's the breakdown of that one field, no gatekeeping:

  • envvars β€” an array of opaque "name=value" strings, and the array ends with a null pointer. classic. lowkey iconic formatting tbh.

the library recognizes this envvars variable:

  • TCPREMOTEIP β€” the IP address the authentication request came from. that's the one. that's the whole list. 🫢

🧚 Initializing a default auth_meta 🧚

auth_meta_init_default creates an auth_meta with default values. if the object could not be created, you get a NULL pointer back β€” so like, check that, bestie. 😭

auth_meta_destroy_default frees the object and all memory used by it, once you no longer need it. don't be out here leaking, it's not cute. πŸ’€

the typical usage flow, in order:

  1. auth_meta_init_default gets called to create an auth_meta.
  2. the pointer to the new auth_meta gets passed to auth_login_meta(3), auth_generic_meta(3) or auth_getuserinfo_meta(3).
  3. auth_meta_destroy_default deallocates and frees auth_meta's memory.

🌈 Default auth_meta values 🌈

auth_meta_init_default creates an auth_meta with these values:

  • the TCPREMOTEIP environment variable, if set, is placed in the TCPREMOTEIP envvars ✨

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ“ NOTES πŸ“

  1. authlib(3) https://www.courier-mta.org/authlib/authlib.html
  2. auth_login_meta(3) https://www.courier-mta.org/authlib/auth_login.html
  3. auth_generic_meta(3) https://www.courier-mta.org/authlib/auth_generic.html
  4. auth_getuserinfo_meta(3) https://www.courier-mta.org/authlib/auth_getuserinfo.html

and that's the whole page, bestie, you ate that πŸ“πŸ’œ

this iconic lil manual is credited to S. Varshavchik, stamped 01/11/2026, and lives in section 3 of the manual as AUTH_META(3). go forth and pass that metadata around responsibly. mwah πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from