Sendmail Error - DSN: Data format error

On a FreeBSD server with sendmail mail server, mail from PHP scripts are not going out.

I tested sending mail from SSH prompt and that worked fine.

On checking mail log at /var/log/maillog found following error.

Oct 9 02:45:51 www sendmail[55971]: k992joX1055971: from=www, size=85, class=0, nrcpts=1, msgid=<[email protected]>, [email protected]
Oct 9 02:45:51 www sendmail[55971]: k992joX1055971: [email protected], ctladdr=www (80/80), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30085, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error
Oct 9 02:45:51 www sendmail[55971]: k992joX1055971: k992joX2055971: DSN: Data format error
Oct 9 02:45:51 www sendmail[55971]: k992joX2055971: to=www, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31109, relay=[127.0.0.1], dsn=5.3.0, stat=User unknown
Oct 9 02:45:51 www sendmail[55971]: k992joX2055971: k992joX3055971: return to sender: User unknown
Oct 9 02:45:51 www sendmail[55971]: k992joX3055971: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32133, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k992jpJ4055972 Message accepted for delivery)

The problem is fixed by editing php.ini file and adding from email id to sendmail.

sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]

Get in touch with us

Questions? Concerns? Comments? We want to hear from you!
Drop us a line with whatever is on your mind and we will get back to you ASAP!!