Score:1

Postfix - Refusing to send emails to some domains

pf flag

For example

/\.host$/ REJECT We reject all .host domains!
/\.pw$/ REJECT We reject all .pw domains!

In this way, I prevent the receiving of e-mails from the domain names I want. No problem here.

I don't want emails to be sent to the domain names that I have determined that I am trying to do. Example;

.com.br
.it
.host

like this. Is there a way to do this? I repeat, what I want to do is block the outgoing.

anx avatar
fr flag
anx
If restricting by sender is no problem, why would restricting by recipient be? Just add the lookup rule you added with `check_sender_access` also with `check_recipient_access`..
anx avatar
fr flag
anx
By the way, a few Italians might chose strong words when judging the culinary crimes of the world, but refusing to exchange mail with anyone in the entire `.it` TLD is still slightly overkill. You may find that some existing, more fine-grained dynamic list (keyword: `DNSRBL`) is better suited for whatever comms barrier you are about to setup.
Score:0
za flag

In principle what you are asking for is a simple transport maps. To block a delivery you can set transport to "error", and provide an additional error message to the sender:

.example.com     error:mail for *.example.com is not deliverable

Put this (and similar) lines into the text file file, for example, /etc/postfix/my_transport_maps, one rule per line.

After creation and each time you update the file, you need to "compile" it by running postmap /etc/postfix/my_transport_maps. Then you connect it into the system by adding into /etc/postfix/main.cf:

transport_maps = hash:/etc/postfix/my_transport_maps

and reloading Postfix.

mdenizli avatar
pf flag
peki örneğin .it .hold .com.br sadece uzantı olarak yasaklama nasıl yapılabilir?
Nikita Kipriyanov avatar
za flag
Probably I'd be able to answer if you ask it in english.
mdenizli avatar
pf flag
well, for example, how can .it .hold .com.br be banned only as an extension?
Nikita Kipriyanov avatar
za flag
I can't understand this either. What means "as an extension"?
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.