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

Re: using original recipient in external command delivery

Expand Messages
  • Wietse Venema
    ... Postfix prepends X-Original-To:, so you should use the first one. ... $ man 8 pipe ... argv=command... (required) ... In the command argument vector, the
    Message 1 of 2 , Feb 3, 2008
    • 0 Attachment
      Albert Dengg:
      > hi
      >
      > i'm currently impleneting a solution where mail vor multiple users is
      > delivered to one user using virtual_alias_maps and should then be
      > processed through a procmail rule.
      >
      > so far, so good...
      > but the problem is that an external command that get's called while
      > proccessing the mail need the orignial recipient address.
      >
      > i'm using postfix 2.3.8 from debian, and now i have 2 questions:
      > 1) is the X-Original-To header usable for that? (what happens if the
      > mails for some reason already contains a X-Original-To header?)

      Postfix prepends X-Original-To:, so you should use the first one.

      > 2) if i won't get a stable (and upgrade-save) result this way, is there
      > another way to implement this?

      $ man 8 pipe
      ...
      argv=command... (required)
      ...
      In the command argument vector, the following macros are recog-
      nized and replaced with corresponding information from the Post-
      fix queue manager delivery request.
      ...
      ${original_recipient}
      This macro expands to the complete recipient address
      before any address rewriting or aliasing.
      ...
      This feature is available in Postfix 2.5 and later.

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