Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to send emails with an rails webapp. I set up an exim server and when looking into the logs, the sending works, but the emails aren't sent really.

I had the same problem with another ISP.

The sender address is hosted on another mailserver, other ISP. I think the problem is, that sending doesn't work because the sender address isn't hosted on the same server. Do you have any advice on this? The logs (exim) tell me the following:

2011-01-01 14:38:06 1PZ1eo-0000Ga-38 <= <> R=1PZ1eo-0000GY-1p U=Debian-exim P=local S=1778
2011-01-01 14:38:08 1PZ1eo-0000Ga-38 => R=dnslookup T=remote_smtp [] X=TLS1.0:RSA_AES_256_CBC_SHA1:32 DN="C=US,,OU=GT21850092,OU=See (c)08,OU=Domain Control Validated - QuickSSL(R),"
2011-01-01 14:38:08 1PZ1eo-0000Ga-38 Completed is the external sender-address.

Edit with more details

When sending a mail from command line with:

echo "Test" | mail -s Testmail

the logs says

2011-01-01 20:45:24 1PZ7OG-0001Vp-Rx <= root@gustav U=root P=local S=360
2011-01-01 20:45:26 1PZ7OG-0001Vp-Rx => R=dnslookup T=remote_smtp [] X=TLS1.0:RSA_ARCFOUR_MD5:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,"
2011-01-01 20:45:26 1PZ7OG-0001Vp-Rx Completed

and I get the mail on my gmail account.

But when sending by webapp (when testing locally with sendmail it works fine) I only get this log output:

2011-01-01 20:50:08 1PZ7Sq-0001X9-L4 <= <> R=1PZ7Sq-0001X7-Jo U=Debian-exim P=local S=1780
2011-01-01 20:50:11 1PZ7Sq-0001X9-L4 => R=dnslookup T=remote_smtp [] X=TLS1.0:RSA_AES_256_CBC_SHA1:32 DN="C=US,,OU=GT21850092,OU=See (c)08,OU=Domain Control Validated - QuickSSL(R),"
2011-01-01 20:50:11 1PZ7Sq-0001X9-L4 Completed
share|improve this question
Please can you post the previous few lines of the log file? What you've quoted looks like there is a bounce (charicterised by the sender address of <>) being sent to; is there? What does it contain if so? Can you send e-mail from a command line on the server? – David North Jan 1 '11 at 18:40
thank you, see edited post! – Tronic Jan 1 '11 at 19:54

The R= is saying that this item is a bounce and the message-id given in the R= part is the original message-id which failed. You'll need to look at the log-entry for that to see what recipient address was generated and why it failed.

You might also try exim -bt to see what Exim thinks should be done with a particular address, and add -d to the command-line to get more debugging information (but beware that there can be a lot to pick through).

share|improve this answer

In general, the location of the sender address (or to be more accurate, the location of the mailbox associated with the sender address) won't affect message sending/receiving when sending from an application running on a different server. There are exceptions to this, for example SPF, so this should always be checked in the DNS and in the sending MTA log file.

The log file data you have given is insufficient to help deduce the problem. The message delivered to is not the message from your web application, but an error (bounced messaged) caused by the real problem. It's being sent to that address because that's the message From address.

You will need to provide the log file entries before these, which will probably be similar to:

2011-01-01 20:49:00 1PZ7OG-0001W4-22 <= U=Debian-exim P=local S=1024

share|improve this answer

Your Answer


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.