Outgoing mail from linux not being delivered
As someone marked this a a duplicate I cannot post the actual answer that worked for me and that can be found here: http://serverfault.com/a/128218/42894 (and not in the duplicate link).
Our website email system based on the CakePHP (1.3) email component has been working perfectly fine for a year and suddently it's not sending emails since yesterday to certain domains anymore, and sometimes even randomly.
I use the
mail() php function to send emails via the website (account modifications, project updates, ...), and we retrieve our emails via gmail (we are using google apps). When I try to send an email to a user in our own domain, I get the followin error in
Mar 9 10:12:29 newserverxxxx sm-mta: q29ACTlt027999: < firstname.lastname@example.org >... User unknown
We also have issues with
dsn=4.0.0, stat=Deferred on certain users from other domains receiving randomly their emails or not.
We are running a Debian (lenny) + sendmail, with everything up to date.
dig mx ourdomain.com output:
newserverxxxx:/# dig mx ourdomain.com
; <<>> DiG 9.6-ESV-R4 <<>> mx ourdomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45980
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 3, ADDITIONAL: 10
;; QUESTION SECTION:
;ourdomain.com. IN MX
;; ANSWER SECTION:
ourdomain.com. 86400 IN MX 30 aspmx5.googlemail.com.
ourdomain.com. 86400 IN MX 1 aspmx.l.google.com.
ourdomain.com. 86400 IN MX 5 alt1.aspmx.l.google.com.
ourdomain.com. 86400 IN MX 5 alt2.aspmx.l.google.com.
ourdomain.com. 86400 IN MX 10 aspmx2.googlemail.com.
ourdomain.com. 86400 IN MX 10 aspmx3.googlemail.com.
ourdomain.com. 86400 IN MX 30 aspmx4.googlemail.com.
;; AUTHORITY SECTION:
ourdomain.com. 80089 IN NS ns2.phase8.net.
ourdomain.com. 80089 IN NS ns0.phase8.net.
ourdomain.com. 80089 IN NS ns1.phase8.net.
;; ADDITIONAL SECTION:
aspmx.l.google.com. 99 IN A 126.96.36.199
alt1.aspmx.l.google.com. 97 IN A 188.8.131.52
alt2.aspmx.l.google.com. 99 IN A 184.108.40.206
aspmx2.googlemail.com. 399 IN A 220.127.116.11
aspmx3.googlemail.com. 399 IN A 18.104.22.168
aspmx4.googlemail.com. 536 IN A 22.214.171.124
aspmx5.googlemail.com. 536 IN A 126.96.36.199
ns0.phase8.net. 658 IN A 188.8.131.52
ns1.phase8.net. 658 IN A 184.108.40.206
ns2.phase8.net. 658 IN A 220.127.116.11
;; Query time: 7 msec
;; SERVER: 18.104.22.168#53(22.214.171.124)
;; WHEN: Fri Mar 9 11:37:08 2012
;; MSG SIZE rcvd: 438