Wietse, Thanks very much. That worked like a charm.
cheers, ski On 1/16/19 4:09 PM, Wietse Venema wrote: > Ski Kacoroski: >> Hi, >> >> I have a blackbox UPS that send this email when I look at it with postcat >> >> *** MESSAGE CONTENTS deferred/B/BFE60169 *** >> regular_text: Received: from loki.nsd.org (ups-tms.nsd.org [10.145.1.25]) >> regular_text: by sys.nsd.org (Postfix) with ESMTP id BFE60169 >> regular_text: for <g.emergencypowerouta...@nsd.org>; Wed, 16 Jan 2019 >> 15:24:32 -0800 (PST) >> regular_text: Subject: TMS MDF ALARM USHA Test Message >> regular_text: From: <l...@nsd.org> >> regular_text: To: >> g.emergencypowerouta...@nsd.org<g.emergencypowerouta...@nsd.org> >> >> Notice that there is no space between nsd,org and <g.emergen...> When I >> try to forward this email to O365, O365 scrambles the email into: >> >> nsd.orgg.emergencypowerouta...@nsd.org > > Now, that is not a robust parser... > >> and refuses to deliver it as that address doesn't exist. I tried a > > Office 365 uses the header to route the message? > >> regexp:/etc/postfix/virtual map: >> >> main.cf: >> virtual_alias_maps = regexp:/etc/postfix/virtual >> >> postmap -q >> "g.emergencypowerouta...@nsd.org<g.emergencypowerouta...@nsd.org>" >> regexp:/etc/postfix/virtual >> g.emergencypowerouta...@nsd.org <g.emergencypowerouta...@nsd.org> >> >> that adds in the space, but it does not seem to be working on the >> regular_text part of the email. > > Of course not. virtual_alias_maps rewrites the <address>, not the > free text before <address>. > > To fix non-address info in a header, use header_checks. > > Wietse > >> Any ideas on how I can get postfix to rewrite that part of the email so >> I can forward it on to O365. >> >> Thanks very much for your help. >> >> cheers, >> >> ski >> >> -- >> "When we try to pick out anything by itself, we find it >> connected to the entire universe" John Muir >> >> Chris "Ski" Kacoroski, kacoro...@gmail.com, 206-501-9803 >> -- "When we try to pick out anything by itself, we find it connected to the entire universe" John Muir Chris "Ski" Kacoroski, kacoro...@gmail.com, 206-501-9803