Don't deliver mail to certain addresses
up vote
0
down vote
favorite
I have a Postfix 2.10.1 running on CentOS 7. This service will deliver email notifications that are sent to the postfix via SMTP.
Now, some users should not get those notifications. Since the sending application is unable to supress notifications for some email addresses/users, I want postfix to accept those emails and NOT deliver them. (The address is in the To
header as well as the RCPT TO
envelope attribute)
Is there a way so I can tell postfix to silently drop any mail for one or more email addresses?
The related question
How to discard mails sent from a specific local user to external addresses? asks for a filter based on the sender. I want to filter based on recipient.
smtp centos-7 postfix
add a comment |
up vote
0
down vote
favorite
I have a Postfix 2.10.1 running on CentOS 7. This service will deliver email notifications that are sent to the postfix via SMTP.
Now, some users should not get those notifications. Since the sending application is unable to supress notifications for some email addresses/users, I want postfix to accept those emails and NOT deliver them. (The address is in the To
header as well as the RCPT TO
envelope attribute)
Is there a way so I can tell postfix to silently drop any mail for one or more email addresses?
The related question
How to discard mails sent from a specific local user to external addresses? asks for a filter based on the sender. I want to filter based on recipient.
smtp centos-7 postfix
Why not add them to the transport table using the DISCARD service - ie add a line like "user@domain.name. discard:" to the transports file and rebuild the transports.db using postmap. (I'm not near a PC at the moment,so can't offer step-by-step but that's the general idea.)
– davidgo
Nov 28 at 18:51
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a Postfix 2.10.1 running on CentOS 7. This service will deliver email notifications that are sent to the postfix via SMTP.
Now, some users should not get those notifications. Since the sending application is unable to supress notifications for some email addresses/users, I want postfix to accept those emails and NOT deliver them. (The address is in the To
header as well as the RCPT TO
envelope attribute)
Is there a way so I can tell postfix to silently drop any mail for one or more email addresses?
The related question
How to discard mails sent from a specific local user to external addresses? asks for a filter based on the sender. I want to filter based on recipient.
smtp centos-7 postfix
I have a Postfix 2.10.1 running on CentOS 7. This service will deliver email notifications that are sent to the postfix via SMTP.
Now, some users should not get those notifications. Since the sending application is unable to supress notifications for some email addresses/users, I want postfix to accept those emails and NOT deliver them. (The address is in the To
header as well as the RCPT TO
envelope attribute)
Is there a way so I can tell postfix to silently drop any mail for one or more email addresses?
The related question
How to discard mails sent from a specific local user to external addresses? asks for a filter based on the sender. I want to filter based on recipient.
smtp centos-7 postfix
smtp centos-7 postfix
edited Nov 28 at 14:02
asked Nov 28 at 13:46
rollstuhlfahrer
1107
1107
Why not add them to the transport table using the DISCARD service - ie add a line like "user@domain.name. discard:" to the transports file and rebuild the transports.db using postmap. (I'm not near a PC at the moment,so can't offer step-by-step but that's the general idea.)
– davidgo
Nov 28 at 18:51
add a comment |
Why not add them to the transport table using the DISCARD service - ie add a line like "user@domain.name. discard:" to the transports file and rebuild the transports.db using postmap. (I'm not near a PC at the moment,so can't offer step-by-step but that's the general idea.)
– davidgo
Nov 28 at 18:51
Why not add them to the transport table using the DISCARD service - ie add a line like "user@domain.name. discard:" to the transports file and rebuild the transports.db using postmap. (I'm not near a PC at the moment,so can't offer step-by-step but that's the general idea.)
– davidgo
Nov 28 at 18:51
Why not add them to the transport table using the DISCARD service - ie add a line like "user@domain.name. discard:" to the transports file and rebuild the transports.db using postmap. (I'm not near a PC at the moment,so can't offer step-by-step but that's the general idea.)
– davidgo
Nov 28 at 18:51
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
To discard email for a user or domain, add an appropriate line to the "transport" table - typically by adding a line like below to /etc/postfix/transport
user@domain.name discard:
domain.name discard:
It should already exist, but ensure there is a transport_maps parameter in your postfix main.cf file, something like
transport_maps = hash:/etc/postfix/transport
Typically you will need to run postmap transport to convert this file into a ".db" file and do a postfix reload.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379092%2fdont-deliver-mail-to-certain-addresses%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
To discard email for a user or domain, add an appropriate line to the "transport" table - typically by adding a line like below to /etc/postfix/transport
user@domain.name discard:
domain.name discard:
It should already exist, but ensure there is a transport_maps parameter in your postfix main.cf file, something like
transport_maps = hash:/etc/postfix/transport
Typically you will need to run postmap transport to convert this file into a ".db" file and do a postfix reload.
add a comment |
up vote
1
down vote
accepted
To discard email for a user or domain, add an appropriate line to the "transport" table - typically by adding a line like below to /etc/postfix/transport
user@domain.name discard:
domain.name discard:
It should already exist, but ensure there is a transport_maps parameter in your postfix main.cf file, something like
transport_maps = hash:/etc/postfix/transport
Typically you will need to run postmap transport to convert this file into a ".db" file and do a postfix reload.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
To discard email for a user or domain, add an appropriate line to the "transport" table - typically by adding a line like below to /etc/postfix/transport
user@domain.name discard:
domain.name discard:
It should already exist, but ensure there is a transport_maps parameter in your postfix main.cf file, something like
transport_maps = hash:/etc/postfix/transport
Typically you will need to run postmap transport to convert this file into a ".db" file and do a postfix reload.
To discard email for a user or domain, add an appropriate line to the "transport" table - typically by adding a line like below to /etc/postfix/transport
user@domain.name discard:
domain.name discard:
It should already exist, but ensure there is a transport_maps parameter in your postfix main.cf file, something like
transport_maps = hash:/etc/postfix/transport
Typically you will need to run postmap transport to convert this file into a ".db" file and do a postfix reload.
answered Dec 3 at 1:45
davidgo
42k75086
42k75086
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379092%2fdont-deliver-mail-to-certain-addresses%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why not add them to the transport table using the DISCARD service - ie add a line like "user@domain.name. discard:" to the transports file and rebuild the transports.db using postmap. (I'm not near a PC at the moment,so can't offer step-by-step but that's the general idea.)
– davidgo
Nov 28 at 18:51