Discussion:
recipient filtering and transport table - problem
(too old to reply)
Zalezny Niezalezny
2016-07-13 08:49:30 UTC
Permalink
Dear Colleagues,

in our test app environment we are using real e-mail addresses to test.
Each test application sending to our test relay server some e-mails. On
that machine we are filtering all incoming E-mails from our test
environment.


- we are accepting E-mails addressed to our internal domain (TO:
***@mydomain.com)
- we are dropping all external e-mails (TO: @gmail, @hotmail etc.etc.) with
transport table (* error: )


Unfortunately pool of our internal domains, include also technical
accounts. How to properly discard all E-mails addressed for example TO:
***@mydomain.com ?

In the transport table e-mail to mydomain.com will be routed to the next
hop. How to properly discard technical accounts ?


Accept TO: ***@mydomain.com
DROP: TO: ***@mydomain.com

Also how to do it correctly, if TO: field include multiple E-mails ?


Thank in advance for any hints!

With kind regards

Zalezny
Wietse Venema
2016-07-13 11:06:38 UTC
Permalink
Post by Zalezny Niezalezny
Dear Colleagues,
in our test app environment we are using real e-mail addresses to test.
Each test application sending to our test relay server some e-mails. On
that machine we are filtering all incoming E-mails from our test
environment.
transport table (* error: )
Unfortunately pool of our internal domains, include also technical
Use a transport table that returns "discard:" for those recipients.

Wietse
Zalezny Niezalezny
2016-07-13 13:28:56 UTC
Permalink
Hallo Wietse,

in my /etc/postfix/transport I have this

mydomain.com relay:relay.server.local
* discard


This configuration accept all E-mails addressed to @mydomain.com.


If I will put this to my transport file:

***@mydomain.com discard
mydomain.com relay:relay.server.local
* discard

It will not work. How to do it properly ? Accept all To: *@mydomain.com
except ***@mydomain.com


MfG

Zalezny
Post by Wietse Venema
Post by Zalezny Niezalezny
Dear Colleagues,
in our test app environment we are using real e-mail addresses to test.
Each test application sending to our test relay server some e-mails. On
that machine we are filtering all incoming E-mails from our test
environment.
with
Post by Zalezny Niezalezny
transport table (* error: )
Unfortunately pool of our internal domains, include also technical
Use a transport table that returns "discard:" for those recipients.
Wietse
Wietse Venema
2016-07-13 13:36:39 UTC
Permalink
Post by Zalezny Niezalezny
mydomain.com relay:relay.server.local
* discard
It will not work.
That is insufficient information. Include "postconf -n" output,
"postmap -s" output for the transport map, logging of what happens,
and a description of what should happen instead.

Wietse
Zalezny Niezalezny
2016-07-13 14:15:16 UTC
Permalink
I think I know where is my problem.
In the /etc/postfix/transport I have this configuration

mydomain.com relay:relay.server.local
* discard




To discard some specified E-mail address I used this settings:

smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/bad_recipients, permit_mynetworks,
reject_unauth_destination, permit


/etc/postfix/bad_recipients

***@mydomain.com REJECT




Now its working fine. In transport table I can put only IP or Domain, but
its not working with an E-mail addresses.


I hope this is the right configuration and it will work properly.To filter
my e-mails I will use


check_recipient_access hash:/etc/postfix/bad_recipients



Its also working perfectly with multiple recipients in the To: field.




If my understanding is wrong please reply.



With kind regards

Zalezny
Post by Wietse Venema
Post by Zalezny Niezalezny
mydomain.com relay:relay.server.local
* discard
It will not work.
That is insufficient information. Include "postconf -n" output,
"postmap -s" output for the transport map, logging of what happens,
and a description of what should happen instead.
Wietse
Continue reading on narkive:
Loading...