1 (edited by yavuz.maslak 2015-09-26 15:14:18)

Topic: how to content filter for incoming mails ?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: ubuntu14
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):ldap
- Web server (Apache or Nginx):apache
- Manage mail accounts with iRedAdmin-Pro? 2.3.1
- Related log if you're reporting an issue:
====

i want to do content filter for multiple conditions to incoming mails.
for example, if mail's header contains "abc" AND  if from address contains "xyz@qw.com"  let the mail be discard.

how can i do that as global ?

on next versions iredadmin, will you add feature of content filter ?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: how to content filter for incoming mails ?

yavuz.maslak wrote:

for example, if mail's header contains "abc" AND  if from address contains "xyz@qw.com"  let the mail be discard.

You can try Postfix setting 'header_checks':
http://www.postfix.org/postconf.5.html#header_checks
http://www.postfix.org/header_checks.5.html

3

Re: how to content filter for incoming mails ?

i examined these sites but as far as i can see, header_check does not supply us to handle two or more conditions on a header file in a time. 

ZhangHuangbin wrote:
yavuz.maslak wrote:

for example, if mail's header contains "abc" AND  if from address contains "xyz@qw.com"  let the mail be discard.

You can try Postfix setting 'header_checks':
http://www.postfix.org/postconf.5.html#header_checks
http://www.postfix.org/header_checks.5.html

4

Re: how to content filter for incoming mails ?

yavuz.maslak wrote:

header_check does not supply us to handle two or more conditions on a header file in a time. 

It's mentioned in Postfix document:
http://www.postfix.org/header_checks.5.html

Note:  message  headers are examined one logical header at a time, even
       when a message header spans multiple lines. Body lines are always exam-
       ined one line at a time.