Skip to content

Instantly share code, notes, and snippets.

function vdelivermail(..., env_vars):
// get_arguments(): Parse EXT, split at *first* hyphen
EXT = env_vars["EXT"] // e.g., "no-reply-office-sofia@domain.com"
TheUser = EXT
TheUserExt, TheExt = split_at_first_hyphen(EXT) // "no", "reply-office-sofia"
replace_all(TheExt, ".", ":")
// Main Logic: Lookup user (full name first, then base name)
if not vauth_getpw(TheUser, ...): // Try full username "no-reply-office-sofia"
if QMAIL_EXT and TheUser != TheUserExt: