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 have tested the script on another server and it works fine.

When I check exim logs there are lots of rows like this,

User 0 set for local_delivery transport is on the never_users list

lots like this

routing defer (-51): retry time not reached

and even some like this

R=lookuphost T=remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:

I am pretty stumped to be honest.

All mail is fine when sending from webmail/outlook etc! I have full SSH and root access as this is a VPS. Any help would be much appreciated

share|improve this question
    
From that server, can you send an email using telnet? Do you get a better error message? Also, PHP should echo/log the error it gets from the mail server. –  Ben Pilbrow Jan 25 '12 at 18:41
    
PHP is not giving any error at all. In fact it returns true when calling the mail function. –  Liam O'Neill Jan 25 '12 at 18:43
add comment

1 Answer

Exim is trying to deliver the mail to a remote SMTP host and is failing. This is what the:

R=lookuphost T=remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:

lines mean. It queues these mails up for retry, and skips through the mailq to see if it should attempt to redeliver any of these mails. It won't attempt this straight away, a predetermined timeout has to be reached. This causes:

routing defer (-51): retry time not reached

Finally, when the max redelivery attempts is reached without success, it tries to deliver a mail to the postmaster (which by default is configured as root). However, the default exim configuration is to never deliver to root, so you get:

**User 0 set for local_delivery transport is on the never_users lis**t

There's two problems here:

Firstly: exim can't deliver to this particular SMTP server. Either the destination SMTP server is broken, or Exim cannot deliver to any SMTP servers. Does exim deliver mail to address on other domains? You can test this on the command line with:

/path/to/exim -v 'email@example.com'
message here
^D ( control D )

Secondly, you don't have a valid way for exim to report failures back to you. Configure your /etc/aliases file to make sure that the postmaster and other accounts are properly aliased to a real address.

share|improve this answer
    
I have tested to several domains and it will not send to any at all, but it will via webmail and when connecting via pop3 or imap from a client. –  Liam O'Neill Jan 25 '12 at 18:48
    
Atcually I just managed to get it to send to yahoo, but it will not send to a couple of domains I own on a different server, and it also won't send to an e-mail address on the same server –  Liam O'Neill Jan 25 '12 at 18:56
add comment

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.