Email

zomebodi

Verified User
Joined
Sep 3, 2023
Messages
52
Hi. I need a little help.
I have a server with EXIM that receives emails from abroad and routes them to two servers with DirectAdmin.

When receiving some emails I get this error:

2025-04-04 07:31:01 1u0fGG-00000007nfJ-0Ufq ** [email protected] R=email2 T=remote_smtp H=directadmin.server1.com [4.5.6.7] X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=yes: SMTP error from remote mail server after RCPT TO:<[email protected]>: 550 - SPF: 1.2.3.4 You are not allowed to send mail from masterbase.afc.cl:\n550 See http://www.open-spf.org/Why : Reason: mechanisms

It's obvious, since the relay IP (1.2.3.4) is not in the SPF of those senders (masterbase.afc.cl is not my client).

So, I add the relay IP (1.2.3.4) to the servers with directadmin in whitelist_hosts_ip and there are no more rejections.

The problem is that I'm left without spam filters (easyspamfighter stops working on the directadmin servers for this IP) and from what I can see, rSpamd stops working too (I don't see any spam rules applied to the message).

Can anyone guide me on a solution? (I need at least rspamd to keep working)
 
Last edited:
Why not adding ip4 address in SPF record instead of whitelist_host_ip file ?

[email protected] is my client (with the spf), masterbase.afc.cl (this is not my client). Directadmin servers examine spf of masterbase.afc.cl and reject the delivery. This is a behavior that some emails have, not all (Emails authenticated with DKIM do not seem to suffer from this problem)
 
Last edited:
Can anyone guide me on a solution? (I need at least rspamd to keep working)
Maybe you can auto forward instead of routing? Because when forwarding if all is well the SPF shouldn't matter.
Or forward as attachment, but I don't know if that can be done in Exim itself or needs to be done at client level somehow.
 
Maybe you can auto forward instead of routing? Because when forwarding if all is well the SPF shouldn't matter.
Or forward as attachment, but I don't know if that can be done in Exim itself or needs to be done at client level somehow.

do you mean use driver = redirect ?
But with whis i need the email list or not?
 
do you mean use driver = redirect ?
Possible you need the e-mails. I'm not sure, never used this.
You can have a look here which I found maybe it can help you, or wait until somebody else can help you with this.
 
For easy fixed, just add IP of the relay server to all domains in both directadmin server.

Or find some method to bypass only SPF check from the relay IP.
 
that's file you meantion only do something when want to sending email from local.

Let's me explain more...
Add relay IP to the "DNS" of all domains.
 
ahhh sorry, I'm still not understand your problem,

So the problem, your front server is forwarding incoming email with server IP instead of keeping the information from the sender and send it to your backend server ( 2servers ) ?

So try config as forwarder. you can read the example Exim config route from directadmin server.
I guest, currently it's still in remote_smtp or something relate.
 
Back
Top