Whitelist a domain for receiving emails

Need some help please.

I moved about several users from a VestaCP setup to HestiaCP last week. So far so good. I like some of the new features HestiaCP has, like being able to turn on SSL for the mail domain.

One user on MY server said someone sent them an email and it bounced back. Looking into this, I see that MY server rejected the incoming email because their sending IP address was on a blacklist at spamcop.net

So, MY HestiaCP server worked properly, but that’s impossible to explain to someone. All they want is for me to fix it so that next time that person sends them an email, it doesn’t get rejected.

How can I do that?

I want to Whitelist an entire domain name @somedomain.com on my HestiaCP server for incoming emails so that the IP on spamcop.net doesn’t matter for that domain either.

I’m sure it isn’t possible yet to customize this whitelist just for one user, so I’m asking how can I do it for my entire server?

Thanks!

Add the “spammer ip” to file white-blocks.conf

/etc/exim4/white-blocks.conf

There is no need to restart Exim.

1 Like

Awesome! thanks sahsanu!

1 Like

Not sure why but it doesn’t work for me. I have IP’s like so in white-blocks.conf

35.XXX.XXX.46
35.XXX.XXX.48
35.XXX.XXX.0/17
185.XX.XX.1
185.XX.XXX.246

Any thoughts on how to fix this/ debug this? F.e. /var/log/exim4/mainlog says nothing about incoming mail not being accepted for these particular ip’s.

Thanks!

I don’t know, it works for me, check whether your exim is using the right white list conf:

grep -r white /etc/exim4/exim4.conf.template

You could try to simulate a connection from those ips to view what is doing exim.

Use command exim4 -bhc to simulate the connection and in every step you will see the filters, acls, checks, etc. that exim is using to send the mail.

Note: the mail won’t be send so you can test it all the times you need.

As you will need to recreate the connection manually, I left here the commands you should use:

Note: Replace MAIL FROM and RCPT TO values with the real ones.

exim4 -bhc 35.XXX.XXX.46
EHLO whatever
MAIL FROM: [email protected]
RCPT TO: your_user@your_domain.tld
<--- Here you will see whether the mail is Accepted or Rejected
DATA
SUBJECT: Test

Here the message
.
QUIT

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.