0

I'm migrating from an older email structure ([first letter of first name].[last name]@company.com) to [first letter of first name][last name]@company.com.

To ensure that mail sent to older addresses is received by the necessary people I would need an alias to implement the transition rule.

Would the following suffice?

/^([A-Za-z]{1})\.([A-Za-z]+)([1-9]([0-9]+)?)?@domain.com$/  $1$2$3@domain.com
Chris Smith
  • 163
  • 4

1 Answers1

0

Short answer: YES, it's suffice.

Long answer:

I have check a few testcase and your regex works. The best approach is get all older address email and run check for each of them. For check whether postfix get your regex successfully, use postmap query. See this page for man page and this page for example query.

Example Query:

postmap -q "oldemailadress@domain.com" regexp:/file/path/to/regex/file
masegaloeh
  • 18,236
  • 10
  • 57
  • 106