Loading ...
Sorry, an error occurred while loading the content.
 

Intercepting messages in queue

Expand Messages
  • Johnson, S
    Anyone know of any documentation on how to manipulate the incoming message queues? I want to intercept inbound messages and process them with an external
    Message 1 of 3 , Nov 30, 2008
      Anyone know of any documentation on how to manipulate the incoming message queues? I want to intercept inbound messages and process them with an external program that I will be writing.

      Thanks
      Scott
    • Victor Duchovni
      ... http://www.postfix.org/CONTENT_INSPECTION_README.html -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore
      Message 2 of 3 , Nov 30, 2008
        On Sun, Nov 30, 2008 at 11:13:11PM -0600, Johnson, S wrote:

        > Anyone know of any documentation on how to manipulate the incoming
        > message queues? I want to intercept inbound messages and process them
        > with an external program that I will be writing.

        http://www.postfix.org/CONTENT_INSPECTION_README.html

        --
        Viktor.

        Disclaimer: off-list followups get on-list replies or get ignored.
        Please do not ignore the "Reply-To" header.

        To unsubscribe from the postfix-users list, visit
        http://www.postfix.org/lists.html or click the link below:
        <mailto:majordomo@...?body=unsubscribe%20postfix-users>

        If my response solves your problem, the best way to thank me is to not
        send an "it worked, thanks" follow-up. If you must respond, please put
        "It worked, thanks" in the "Subject" so I can delete these quickly.
      • Ville Walveranta
        I have in master.cf: #client for sending emails to smtpprox scan unix - - n - 10 smtp -o smtp_send_xforward_command=yes -o
        Message 3 of 3 , Nov 30, 2008
          I have in master.cf:

          #client for sending emails to smtpprox
          scan       unix  -       -       n       -       10      smtp
             -o smtp_send_xforward_command=yes
             -o disable_mime_output_conversion=yes
             -o smtp_generic_maps=

          #return interface for the mail filtered through smtpprox
          localhost:10026 inet  n       -       n       -       10      smtpd
             -o content_filter=
             -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
             -o smtpd_helo_restrictions=
             -o smtpd_client_restrictions=
             -o smtpd_sender_restrictions=
             -o smtpd_recipient_restrictions=permit_mynetworks,reject
             -o mynetworks=127.0.0.0/8
             -o smtpd_authorized_xforward_hosts=127.0.0.0/8

          and in main.cf:

          # execute `postsuper -r ALL' & reload if you enable/disable content_filter!
          content_filter = scan:[127.0.0.1]:10025
          # WARNING! If the content_filter is disabled above, also disable the option below!
          receive_override_options = no_address_mappings

          That pulls any inbound message through smtpprox (http://bent.latency.net/smtpprox/) which can be modified to do whatever you like. See an archived discussion at http://archives.neohapsis.com/archives/postfix/2008-07/thread.html#999 for ideas. I'll be using this method to remove "**SPAM**" tag from the Subject line (it's placed in spam messages by an external spam filtering service) and then to include a header "X-Spam: yes" instead for easy sorting in the users' mail clients.

          Ville

        Your message has been successfully submitted and would be delivered to recipients shortly.