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

Re: customizing received: headers

Expand Messages
  • Wietse Venema
    ... For submission with SMTP, the VERP_README document has different instructions (send MAIL FROM: XVERP=+= ). If it is not possible to
    Message 1 of 25 , Jun 26, 2010
      Keld Simonsen:
      > What is happening is that the postfix server receives the message
      > on port 25, via ESMTP, then delivers it via the the alias file to
      > a list of recipients, recorded in the file /some/file/in/the/filesystem,
      > which is included via a line in /etc/postfix/aliases :

      For submission with SMTP, the VERP_README document has different
      instructions (send "MAIL FROM:<senderaddress> XVERP=+="). If it is
      not possible to configure the non-Postfix SMTP client this way,
      then the options are:

      1) Use a "simple" content filter that invokes the Postfix sendmail
      command with the -XV option. This filter copies the message content
      without modification. See also the FILTER_README file.

      /etc/postfix/master.cf:
      smtp inet n - n - - smtpd
      -o content_filter=filter:
      filter unix - n n - - pipe
      user=nobody argv=/some/where/filter -f ${sender} ${recipient}

      /some/where/filter:
      #!/bin/sh
      # Usage: /some/where/filter -f sender recipient..
      /usr/sbin/sendmail -XV "$@"

      Don't forget to "chmod a+rx /some/where/filter".

      2) Use an SMTP-based content filter (per FILTER_README or
      SMTPD_PROXY_README instructions) that modifies the MAIL FROM
      command by appending the "VERP=+=" parameter. This filter copies
      the message without content modification.

      3) With Postfix 2.7 or later, use the smtpd_command_filter feature
      to modify incoming "MAIL FROM" commands and append the "VERP=+="
      parameter.

      /etc/postfix/main.cf:
      smtpd_authorized_verp_clients = 1.2.3.4
      smtpd_command_filter = pcre:/etc/postfix/command_filter.pcre

      /etc/postfix/command_filter.pcre
      /^MAIL\s+FROM:(listsender.*)/ MAIL FROM:$1 VERP=+=

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