Postfix to drop emails of a sender or receiver completely

SYSTEM INFORMATION
OS type and version Ubuntu 20.04
Webmin version 2.101
Virtualmin version 7.7

There is one email continually coming to my server even when email for that domain is disabled. And the spam is going in the queue. While I have set up a crontab job to delete that email, I want to know if there is a better way to tell postfix to completely drop email from a certain sender or receiver ?

How did you disable the email coming from that domain?

  1. Open your Postfix configuration file. This is typically located at /etc/postfix/main.cf.
  2. Add or modify the appropriate restriction setting depending on whether you want to drop emails based on the sender or receiver.To drop emails from a specific sender:

smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

Are you running Spam Assassin?

youdomain.tld:10000/spam/edit_white.cgi?xnavigation=1

… and don’t forget to use the postmap command.

from Edit Server, there is an option for accept email for this domain

The Mail for domain enabled option in the Edit Virtual Server section allows you to use email addresses on that domain. If you say that with the option disabled you still receive messages, then it means that there is an issue in Virtualmin.

@Ilia, @Joe - If he had disabled the email feature for this server, it would have been natural to stop receiving messages, am I right?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.