bug-mailfromd


Search for: Advanced

[Bug-mailfromd] (no subject)


Marc Roos <M.Roos@xxxxxxxxxxxxxxxxx> ha escrit:

> Yes I found the tolower function. How should I remove the '.' with a sed 
> in this fd pipe?

You don't need sed.

  # Convert all capital letters to lower-case.
  set canon_email tolower(email)
  set local localpart(canon_email)
  set domain domainpart(canon_email)
  # Remove all tags from usernames. 
  if local matches '([^@]+)\+[^@]*$'
    set local \1
  fi
  # Change @googlemail.com to @gmail.com. 
  if domain == 'googlemail.com'
    set domain 'gmail.com'
  fi
  # Remove any periods from usernames of Gmail addresses.
  if domain == 'gmail.com'
    loop while local matches '(.+)\.(.*)'
    do
      set local \1 . \2
    done
  fi
  # Reconstruct the canonical email address
  set canon_email local . '@' . domain

Regards,
Sergey