how to exclude an user from EFA scan

Questions and answers about how to do stuff
Post Reply
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

how to exclude an user from EFA scan

Post by sbergami »

hello,
in my company there is an user who does not want his emails filtered by EFA, he would like all of them to arrive directly in his inbox. I tried to disable the filter from the USER MANAGEMENT menu, but in the menu there is only the user@localdomain.local and not user@webdomain.com and it does not work anyway. All users are imported from the PDC via LDAP.
Is there a way to do that?
Thank you
Kind regards
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: how to exclude an user from EFA scan

Post by shawniverson »

Simpliest way is to do a header check in postfix and bypass everything for this user.

/etc/postfix/header_checks

Code: Select all

/^To: user@example.com/ PASS
/^Received:/ HOLD
Make sure to reload postfix

Code: Select all

sudo service postfix reload
Of course, this will let everything through for this user, so you have been warned. I don't recommend doing this.
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

many thanks for support.
I tried to explain the danger of exclusion, but the user is one of the owners of the company I work for, so...
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

Hello
I tried to write this:
# Yorktown Heights, NY 10598, USA
#
# HEADER_CHECKS(5)
/^To: myuser@mydomain.mycountry/ IGNORE
/^Received:/ HOLD

and I also tried
/^To: myuser@myLocaldomain/ IGNORE

when postmap I recive a warning

/etc/postfix/header_checks, line 517: record is in "key: value" format; is this an alias file?

restart service is OK

but for user messages are still blocked as spam. where am I wrong?
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: how to exclude an user from EFA scan

Post by pdwalker »

What's on line 516-518?
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

I'm sorry, you right. Is the line I've added

517 /^To: myuser@mydomain.mycountry/ IGNORE
518 /^Received:/ HOLD
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: how to exclude an user from EFA scan

Post by pdwalker »

Nothing on 515 or 516?
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: how to exclude an user from EFA scan

Post by shawniverson »

Try escaping the space after To: i.e. "To:\ someone@example.com"
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

pdwalker, the previous lines are those of the standard file, the only thing I added is the line with the email to be excluded
shawniverson, with escape warning disappears, but messages are still blocked as spam :roll:
Thank you
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: how to exclude an user from EFA scan

Post by shawniverson »

Whoops my bad, don't postmap that thing.

Remove the header_checks.db if present in /etc/postfix and reload postfix. (I edited the above post).
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: how to exclude an user from EFA scan

Post by shawniverson »

Also, use "PASS" instead of "IGNORE"

Not at the top of my game today ... :?
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

I'm sorry shawniverson,
removed header_checks.db and replaced "IGNORE" with "PASS" at end of line in header_checks
but messages still blocked
Thank you
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: how to exclude an user from EFA scan

Post by shawniverson »

Is that escape "\" present? Try it with and without.
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

I've tried with and without escape "\" but nothing change
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: how to exclude an user from EFA scan

Post by shawniverson »

Did a little research on this issue....

1) We need postfix version 3.2.x for PASS functionality.

2) \@ <----must be escaped

I am wondering if IGNORE would still work, though.
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

shawniverson, thank you for your support,

I noticed that the rule with IGNORE works, but the only effect it has is to remove the line To: from the header, so messages are still filtered but in the header line To: is missing. I did a research and I found this on https://posluns.com/guides/header-checks/

IGNORE will cause that particular header to be removed from the email, and will continue to process the email as normal. This can be useful in some situations. Please seethe Header Removal Guide for more information.

Is this correct to happen?
largo
Posts: 22
Joined: 15 Nov 2016 08:49

Re: how to exclude an user from EFA scan

Post by largo »

Hi
Have you tested whitelisting this user
Just put in
from: default
to: user@domain.com
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: how to exclude an user from EFA scan

Post by sbergami »

HI largo, thank you
yes, but don't work. :|
sbergami
Posts: 29
Joined: 21 Dec 2016 17:08

Re: [Solved] how to exclude an user from EFA scan

Post by sbergami »

HI,
largo was right, and I was in a hurry to check workaround, whitelist from: default and to: usermail works!
Many thanks to everyone
largo
Posts: 22
Joined: 15 Nov 2016 08:49

Re: how to exclude an user from EFA scan

Post by largo »

Glad that you solved it.
/Largo
Post Reply