-1

I am unable to fire any email from the php scripts on my vps server. I went to check in the logs and found this:

Mar 26 05:53:30 corporatepixels sendmail[23772]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128
Mar 26 05:54:01 corporatepixels sendmail[23772]: s2Q5rTGQ023770: to=<info@mindfield.co.in>, ctladdr=<nginx@corporatepixels.com> (498/498), delay=00:00:31, xdelay=00:00:31, mailer=esmtp, pri=120469, relay=aspmx.l.google.com. [173.194.68.27], dsn=5.0.0, stat=Service unavailable
Mar 26 05:54:01 corporatepixels sendmail[23772]: s2Q5rTGQ023770: s2Q5s1GQ023772: DSN: Service unavailable
Mar 26 05:54:01 corporatepixels sendmail[23772]: s2Q5s1GQ023772: to=<nginx@corporatepixels.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31687, dsn=2.0.0, stat=Sent
Mar 26 06:22:14 corporatepixels sendmail[23982]: s2Q6MEGd023982: from=nginx, size=1147, class=0, nrcpts=1, msgid=<201403260622.s2Q6MEGd023982@corporatepixels.com>, relay=nginx@localhost
Mar 26 06:22:15 corporatepixels sendmail[23983]: s2Q6MEq1023983: from=<nginx@corporatepixels.com>, size=1375, class=0, nrcpts=1, msgid=<201403260622.s2Q6MEGd023982@corporatepixels.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Mar 26 06:22:15 corporatepixels sendmail[23982]: s2Q6MEGd023982: to=nikhil@glomed.biz, ctladdr=nginx (498/498), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31147, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s2Q6MEq1023983 Message accepted for delivery)
Mar 26 06:22:17 corporatepixels sendmail[23985]: s2Q6MEq1023983: to=<nikhil@glomed.biz>, ctladdr=<nginx@corporatepixels.com> (498/498), delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=121375, relay=smtp.secureserver.net. [72.167.238.201], dsn=2.0.0, stat=Sent (ok:  Message 350408018 accepted)
Mar 26 06:32:59 corporatepixels sendmail[24455]: s2Q6WuiQ024455: from=mrinal, size=0, class=0, nrcpts=0, relay=mrinal@localhost
Mar 26 06:33:12 corporatepixels sendmail[24457]: s2Q6X8PV024457: from=mrinal, size=0, class=0, nrcpts=1, relay=mrinal@localhost

this was pulled from /var/log/maillog

Now I don't really understand whether they represent a error or a successful delivery but the mails never reach the mailbox.

THIS IS WHAT I HAVE IN MY /etc/hosts file

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.241.188.154 www.myprimarydomain.com myprimarydomain.com
beNerd
  • 117
  • 5

1 Answers1

0
dsn=5.0.0, stat=Service unavailable

This is generic error. It also indicates in the log that your message is relayed to root@localhost, so check it's mailbox for more information.

I think your problem is that you have localhost set as your hostname. Set it to normal:

  1. Change your server's hostname from localhost to FQDN hostname;
  2. Update /etc/hosts and add 127.0.0.1 newhostname
ek9
  • 2,093
  • 4
  • 19
  • 23