Exim - Restrict outgoing email to be from only one address

1.7k Views Asked by At

A bot has found a way to send bulk spam through my server. My server is not an open relay. All mails are coming from localhost. The emails are being sent from a series of [email protected]. At mydomain, there is only 1 email account that was created that we send from.

Is there a way to restrict outgoing email that are being sent through exim to only allow emails to be sent from the 1 email account we created and block all other Sent From addressed that are being created?

2

There are 2 best solutions below

2
On

You have to add the next condition to your SMTP router(s):

condition = ${if match{$sender_address}{[email protected]}{yes}{no}}
0
On

I was able to resolve this by turning on X-Headers which allowed me to locate where the emails were being executed from which in turn allowed me to eliminate an exploit from an old script.