Skip to main content

Change outbound domain for email with Exim

Comments

8 comments

  • Volox
    Are the two domains you have on the server using the same IP? Or are they using a dedicated IP? Have you looked at the 'original message' raw format (menu item under the 3 dots in the upper right when viewing the message in gmail) to see if the email that is going to spam is failing DKIM or SPF ?
    0
  • thealien
    I went through the headers in detail knowing how to read them. SPF/DKIM is good...passes on all counts. Issue is not IP based. It's definitely domain based.
    0
  • Volox
    Is it safe to assume you've checked the domain for being listed on any blacklists? Is the outbound helo name that is being used match the domain name of the sender? And does that server name have a valid SSL cert and is sending using TLS ?
    0
  • thealien
    Yeah checked all the necessary. Emailed Gmail a bunch of times but they don't respond. At this point all I need to do is to try and use exim to re-write the outbound domain. Perhaps I can use the AWS relay config I used and just setup another domain in there, but I'm sure Exim can do it...I just don't know how without breaking things.
    0
  • Volox
    What domain are you going to re-write the outbound domain to? If all your headers look right and the delivery path is correct and spf and dkim is a pass, then maybe I'm missing where the problem is? I thought your problem was with getting the email to successfully deliver looking like it was coming from the domain of the sender; is that not the issue?
    0
  • thealien
    I want to use Exim to rewrite the outbound domain of an email sent from this server. If I add a domain forward I want to write the primary domain to the domain forward when an email is sent. So if the domain of an email hosted on the server is @domain1.com I want to rewrite an outbound email when sent from @domain1.com to @domain2.com without the user having to do anything. This means I can change their outbound on the fly and since it"s a domain forward inbound will continue to work. Once I can get domain1.com out of the spam box I can remove the exim config and all continues to work.
    0
  • Volox
    I think what you would be looking for would be in the Exim Configuration -> Advanced Editor Look for the section titled -> Section: REWRITE I might be a little rusty on the pattern, but I think you're going to want something like: *@domain1.com $1@domain2.com Ffrs If you use subdomains, you might have to also have *@*.domain1.com $1@domain2.com Ffrs If anyone does silly things like putting an email address as bob@DOMAIN1.com, then you probably want to prefix the match string with ^(?i) so that it is case insensitive. The flags at the end tell the rewrite which headers to apply to, so adjust according to what you are trying to do. You might also find that you need to use flag S depending on whether you have other processing that needs the domain rewritten beforehand. Full docs are here: 31. Address rewriting Best way to check without hosing your users while testing is to start with a specific match that you can test and then move to the generic. For example: *test@domain1.com $1@domain2.com Ffrs
    0
  • cPanelMichael
    Hello @thealien, There's a workaround noted on the following post that you may find useful (it's to address a different issue, but looks to be similar to what you're seeking):
    0

Please sign in to leave a comment.