# Postfix - automatically drop outbound mail

DevFeed: [Postfix - automatically drop outbound mail](<https://devfeed.tech/articles/postfix-automatically-drop-outbound-mail-27616.md>)

Original publisher: [Read original article](<https://gagor.pro/2014/03/postfix-automatically-drop-outbound-mail/>)

Author: Tom

Published: 2014-03-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [debug](<https://devfeed.tech/tags/debug.md>), [development](<https://devfeed.tech/tags/development.md>), [linux](<https://devfeed.tech/tags/linux.md>), [logs](<https://devfeed.tech/tags/logs.md>), [mail](<https://devfeed.tech/tags/mail.md>), [postfix](<https://devfeed.tech/tags/postfix.md>), [server](<https://devfeed.tech/tags/server.md>), [test](<https://devfeed.tech/tags/test.md>)

## AI overview

A configuration tutorial for Postfix on a development server. It shows how to permit outbound mail to one domain while discarding mail sent to all other destinations, then reload and test the configuration.

## Source excerpt

I have development server with postfix - I wanted to allow outbound traffic to one domain but cut off all the rest. I definitely do not want that test mail or any debug info goes to service users. I have to add something like that to /etc/postfix/transport: allowed.domain.com : * discard: Then run: postmap /etc/postfix/transport At end, add these to /etc/postfix/main.cf: transport_maps = hash:/etc/postfix/transport Reload postfix: postfix reload Test if it works: