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. [], 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 []
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=[] [], 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. [], 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   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 www.myprimarydomain.com myprimarydomain.com
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 newhostname
  • How do i check its mailbox? and what should be the "normal" entries in /etc/hosts – beNerd Mar 26 '14 at 8:41
  • Sorry it wasn't very clear, I have updated my answer. – phoops Mar 26 '14 at 8:43
  • check my edited answer – beNerd Mar 26 '14 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.