A compromised PHP web app can send email from your server directly; such email might be logged in /var/log/messages, it might be in an application-specific log of some sort, or it might not be logged anywhere. It wouldn't appear in the qmail or qpsmtpd log, however.
Also, there was a vulnerability discovered a few months ago with php5 running using cgi-bin (php5 on SME 7.x) (in case you have php5-cgi installed).