This is a query about how to have Postfix rewrite a From: address only
for messages sent to a particular destination address.

I've set my Postfix transport map so that most of my home email (From:
idal...@idallen.ca) goes out via my web host idallen.ca:

    smtp:[idallen.ca]:submission

My College often throws idallen email into spam folders, so I have set
up a preceding transport map line that sends anything destined to my
College directly into the College with authentication:

    mycollege.com smtp:[outlook.office365.com]:submission

In my mutt email client I created a send-hook that rewrites my From:
address to be the required address for my College (required for office365)
only for messages destined for my College.  If not going to my College,
mutt leaves the From: address set to idal...@idallen.ca.

That's great for messages I send with mutt, but it doesn't fix the
From: address for messages to my College sent using any other method
(e.g. directly with sendmail or using Perl, etc.); those other methods
still have From: idal...@idallen.ca and they get rejected by office365.

How can I have Postfix rewrite my From: address *only* for messages
destined for my College, or for messages using the mycollege.com transport
line (same thing)?  (Then I wouldn't need the mutt send-hook.)

Do I need to write my own "Postfix After-Queue Content Filter"
(http://www.postfix.org/FILTER_README.html) to do this?

-- 
| Ian! D. Allen, BA, MMath  -  idal...@idallen.ca - Ottawa, Ontario, Canada
| Home: www.idallen.com   Contact Improvisation Dance: www.contactimprov.ca
| Former college professor (Free/Libre GNU+Linux) at:  teaching.idallen.com
| Defend digital freedom:  http://eff.org/  and have fun:  http://fools.ca/

Reply via email to