Matthew Kitchin via Postfix-users: > Hey all, former longtime user, but been away from Postfix for about 13 years. > I'm migrating a datacenter to Azure. We have a variety of things > (websites, copiers, monitoring apps, etc.) that send emails that don't > need to be replied to. In an Azure environment, we have to route these > through Azure SMTP services and they have to come from a designated > address. These emails routed to Azure SMTP have to be from > f...@example.com. Postfix came to mind as the ideal solution. This > setting does the trick. > sender_canonical_maps = static:f...@example.com > The problem is it seems to strip out the display name too. I've tried > various options with > sender_canonical_classes > and it doesn't seem to help.
Sorry, those tweaks will not affect the display name, because Postfix canonical mapping affects only the emil address portion of a message header, not the display name. If something strips out the display name, then that happens with Postfix header_checks, with some non-Postfix content_filter, miklter, or smtpd_proxy_filter, or it happens outside of Postfix. > If I remove the rewrite, and actually send from f...@example.com > everything is great. Any idea how I can rewrite the sender address > to f...@example.com but leave everything else alone so mail clients > will still show the display name? I hate that Azue makes us do > this given we have already authenticated, but that is their > requirement. You will need to demonstrate that display names are stripped after a message arrives in Postfix, and before the message leaves Postfix. /etc/postfix/main.cf: header_checks = pcre:/etc/postfix/from_header_checks smtp_header_checks = pcre:/etc/postfix/from_header_checks /etc/postfix/from_header_checks: /^(From:.+)/INFO $1 This will log the From: header upon arrival and upon departure. Wietse Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org