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

I am in the process of setting up a new server which runs Ubuntu on a LAMP stack.

I have installed sendmail but it doesnt seem to work.

This is my output in the error log:

Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: STARTTLS=client, relay=mail.imagine-publishing.co.uk., version=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA, bits=256/256
Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: r3GDkeJG012937: to=<web@imagine-publishing.co.uk>, ctladdr=<www-data@ip-10-33-164-173.eu-west-1.compute.internal> (33/33), delay=00:00:11, xdelay=00:00:11, mailer=esmtp, pri=120967, relay=mail.imagine-publishing.co.uk. [86.28.80.249], dsn=5.6.0, stat=Data format error
Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: r3GDkeJG012937: r3GDkpJG012939: DSN: Data format error
Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: r3GDkpJG012939: to=<www-data@ip-10-33-164-173.eu-west-1.compute.internal>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

That error was taken from /var/mail/www-data
(reason: 553 5.1.8 Sender address <www-data@ip-10-33-164-173.eu-west-1.compute.internal> domain does not exist)

Im a bit of a newbie when it comes to server admin stuff so any help would be appriciated!

share|improve this question
    
1) Could you post bounce email generated and send to www-data? It may contain more hints. 2) Can you send email to other domains successfully? –  Andrzej A. Filip Apr 16 '13 at 15:48
    
(reason: 553 5.1.8 Sender address <www-data@ip-10-33-164-173.eu-west-1.compute.internal> domain does not exist) –  Bob Flemming Apr 16 '13 at 15:56
    
That error was taken from /var/mail/www-data –  Bob Flemming Apr 16 '13 at 15:56
    
Do your have a public IP address? –  Andrzej A. Filip Apr 16 '13 at 16:05
    
Yes. Do I need to use this in the config files somewhere? –  Bob Flemming Apr 16 '13 at 16:09

1 Answer 1

up vote 1 down vote accepted

Your sendmail uses invalid "this host email name". It is used by default as domain in sender addresses. Other mail server reject such sender address (domain without DNS records).

Set both envelope sender and header sender addresses in you php configuration/script. Set them to user@valid.domain.
http://php.net/manual/en/mail.configuration.php
http://php.net/manual/en/function.mail.php

Your sendmail should be fixed too.
Change "this host email name" to name with A or MX DNS record:
* change hostname as reported by hostname --fqdn
OR
* change it for sendmail only https://www.sendmail.com/sm/open_source/docs/m4/whoami.html

share|improve this answer
    
where do I need to change "this host email name"? What file needs changing? –  Bob Flemming Apr 16 '13 at 16:52
    

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.