4

I'm having a problem at the moment on a corporate e-mail server whereby Exim is appending its server hostname onto the end of the sender's e-mail address, despite that e-mail address already being fully qualified.

For example, a user sends an e-mail from:

the.sender@mycompany.co.uk

and Exim is changing this to:

"the.sender@mycompany.co.uk"@corp-2.mycompany.co.uk

This is no longer a valid e-mail address and as a result receiving mail servers usually reject the message because it can't verify the sender.

Exim config at: http://pastebin.com/4nS6T1Aw

Exim output from a dummy delivery (exim -bh) at: http://pastebin.com/UTXC8RuR

From the looks of it, something weird is going on with quotation marks and I think Exim's tripping itself up, but I'm scratching my head on this one and would appreciate any help!

Thanks

2

In the early days of email, the email address format was generally user@hostname. Frequently, the sender that was passed to a mail server was simply the username, and the mail server automatically appended its hostname to the supplied username.

Over the past 15 years, it's become much more common for a mail server to be configured to accept email for multiple domains (not just its hostname), which is typically called "virtual mail." When it comes to virtual mail, the mail server must figure out when the argument being passed is just a local username, or if it's a full email address. When it's not a full email address, you want Exim to append the hostname (or default domain you specify), but if it is an email address, you want to tell Exim not to append that hostname/domain.

I have this in my MAIL acl, which tells exim to "retain the sender domain" (which is a roundabout way of saying "the domain is supplied, leave it alone").

  accept  authenticated  = *
          control        = submission/sender_retain
          control        = dkim_disable_verify
          add_header     = X-Authenticated-Sender: ${sender_address}
          set acl_c_authenticated = 1
| improve this answer | |
  • 2
    Thank you, Todd. Fixed. My control line was "control = submission/sender_retain/domain=". Removing the empty "/domain=" modifier fixed it! I realise that that modifier was unnecessary unless I wanted to alter the sender's domain (which I didn't), so in effect I was blanking out the sender's original domain and then leaving Exim to pick up the pieces as best it could. – Matt Aug 7 '14 at 15:01
  • Ah, that explains why in part of the processing it seemed to recognize the correct domain name, and then mysteriously later it no longer recognized it. I'll try to remember that for the future :-) – Todd Lyons Aug 7 '14 at 18:34
  • Partially my own fault - I set up that mail server a couple of years ago following somebody's tutorial. It's surprising that I haven't been aware of this problem until now, but it looks like most receiving mail servers are quite tolerant. I've just come against one that's more picky. – Matt Aug 8 '14 at 9:18
  • This isn't working for me from an ACL perspective - my ACL tells me that sender="duncan@domain"@domain – Duncan X Simpson Aug 16 '18 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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