Hi Wietse, Thanks for the usual reply.
We have a situation when we need to send emails in behalf of some customers using different domain. My milter code (part of it): CONTENT=$(cat) VERP_SIGNER=`echo "$CONTENT" | grep 'X-VERP' | awk -F'[:]' '{print $2}' | xargs` if [[ $VERP_SIGNER == 1 ]]; then SENDMAIL="/usr/sbin/sendmail -i -f ${VERP_ADDRESS}" else SENDMAIL="/usr/sbin/sendmail -G -i" fi But when using -f ${VERP_ADDRESS} postfix keeps using original sender from $CONTENT. Am I doin something wrong? Thanks once again. BR, Rafael Em ter., 10 de dez. de 2024 às 12:25, Wietse Venema via Postfix-users <postfix-users@postfix.org> escreveu: > > Rafael Azevedo via Postfix-users: > > Hi there, > > > > I've made a milter that replaces some strings on specific message patterns. > > > > Now, I need to change the return-path accordingly to the VERP pattern > > for each sent mail. > > The Return-Path header is added upon DELIVERY (it contains the > envelope sender). It DOES NOT control where a message is delvered. > > Quotes from RFC 5321 (see also RFC 5322). > > When the delivery SMTP server makes the "final delivery" of a > message, it inserts a return-path line at the beginning of the mail > data. This use of return-path is required; mail systems MUST support > it. The return-path line preserves the information in the <reverse- > path> from the MAIL command. Here, final delivery means the message > has left the SMTP environment. Normally, this would mean it had been > delivered to the destination user or an associated mail drop, but in > some cases it may be further processed and transmitted by another > mail system. > > A message-originating SMTP system SHOULD NOT send a message that > already contains a Return-path header field. SMTP servers performing > a relay function MUST NOT inspect the message data, and especially > not to the extent needed to determine if Return-path header fields > are present. SMTP servers making final delivery MAY remove Return- > path header fields before adding their own. > > To change the envelope sender with a milter use the CHGFROM primitive. > > To specify the envelope sender with the Postfix sendmail command > use the -f command-line option. > > sendmail -f u...@example.com ... > > Wietse > _______________________________________________ > Postfix-users mailing list -- postfix-users@postfix.org > To unsubscribe send an email to postfix-users-le...@postfix.org _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org