I've set up sendmail to just send out mails from our php web application. That works fine, as long as we are not sending mail to the same domain as our web app.
e.g.
our app = www.ourapp.com sending mails works perfectely, except for [email protected]"
I don't know if it's relevant, but our target email is hosted with google apps. Sendmail queue is empty and the log files always say the message has been sent
we are running CentOS as our OS
It is doable in sendmail, but it is faster to use something like ssmtp. An example that closely relates to your case is here.
sendmail as is configured is not delivering email to your Google Apps hosted email accounts because it thinks that it should handle email for your domain locally. The fact that it says that messages have been sent means that they are delivered locally on the machine. Check you /var/mail contents.
Is the domain in /etc/mail/local-host-names ? if so, sendmail will assume that it is the final destination for that domain and attempt local delivery.
Take the domain out of local-host-names , rebuild your sendmail config, and reload sendmail, should be fine. If you don't want any mail delivered locally, ie if you want everything going to your google apps account, then you will likely want /etc/mail/local-host-names to be empty (not even localhost) and then make sure to create proper role aliases pointing to fully qualified addresses at your domain.
Also do please make sure your MX records are pointing to google (unlikely to be the problem , but worth double checking that as well)
this problem has solved itself after 1-2 days. It probably just was a DNS update issue, where we got the updated data already, but perhaps the mailservers we have been tested still had old DNS cache.
thanks all for the help on this one