Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Global recipient blacklist in postfix

Posted on 2011-03-23
1
1,023 Views
Last Modified: 2012-05-11
We are using postfix as an outbound-only mail relay, primarily to send newsletters and registration confirmations to our customers.

We would like to implement a company-wide recipient blacklist, not just at the application level, but also at the postfix level, as a final catch for legacy applications that might be sending mails that we don't know about.

Is there some way of giving postfix a global list of external recipients, to whom no emails should ever be sent?

Many thanks
Jon Little
Verivox GmbH
0
Comment
Question by:verivox
1 Comment
 
LVL 8

Accepted Solution

by:
pilson66 earned 125 total points
ID: 35197385
1. In postfix config, in section "smtpd_recipient_restrictions", add:

check_recipient_access hash:$mapsdir/recipient_blacklist,

Example:
 
smtpd_recipient_restrictions =
        reject_unknown_recipient_domain,
        permit_mynetworks,
        permit_sasl_authenticated,
        check_recipient_access hash:$mapsdir/recipient_whitelist,
        check_recipient_access hash:$mapsdir/recipient_blacklist, 
        reject_unauth_destination,
        reject_non_fqdn_recipient,
        reject_non_fqdn_sender,
        reject_unlisted_recipient,
        reject_unverified_recipient,
        permit

Open in new window


NOTE: in my example, $mapsdir = /etc/postfix/maps/


2. Create file "recipient_blacklist"

Example:
 
toall@                  REJECT
developers@             REJECT
devs@                   REJECT
testers@                REJECT

Open in new window


3. in root console, enter:
 
cd /etc/postfix/maps/
postmap recipient_blacklist

Open in new window


4. Done.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maybe no no httpd.conf 6 61
awk variable in printf 1 33
RHEL 6.7 Gnome Desktop on VMware 6 VM 9 66
Migrating a Linux server to VMware 3 52
Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question