Results 1 to 4 of 4

Thread: postfix (outgoing) address rewrite depending on subject

  1. #1
    Join Date
    Nov 2022
    Beans
    2

    Question postfix (outgoing) address rewrite depending on subject

    Can postfix be used to filter on the subject line of outgoing messages, and change the from/reply address accordingly?

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: postfix (outgoing) address rewrite depending on subject


  3. #3
    Join Date
    Nov 2022
    Beans
    2

    Re: postfix (outgoing) address rewrite depending on subject

    Yes, I've had a skim through that but it's not evident to me that it can perform this logic: "if (subject) contains (some-text) then set 'From' header to 'some@address' "

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: postfix (outgoing) address rewrite depending on subject

    Procmail can do this with its associated formail command, but procmail is a "mail delivery agent," not a "mail transfer agent" like postfix. You could create an email alias that directs any messages it receives to a "recipe" in procmail. Procmail can test on criteria and act accordingly.You would then send any message you want to rewrite to the alias and have it send it out with altered headers on your behalf. See "man procmailrc" and "man procmailex" for details.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •