Blocking inbound smtp connections for specific domains only

My apologies if this is a duplicate post, I searched the fora and didn’t find anything similar.

I’m looking to restrict inbound SMTP connections to a specific set of IP addresses, but only for specific domains. Here’s the background:

We’re using an external spam filtering service for some, but not all domains on our server. Normal mail for those domains follows the MX record and sends the mail to the filtering service, which filters it, and sends legitimate emails to our servers.

Unfortunately, some spammers have discovered that we will accept email for those domains directly as well, and have been flooding inboxes with spam.

I’ve been able to configure postfix on a dedicated server (without Nodeworx) to accept connections that are either authenticated (e.g. legitimate users trying to send outbound mail) or coming from a specific list of IPs (the filtering service).

What I’m looking to do is the same thing, but on a domain by domain basis. That is, those domains that are using the service should only accept authenticated connections, or connections from the filtering servers, while other domains should continue to work as they currently do.

Any ideas?


Larry Hiscock

Hi angelichost

Good question

I do not think this maybe possible with qmail, but also, if this is the main mail server for domains on the server, please remember incoming email from other sending servers need to access your server

Spamdyke may help, as I think from memory, you can make pop be used before smtp or double Authenticat

I think if I had this issue, I would run 2 mail servers and relay the domains in question

I will have to reread your post and think a little, but be interested to see other users ideas

Many thanks