Best way to disable email for domain aliases

interfasys

Verified User
Joined
Oct 31, 2003
Messages
2,100
Location
Switzerland
I'd like to minimize the amount of spams that my spam fighting engine processes and thus have exim only process emails whose recipients are part of a whitelist of sort.
That list would contain the domain names with a valid MX.
Or I could use a blacklist instead, and I would manually insert domain names which are not allowed to receive emails.

Is this possible?

I've tried to disable the MX for those domain aliases, but it just doesn't work, because spammers seem not to care about the MX and use the domain name's IP (based on what I witnessed...)

Cheers,
 
You can make any changes to the exim.conf file you wish to make.

Jeff
 
Thanks Jeff.
That means that there is no "standard" way of doing something like this. A domain alias will always receive emails in DA no matter what unless you hack exim.conf, correct?
 
Okay, let's revisit this...

When you create an alias DirectAdmin does the following to make email work:

It creates a symbolic link:

/etc/virtual/alias.example.com -> /etc/virtual/target.example.com

If you delete the alias you'll delete all email functions for the domain.

But if you want even one email address to be allowed, then you can't do that; you have to write some kind of blocking, either by a custom change to exim.conf or to exim.pl.

Jeff
 
Thanks Jeff, I want to do it for the whole of the alias, no exceptions.

With your method, an email would still be virus-scanned and spam checked and a delivery would be attempted, correct? The delivery will fail because of the missing alias.

What I did right now is implement a new check early in exim.conf. It uses a blacklist and I'm storing the aliases in there.
 
One of the first checks exim does is to see if the email is deliverable. Why do anything else if you can return it not at this address.

So no, the email wouldn't be scanned or checked in any way if you remove the link. Your way may be better, though, as it's self-documenting.

Jeff
 
Back
Top