Procmail (with postfix) is changing Return-Path

Discussion in 'Server Operation' started by optize, Mar 11, 2012.

  1. optize

    optize New Member

    This is my config for postfix (the important bits):

    smtp inet n - - - - smtpd -o content_filter=procmail

    procmail unix - n n - - pipe flags=Rq user=vmail argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

    So, inbound mail comes in and gets sent over to procmail.

    Here is my /etc/procmailrc:

    * < 256000
    | /usr/bin/spamc

    * ^X-Spam-Level: \*\*\*\*\*

    | /usr/sbin/sendmail -io "$@"

    Pretty standard, goes through spamassassin, if it detects spam, moves it over to it's own spam email address... if not, it sends it back out for delivery (via sendmail)

    My problem is when it gets sent back out, it changes the Return-Path to [email protected], as that's what procmail runs as, it thinks procmail is sending the email so it's screwing with headers.

    Is there a way to tell procmail to send it with the original headers instead, or is there a better way to "accept / send the email" without sendmail?

    Keep in mind this is a global procmail file, its being used for inbound + outbound mail so I can't just place the email in a folder, it needs to go out some form of a MTA.

Share This Page