Firstly I apologize if this is covered somewhere but my searching has left me without much help.

There are a couple of things going on here I'd love to get some help with, so please chime in if you can't point me in the right direction on any one of them.

Zimbra is configured and working fine for direct user mailboxes send/recieving. It is nat'd in a DMZ with the split dns config for hosting 2 mail domains, and eventually even more. I'm running my own nameservers with a business line so no ports are blocked via ISP, etc. Zimbra itself does not need to relay via an ISP, and is not configured to do so.

What I want to do is take my apache web server and relay mail from PHP apps via the zimbra mail server. I have configured zimbra to allow unauthenticated smtp relay's from the web server's IP.

1. To accomplish this I've configured sendmail on the web server and set zimbra as it's smart host so it can relay any and all mail to zimbra.

2. When mail from php apps go to zimbra based mailboxes it simply never shows up. A cat and grep of zimbralog and maillog seem to suggest it never even made it there... however

3. When mail from php apps go to external mailboxes they show up there but do not include 'mailed-by' headers that zimbra tags for for normal user accounts and appear in junk folders.

There's obviously a lot at play here and I'm not even sure Zimbra is the issue, but it seemed the most logical place to start. Obviously a solution is what I'm after but any help in locating some logs for more details on what's going on behind the scenes would help too.

Is there a message tracking in ZCS 6 that would help to confirm if these emails are actually being relayed by Zimbra or if apache/sendmail on the web server is somehow making it out on its own?

The Zimbra server CentOS install is 5.4 with nothing else but default packages and Zimbra on it... anybody know if there's something built in that could be catching the 'spam' from apache before it reaches Zimbra for the mails destined for zimbra based mailboxes? I've set kill percentage to 0 and the mails still don't ever seem to make it... even to junk mail folders.

Does the mailed-by header typically get excluded when zimbra is relaying for other hosts? All zimbra based mails don't get flagged as junk by external hosts, just the apache relayed ones do. I think the headers being different may be at least part of the reason for that.

Thanks in advance.