Postfix from address

In my application environment, I provide my users with the ability to send emails to their customers. It uses the php mail() function.

In my previous server, sendmail was the mailer configured for php. In this new environment, it uses the Postfix version of sendmail.

The php.ini file specifies: sendmail -i -t as the mail command.

When I send mail from a customer (on their behalf), I use the additional argument that is to be passed to sendmail to specify the 'From' portion of the envelop. I.e. the mail() function is invoked like:
mail( $to, $replyTo, $subject, $headers, "-f $envelopFrom");

However, this does not seem to be working correctly.

It seems that postfix thinks the user sending the amil is '1sit' where PHP is running as 'ezom'. Additionally, it does not seem to be recognizing the '-f $envelopFrom' argument.

Specific maillog entry is below. This email was sent in a fashion that should have been:

Subject: Test email

Test message.

However (see below) it seems that Postfix did a setuid to '1sit' rather than 'ezom' and also spamd seemed to fail the message (??).

Also, there was no failed delivery response in 1sit's inbox (as indicated in the log) or on my other 1sit server.

Can you help me figure out what's going on?

I need to be able to send mail on behalf of my clients with any failures being returned to the client address specified by $fromEnvelop instead of me (or any of the other domains on this system). I.e. the client may configure their environment to send from '' and any reply-to or failures should go to that address (which may or may not be hosted on this machine).

Postfix log info (I added comments in parentheses):

Jan 21 15:22:05 ezms1 postfix/pickup[5018]: 2E5922D28302: uid=507 from=
(Above seems correct)
Jan 21 15:22:05 ezms1 postfix/cleanup[6359]: 2E5922D28302: message-id=< >?
Jan 21 15:22:05 ezms1 postfix/qmgr[6078]: 2E5922D28302: from=, size=531, nrcpt=1 (queue active)
(above also seems correct but don't know about the nrcpt=1 option)
Jan 21 15:22:07 ezms1 spamd[28094]: spamd: connection from localhost [] at port 56033
Jan 21 15:22:07 ezms1 spamd[28094]: spamd: setuid to 1sit succeeded
(Don't think the above should be going setuid 1sit but instead should be setuid 'ezom' which is what php was running as)
Jan 21 15:22:07 ezms1 spamd[28094]: bayes: cannot open bayes databases /home/1sit/.spamassassin/bayes_* R/O: tie failed:
Jan 21 15:22:07 ezms1 spamd[28094]: spamd: processing message <> for 1sit:504
Jan 21 15:22:07 ezms1 spamd[28094]: bayes: cannot open bayes databases /home/1sit/.spamassassin/bayes_* R/O: tie failed:
Jan 21 15:22:07 ezms1 spamd[28094]: auto-whitelist: open of auto-whitelist file failed: auto-whitelist: cannot open auto_whitelist_path /home/1sit/.spamassassin/auto-whitelist: No such file or directory
(I do not have any white/black listing enabled)
Jan 21 15:22:07 ezms1 spamd[28094]: spamd: identified spam (5.3/5.0) for 1sit:504 in 0.1 seconds, 687 bytes.
Jan 21 15:22:07 ezms1 spamd[28094]: spamd: result: Y 5 - HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,INVALID_MSGID,MIME_HTML_ONLY,NO_RELAYS scantime=0.1,size=687,user=1sit,uid=504,required_score=5.0,rhost=localhost,raddr=,rport=56033,mid=<>,autolearn=no
(Do I need to configure relays so that spamd will see that this came from and it's okay to relay from localhost?)
Jan 21 15:22:07 ezms1 postfix/local[6361]: 2E5922D28302: to=<>, orig_to=, relay=local, delay=2.6, delays=0.3/0.03/0/2.2, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Jan 21 15:22:07 ezms1 postfix/qmgr[6078]: 2E5922D28302: removed
(Why is it sending to instead of either or
Jan 21 15:22:07 ezms1 spamd[28092]: prefork: child states: II

Closed (fixed)