Method code for $smtp.parse_alias_setting()

[Turn on line numbering]
arg value, action, @args;
var a;

if (action == 'del) {
    value = explode(value, ":")[1];
    a = strsed(value, "[^a-z0-9\.-]+", "", "g");
    if (a != value)
        throw(~type, "Alias must be composed of a-z, 0-9, a period or a dash");
    if (!dict_contains(mail_aliases, value))
        throw(~failed, "The alias '" + value + "' is not set, and thus cannot be removed");
    return value;
} else {
    return (> .parse_alias(value) <);
}

// Created 13-Oct-1996 as a part of ColdCore, see: @help Credit

Tlon