On 2021-11-04 12:36, Viktor Dukhovni wrote:
This is an acceptable work-around for an internal mailhub forwarding
mail from sloppily/un configured internal machines. To really dot the
i's and cross the t's, it should be hardened to also handle quoted
address
forms:
"non..dot<atom>"@some.sub.domain ->
"non..dot<atom>+some"@other.doamain
via:
if !/@other\.domain$/
/^"(.*)"@([a-z0-9](-*[a-z0-9]+)*)\.[a-z0-9]/
"${1}+${2}"@other.domain
/^(.*)@([a-z0-9](-*[a-z0-9]+)*)\.[a-z0-9]/ ${1}+${2}@other.domain
endif
With quoted localpart addresses, the entire localpart needs to be in
quotes.
Thank you very much!!! Getting help from those much wiser is much
appreciated.