It's more about how you send your e-mail via php. If you e.g. just use mail() with out any special parameters to set the From, the sender will look like the user sending the e-mail, which in this case is your apache, running as www-data.
To avoid this, either set the X-From or directly use the pear mail class
and directly send it via smtp over the appropriate mailbox.