Sat, July 24, 2021
 
https://devcodepro.comdevcodepro
X
Home · Latest · Trends
4

Exim - How to block certain domain

1. In etc/exim/exim.conf after this line:
# $Cambridge: exim/exim-src/src/configure.default,v 1.14 2009/10/16 07:46:13 tom Exp $
put this line:
system_filter = /etc/exim/filters
2. Create file filters in /etc/exim/ folder with code:
if $header_from: contains "example.com" or $header_from: contains "example2.com" then fail endif
3. Restart Exim:
service exim restart
4. Log:
2018-02-28 10:48:37 1gr3f4-0081uq-O7 <= [email protected] H=g.example.com [xxx.xxx.xx.xx] 2018-02-28 10:48:37 1gr3f4-0081uq-O7 cancelled by system filter
rated 4 times (4) (0)
comments: 0 / hits: 1755  / 3 years ago, wed, feb 28, 18, 11:02:34
More From » Plain Text
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
 
Share
Posted
paki
Member since Sep 7, 2016
Total Code Snippets: 12
Total Comments: 0
Location: n/a
paki snippets
5 years ago, thu, sep 8, 16, 3:04:22
comments: 0 / hits: 5133
5 years ago, wed, dec 28, 16, 4:11:52
comments: 2 / hits: 3677
5 years ago, tue, jan 3, 17, 3:37:12
comments: 0 / hits: 2264
5 years ago, thu, jan 19, 17, 5:40:32
comments: 0 / hits: 4884
4 years ago, sat, jun 10, 17, 3:16:28
comments: 0 / hits: 2279
4 years ago, mon, jun 26, 17, 9:21:15
comments: 0 / hits: 3285
4 years ago, sat, sep 2, 17, 4:26:09
comments: 1 / hits: 2429
3 years ago, tue, feb 27, 18, 9:25:15
comments: 0 / hits: 1677
3 years ago, tue, feb 27, 18, 9:41:12
comments: 0 / hits: 1738