That one was solved. You are right. We rent the server and host only dozen sites we developed. All the forms on the server were protected from email injection attack, and I set up a script to monitor the mail queue to report the spam attack to us.
But it was a "guestbook attack". Someone kept on sending this client 50-200 spam a day through a form of his site for a few months. Server's mail queue monitor we set up cannot detect the attack by this small traffic. And that form also CCed to a 3 rd party hosting address. But that form was only a "contact us" form not a real online guestbook. So the client didn't realize it was a guestbook bot attack. But 3rd party hosting marked this domain and this IP as the spam, it might be their inside standard, greylist of their own. I checked the blacklists, that domain and ip was not on any public blacklists (thanks god). After we fixed the form add captcha to it, the bot spam stops, a week later, that 3rd party hosting unblock this client's domain.
But I have a new problems now. On my first server, I used the sendmail. So we can write the sendmail.cf and trusted-users to add the apache user as the trusted sender.
But on my second server (the hosting company set up for me) I just rent, the sendmail_enable was set to NONE in rc.conf, we are using the qmail. But the php.ini still sendmail_path still points to the /usr/sbin/sendmail. I tried to changethe sendmail_path point to the qmail, then the php mail() is not working.
So it seems to me that this new server is still using the sendmail for php mail().
My understanding is that you cannot both run sendmail and qmail, but could you run qmail for mail service, but only run sendmail for the localhost submit like mail()? If that is the case, after I change the sendmail's sendmail.cf and trusted-users set up and add the apache user as the trusted users. How can I make the sendmail recognize the new configuration of the sendmail, if I cannot restart the sendmail. If I restart the sendmail, it will confict with the qmail I am running, right?