I'm trying to change de envelope.from when resubmitting message to postfix queue using milter.
For some reason this is not working as expected: SENDMAIL="/usr/sbin/sendmail -i -f ${VERP_ADDRESS}" $SENDMAIL "$@" <<EOF $SIGNED_CONTENT EOF BR, Rafael Em ter., 10 de dez. de 2024 às 15:39, Wietse Venema via Postfix-users <postfix-users@postfix.org> escreveu: > > Rafael Azevedo: > > 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? > > By design (RFC 5321/5322), envelope.from and header.from can contain > diffferent addresses. > > For example, this email message has different addresses in envelope.from > (postfix-users-boun...@postfix.org) and header.from > (postfix-users@postfix.org). > > If you want to to change both the envelope.from and header.from, > then you need to change both the envelope.from and header.from. > > But I am not sure that listing the VERP sender address in the header > is a good idea. > > 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