I am trying to implement an AlterMIME script into zimbra (so I can add a disclaimer to outgoing mail).

The postfix master.cf script looks like this:
Code:    inet  n       -       n       -       -       smtpd      inet  n       -       n       -       -       smtpd
   -o content_filter=dfilt:
dfilt   unix    -       n       n       -       -       pipe
   flags=Rq user=filter argv=/opt/zimbra/postfix/conf/disclaimer -f ${sender} -- ${recipient}
(where is my external IP)

IWhen sending mail from an IMAP client, the script works fine, but not when sending from the web client. When I swap the IPs in the script, the opposite is true. How can I get the web client to send from localhost and not from the external IP?

I tried going into the Admin UI and changing "Web mail MTA Hostname:" to localhost, but that just prevented me from sending externally.