Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using php mail() function and I do not reveive any emails: (debian, sendmail)

Here is the mail.log

Jan 26 18:00:37 sd-45956 sendmail[3918]: s0QH0bRO003918: from=www-data, size=116, class=0, nrcpts=1, msgid=<201401261700.s0QH0bRO003918@haveameet.com>, relay=www-data@localhost
Jan 26 18:00:37 sd-45956 sm-mta[3919]: s0QH0bOw003919: from=<www-data@haveameet.com>, size=379, class=0, nrcpts=1, msgid=<201401261700.s0QH0bRO003918@haveameet.com>, proto=ESMTP, daemon=MTA-v4, relay=haveameet.com [127.0.0.1]
Jan 26 18:00:37 sd-45956 sendmail[3918]: s0QH0bRO003918: to=yarekc@laposte.net, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30116, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s0QH0bOw003919 Message accepted for delivery)
Jan 26 18:00:38 sd-45956 sm-mta[3921]: s0QH0bOw003919: to=<yarekc@laposte.net>, ctladdr=<www-data@haveameet.com> (33/33), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120379, relay=smtp4.laposte.net. [193.251.214.113], dsn=5.6.0, stat=Data format error
Jan 26 18:00:38 sd-45956 sm-mta[3921]: s0QH0bOw003919: s0QH0cOw003921: DSN: Data format error
Jan 26 18:00:38 sd-45956 sm-mta[3921]: s0QH0cOw003921: to=<www-data@haveameet.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

ANy idea how to solve that ? I tried to mess with /etc/hosts but did not help

I tried to change /etc/hosts

to 127.0.0.1 haveameet.com

and now I am given:

Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXK005642: from=www-data, size=116, class=0, nrcpts=1, msgid=<201401261909.s0QJ9XXK005642@62-210-238-225.online.net>, relay=www-data@localhost
Jan 26 20:09:33 sd-45956 sm-mta[5643]: s0QJ9Xpd005643: ruleset=check_rcpt, arg1=<yarekc@laposte.net>, relay=haveameet.com [127.0.0.1], reject=553 5.1.8 <yarekc@laposte.net>... Domain of sender address www-data@62-210-238-225.online.net does not exist
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXK005642: to=yarekc@laposte.net, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30116, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.8, stat=User unknown
Jan 26 20:09:33 sd-45956 sm-mta[5643]: s0QJ9Xpd005643: from=<www-data@62-210-238-225.online.net>, size=116, class=0, nrcpts=0, proto=ESMTP, daemon=MTA-v4, relay=haveameet.com [127.0.0.1]
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXK005642: s0QJ9XXL005642: DSN: User unknown
Jan 26 20:09:33 sd-45956 sm-mta[5643]: s0QJ9Xpf005643: from=<>, size=2340, class=0, nrcpts=1, msgid=<201401261909.s0QJ9XXL005642@62-210-238-225.online.net>, proto=ESMTP, daemon=MTA-v4, relay=haveameet.com [127.0.0.1]
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXL005642: to=www-data, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31140, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s0QJ9Xpf005643 Message accepted for delivery)
Jan 26 20:09:33 sd-45956 sm-mta[5645]: s0QJ9Xpf005643: to=<www-data@62-210-238-225.online.net>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=122340, relay=62-210-238-225.online.net, dsn=5.1.2, stat=Host unknown (Name server: 62-210-238-225.online.net: host not $
Jan 26 20:09:33 sd-45956 sm-mta[5645]: s0QJ9Xpf005643: s0QJ9Xpd005645: postmaster notify: Host unknown (Name server: 62-210-238-225.online.net: host not found)
Jan 26 20:09:33 sd-45956 sm-mta[5645]: s0QJ9Xpd005645: to=bourlier, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

thanks a lot

share|improve this question

1 Answer 1

It says 'DSN' error, not 'DNS'.

Change /etc/hostname to something other than localhost. The mail server you are connecting to doesn't like the name of your machine.

share|improve this answer
    
You can clearly see in his log that the machine name is not localhost. But it is probably also not a valid hostname. –  Michael Hampton Jan 26 '14 at 17:17
    
I did that: changed to 127.0.0.1 haveameet.com and I am given another error: DSN: User unknown –  yarek Jan 26 '14 at 19:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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