Score:0

How to restrict exim accept mails for one domain from certain hostname?

tg flag

I have setup proxmox mail gateway in front of exim with many domains. But only some domains in exim are enabled for mail gateway. But sometimes, those domains recieve spam mails bypassing mail gateway. Because spammers are directly deliverying mails to exim ip.

So I need to set a rule in exim-filter (I think), to accept mails from only mailgateway hostname and reject the rest. But must be able to be done per domain basis.

Can you guide me?

anx avatar
fr flag
anx
Sounds like you want an rcpt ACL active on the public MX ip to refuse deliveries for the indirectly delivered domains, and a connect ACL on the internal IP to refuse sessions with anyone but the gateway. What is your current configuration?
Score:0
tg flag

This seems to be ok for now.

 acl_check_rcpt:
deny    domains       = gatewayedomain.com
        hosts         = !gayewat.hostname.com
        message       = Mail rejected!

But I noted this is problem with local domain not using mailgateway...

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.