Method code for $smtp.parse_alias_setting()

[Turn off line numbering]
  1: arg value, action, @args;
  2: var a;
  3: 
  4: if (action == 'del) {
  5:     value = explode(value, ":")[1];
  6:     a = strsed(value, "[^a-z0-9\.-]+", "", "g");
  7:     if (a != value)
  8:         throw(~type, "Alias must be composed of a-z, 0-9, a period or a dash");
  9:     if (!dict_contains(mail_aliases, value))
 10:         throw(~failed, "The alias '" + value + "' is not set, and thus cannot be removed");
 11:     return value;
 12: } else {
 13:     return (> .parse_alias(value) <);
 14: }

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

Tlon