How to block relay on Exim?

Hello,

I recently run a security test on my server and I got this error:

The remote SMTP server is insufficiently protected against relaying
This means that spammers might be able to use your mail server
to send their mails to the world.

Nessus was able to relay mails by sending those sequences:

MAIL FROM: <nessus@domain.com>
RCPT TO: <nobody%example.com@domain.com>

Risk factor : Medium

Solution : upgrade your software or improve the configuration so that
your SMTP server cannot be used as a relay any more.
Ok. So I opened exim.conf and couldn't find where to edit to block the relay. I have these lines commented:

# The use of your host as a mail relay by any host, including the local host
# calling its own SMTP port, is locked out by default. If you want to permit
# relaying from the local host, you should set
#
# host_accept_relay = localhost
#
# If you want to permit relaying through your host from certain hosts or IP
# networks, you need to set the option appropriately, for example
Where should I edit them to block it?

I also have these lines not commented, I don't know if there's anything related:

domainlist local_domains = lsearch;/etc/localdomains

domainlist relay_domains = lsearch;/etc/localdomains : \
lsearch;/etc/secondarymx
hostlist relay_hosts = lsearch;/etc/relayhosts : \
localhost
hostlist auth_relay_hosts = *
Thank you very much!

 

 

 

 

Top