We have some PHP applications which handle internal communication with staff via email. From time to time a staff member claims they did not receive the email. The system BCC's or CC's me on all emails so I have copies of them personally. Additionally, when checking logs /var/log/maillog there is an entry for the message the staff member claims is not being sent.
I emailed the staff member with a copy of the message I received along with a copy of the line in the maillog. He is saying he checks junk/spam box once daily and thus he simply did not get this email.
Now this system has been running for approaching 2 years and we only have had 2 complains about email not arriving as it should.
Is there a way I can figure out where this email went or did not go?
Tracing email that "never arrived" is an administrative nightmare.
I would start (and end) by looking at your mail logs as you've already done: these will show the server your system handed the message off to, and if it was successfully handed off (no errors in your mail log) it's pretty well out of your hands, unless you want to be supremely generous and start calling mail admins at other sites.
(ProTip: DON'T bother calling unless there is a "mutually business-critical" relationship here, in which case your boss should talk to their boss to get you both together to troubleshoot the problem.).
Back when I was dealing with shared hosting/email services I used to give people this standard boilerplate when email "never got there" but our server wasn't given a good reason (we had an error-free handoff):
(I assume our front-line support staff cleaned that up to be a bit less obnoxious before sending it to the customer since I was never fired for the above -- I did get some chuckles from the new support folks though :-)