Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.93 KB | None | 0 0
  1. exim_path = /usr/sbin/exim4
  2.  
  3. domainlist local_domains = sebbe.eu:[185.86.106.232]:[193.187.91.106]:[2001:470:dff1:1:10::1]:[2001:470:dff1:1:10::2]:dns1.sebbe.eu:dns2.sebbe.eu:mx.sebbe.eu
  4. hostlist relay_from_hosts = 192.168.0.0/16 : 127.0.0.1 : ::::1
  5. auth_advertise_hosts = 192.168.0.0/16 : 127.0.0.1 : ::::1
  6.  
  7. system_filter = /etc/exim4/sentfolder.filter
  8. system_filter_file_transport = sentfolder
  9. chunking_advertise_hosts = :
  10. check_rfc2047_length = false
  11. headers_charset = UTF-8
  12.  
  13. qualify_domain = sebbe.eu
  14. primary_hostname = sebbe.eu
  15. accept_8bitmime = true
  16. exim_user = asterisk
  17. exim_group = asterisk
  18. acl_smtp_mail = acl_check_mail
  19. acl_smtp_rcpt = acl_check_rcpt
  20. acl_smtp_data = acl_check_data
  21. acl_smtp_dkim = acl_check_dkim
  22. acl_smtp_mime = acl_check_mime
  23. # av_scanner = clamd:/var/run/clamav/clamd.ctl
  24. # spamd_address = 127.0.0.1 783
  25. allow_domain_literals
  26. host_lookup = *
  27. keep_environment = MAIN_KEEP_ENVIRONMENT
  28.  
  29. rfc1413_query_timeout = 0s
  30. #prdr_enable = false
  31.  
  32. local_from_check = false
  33. local_sender_retain = true
  34. untrusted_set_sender = *
  35.  
  36. ignore_bounce_errors_after = 2d
  37. spool_directory = /var/spool/exim4
  38.  
  39. smtp_active_hostname = ${lookup{$received_ip_address\_$received_port}lsearch{/etc/exim4/servers}{$value}}
  40.  
  41. smtp_accept_max_nonmail_hosts = :
  42. smtp_banner = $smtp_active_hostname ESMTP Exim4
  43. add_environment = <; PATH=/bin:/usr/bin
  44. tls_require_ciphers = SECURE128:-VERS-SSL3.0
  45. tls_advertise_hosts = *
  46. tls_certificate = /etc/exim4/exim.crt
  47. tls_privatekey = /etc/exim4/exim.key
  48. tls_ocsp_file = /etc/exim4/exim.ocsp
  49. tls_on_connect_ports = 465 : 466
  50.  
  51. log_selector = +smtp_protocol_error +smtp_syntax_error +tls_certificate_verified +tls_peerdn
  52.  
  53. begin acl
  54.  
  55. acl_check_dkim:
  56. accept
  57. dkim_status = fail
  58. add_header = X-DKIM-Signature: fail (address=$sender_address domain=$dkim_cur_signer), signature is bad.
  59. accept
  60. dkim_status = invalid
  61. add_header = X-DKIM-Signature: invalid ($dkim_verify_status); $dkim_verify_reason
  62. accept
  63. dkim_status = pass
  64. add_header = X-DKIM-Signature: pass (address=$sender_address domain=$dkim_cur_signer), signature is good.
  65. accept
  66. add_header = X-DKIM-Signature: none
  67.  
  68. acl_check_mail:
  69. accept
  70. hosts = 127.0.0.1
  71. condition = ${if eq{$received_port}{10026}}
  72. deny
  73. message = no HELO given before MAIL command
  74. condition = ${if def:sender_helo_name {no}{yes}}
  75. accept
  76. authenticated = *
  77. senders = ^(sebastian|postmaster|abuse)@sebbe\\.eu\$
  78. hosts = +relay_from_hosts
  79. set acl_m0 = authorizedrelay
  80. deny
  81. message = You can't spoof the domains this server is authorative for
  82. sender_domains = ^(?i).*sebbe\\.eu\$ : +local_domains
  83. deny
  84. message = Local users must authenticate
  85. hosts = +relay_from_hosts
  86. deny
  87. message = That would create a mail loop
  88. sender_domains = localhost : ^\\[127.*
  89. deny
  90. message = Banned operator tiscali.it (spam)
  91. sender_domains = tiscali.it
  92. warn
  93. dnslists = list.dnswl.org
  94. set acl_m1 = dnswl_whitelisted
  95. deny
  96. message = Banned TLD ( Please register your mailserver here to unban: https://www.dnswl.org/selfservice/?action=register )
  97. condition = ${if eq {$acl_m1}{dnswl_whitelisted}{no}{yes}}
  98. sender_domains = ^(?i).*\\.(app|accountant|accountants|auto|berlin|bid|camera|car|cars|christmas|click|club|college|computer|country|cricket|date|design|download|email|faith|fun|gdn|global|guru|help|host|jetzt|kim|life|link|loan|media|men|mom|news|ninja|online|party|photography|pro|protection|pub|racing|realtor|reise|ren|rent|review|rocks|science|security|shop|site|solutions|space|storage|store|stream|study|tech|technology|theatre|today|top|trade|university|uno|vip|vividal|wang|webcam|website|win|work|works|world|xin|xyz|zip)\$
  99. warn
  100. remove_header = x-spf-signature
  101. remove_header = x-dns-whitelist
  102. remove_header = x-dkim-signature
  103. warn
  104. condition = ${if eq {$acl_m1}{dnswl_whitelisted}{yes}{no}}
  105. add_header = X-DNS-Whitelist: pass
  106. warn
  107. condition = ${if eq {$acl_m1}{dnswl_whitelisted}{no}{yes}}
  108. add_header = X-DNS-Whitelist: fail
  109. deny
  110. message = Banned Spammer
  111. sender_domains = ^(?i).*newicomarket\\.com\$
  112. deny
  113. message = This email has been banned by system administrator
  114. senders = kunngen__@hotmail.com
  115. deny
  116. message = Sender verification failed
  117. !verify = sender
  118. deny
  119. message = Sender adress is spoofed according to SPF. $spf_smtp_comment
  120. log_message = SPF check failed: $spf_header_comment
  121. spf = fail : softfail
  122. defer
  123. message = Temporary SPF error. Try again later. $spf_smtp_comment
  124. spf = temperror
  125. warn
  126. add_header = X-SPF-Signature: $spf_result $spf_header_comment
  127. spf = pass : none : neutral : permerror
  128. warn
  129. log_message = Permanent SPF failure: $spf_header_comment
  130. spf = permerror
  131. accept
  132.  
  133. acl_check_rcpt:
  134. accept
  135. hosts = 127.0.0.1
  136. condition = ${if eq{$received_port}{10026}}
  137. control = dkim_disable_verify
  138. deny
  139. local_parts = ^[./|] : ^.*[\\\\@%`#&?] : ^.*/\\.\\./
  140. message = restricted characters in address
  141. deny
  142. message = That would create a mail loop
  143. domains = localhost : ^\\[127.*
  144. accept
  145. condition = ${if eq {$acl_m0}{authorizedrelay}{yes}{no}}
  146. control = submission/sender_retain
  147. control = dkim_disable_verify
  148. require
  149. message = relay not permitted
  150. domains = +local_domains
  151. deny
  152. message = Email to SMS facility is restricted to local users
  153. local_parts = ^\\d\\d+\$
  154. require
  155. verify = recipient
  156. accept
  157.  
  158. acl_check_data:
  159. accept
  160. hosts = 127.0.0.1
  161. condition = ${if eq{$received_port}{10026}}
  162. remove_header = date
  163. remove_header = subject
  164. add_header = Date: $tod_full
  165. add_header = Subject: ${rfc2047:${length_100:${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{$h_subject:}{\\xE5}{\\xA5}}}{\\xC4}{\\x84}}}{\\xD6}{\\x96}}}{\\xC5}{\\x85}}}{\\xF6}{\\xB6}}}{\\xE4}{\\xA4}}}{\N[^a-zA-Z0-9\xA5\xA4\xB6\x85\x84\x96 !"\@#\$%&\/\{(\[)\]=\}?+\\\-_:.;,*><|^~]\N}{}}}{\N([\xA5\xA4\xB6\x85\x84\x96])\N}{\\xC3\$1}}}{ }{ }}}{ }{ }}}{ }{ }}}{^ }{}}}{ \$}{}}}}
  166. deny
  167. message = Message headers fail syntax check
  168. !verify = header_syntax
  169. deny
  170. message = No verifiable sender address in message headers
  171. !verify = header_sender
  172. deny
  173. message = Missing MIME From header
  174. condition = ${if def:h_from:{no}{yes}}
  175. deny
  176. message = You can't spoof the MIME From this server is authorative for
  177. condition = ${if match {$h_from:}{^(?i).*<.*@.*sebbe\\.eu>\$}{yes}{no}}
  178. condition = ${if eq {$acl_m0}{authorizedrelay}{no}{yes}}
  179. deny
  180. message = Authorized relayed messages MUST have a local MIME From
  181. condition = ${if match {$h_from:}{^"?(Sebastian Nielsen|Microsoft Outlook)"? <(sebastian|abuse|postmaster)@sebbe\\.eu>\$}{no}{yes}}
  182. condition = ${if eq {$acl_m0}{authorizedrelay}{yes}{no}}
  183. deny
  184. message = Banned TLD in MIME From ( Please register your domain here to unban: https://www.dnswl.org/selfservice/?action=register )
  185. condition = ${if match {$h_from:}{^(?i).*\\.(app|accountant|accountants|auto|berlin|bid|camera|car|cars|christmas|click|club|college|computer|country|cricket|date|design|download|email|faith|fun|gdn|global|guru|help|host|jetzt|kim|life|link|loan|media|men|mom|news|ninja|online|party|photography|pro|protection|pub|racing|realtor|reise|ren|rent|review|rocks|science|security|shop|site|solutions|space|storage|store|stream|study|tech|technology|theatre|today|top|trade|university|uno|vip|vividal|wang|webcam|website|win|work|works|world|xin|xyz|zip)>\$}{yes}{no}}
  186. condition = ${if eq {$acl_m1}{dnswl_whitelisted}{no}{yes}}
  187. deny
  188. message = Banned spam subject: (pills/pharmacy/ICO/cryptocoin/fuckbuddy/athlete spam)
  189. condition = ${if match {$h_subject:}{^(?i).*(medicine|pharmacy|citrate|way.better.coin|pandora.outlet|pfizer|fuckbuddy|instafuck|instacheat|f.cking|hookup|viagra|levitra|cialis|kamagra|med:|penisole|drug|impotence|windows 11|pills|vpxl|\\[phishing\\])}{yes}{no}}
  190. accept
  191. acl_check_mime:
  192. deny
  193. message = Banned content (.ru/.su spam found)
  194. mime_regex = (?i)https?:://[a-z0-9]+\\.su : (?i)https?:://rambler\\.ru
  195. accept
  196.  
  197. begin routers
  198.  
  199. pmx_smarthost:
  200. debug_print = "R: pmx_smarthost for $local_part@$domain"
  201. cannot_route_message = Unknown user
  202. condition = ${if !eq{$received_port}{10026}}
  203. driver = manualroute
  204. route_list = * 127.0.0.1
  205. transport = remote_pmx_smtp
  206. self = send
  207. no_verify
  208. no_more
  209. dnslookup:
  210. debug_print = "R: dnslookup for $local_part@$domain"
  211. driver = dnslookup
  212. domains = ! +local_domains
  213. transport = remote_smtp
  214. same_domain_copy_routing = yes
  215. # ignore private rfc1918 and APIPA addresses
  216. ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
  217. 172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
  218. 255.255.255.255
  219. no_more
  220.  
  221. sms_transmit:
  222. driver = accept
  223. domains = +local_domains
  224. local_parts = ^\\d\\d+\$
  225. transport = sms_transport
  226. no_more
  227.  
  228. system_aliases:
  229. debug_print = "R: system_aliases for $local_part@$domain"
  230. driver = redirect
  231. domains = +local_domains
  232. allow_fail
  233. allow_defer
  234. data = ${lookup{$local_part}lsearch{/etc/aliases}}
  235.  
  236. local_user:
  237. debug_print = "R: local_user for $local_part@$domain"
  238. driver = accept
  239. domains = +local_domains
  240. check_local_user
  241. transport = mail_spool
  242. cannot_route_message = Unknown user
  243.  
  244. begin transports
  245. remote_pmx_smtp:
  246. debug_print = "T: remote_pmx_smtp for $local_part@$domain"
  247. driver = smtp
  248. port = 10025
  249. allow_localhost
  250.  
  251. sms_transport:
  252. debug_print = "T: Sending SMS to $local_part"
  253. driver = pipe
  254. command = /usr/sbin/smsbot $local_part
  255. return_output = true
  256. user = asterisk
  257.  
  258. mail_spool:
  259. debug_print = "T: appendfile for $local_part@$domain"
  260. driver = appendfile
  261. file = /var/mail/asterisk
  262. delivery_date_add
  263. envelope_to_add
  264. return_path_add
  265. user = asterisk
  266. group = mail
  267. mode = 0660
  268. mode_fail_narrower = false
  269. current_directory = /
  270. remote_smtp:
  271. debug_print = "T: remote_smtp for $local_part@$domain"
  272. driver = smtp
  273. helo_data = ${lookup{$sending_ip_address}lsearch{/etc/exim4/helo}{$value}}
  274. dkim_sign_headers = from:date:to:cc
  275. dkim_domain = sebbe.eu
  276. dkim_selector = root
  277. dkim_private_key = /etc/exim4/dkim.key
  278. dkim_canon = relaxed
  279.  
  280. sentfolder:
  281. debug_print = "T: Sentfolder for $local_part@$domain"
  282. driver = appendfile
  283. delivery_date_add
  284. envelope_to_add
  285. return_path_add
  286. user = asterisk
  287. group = mail
  288. mode = 0660
  289. mode_fail_narrower = false
  290. current_directory = /
  291.  
  292. begin retry
  293.  
  294. * * F,2h,30m; G,18h,1h,1.5; F,6d,18h
  295.  
  296. begin rewrite
  297.  
  298. begin authenticators
  299. plain_server:
  300. driver = plaintext
  301. public_name = PLAIN
  302. server_condition = ${if and {{eq{$auth2}{sebastian@sebbe.eu}}{eq{$auth3}{<<<<MITT EPOSTLÖSENORD BORTRADERAT HÄR>>>>}}}}
  303. server_set_id = server
  304. server_prompts = :
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement