How to block with header_checks

This is a discussion on How to block with header_checks within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; Hello all, I often receive spams where the header looks like that: To: Jim Tiegal <my.name@myisp.com&...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-14-2005
Jean
 
Posts: n/a
Default How to block with header_checks

Hello all,

I often receive spams where the header looks like that:

To: Jim Tiegal <my.name@myisp.com>

"Ronal Tiegal" is not me but the name following it "<my.name@myisp.com>"
corresponds to my real address. Is there a way with header_check or with
the Postfix access file to filter these messages?

Thanks
Jean
Reply With Quote
  #2 (permalink)  
Old 12-14-2005
Greg Hackney
 
Posts: n/a
Default Re: How to block with header_checks


One thing that might help is a spoof_sender_map, which says that
if the sender address is my.name@myisp.com, then the mail MUST arrive
via a myisp.com site

check_sender_access hash:/etc/postfix/spoof_sender_map

--<spoof_sender_map>--
my.name@myisp.com match_client_domain

--<spoof_client_map>---
myisp.com OK

--<strict_client.regexp>---
/@([^@]+)$/ 554 This mail didn't really come from a $1 system

--<main.cf>--
smtpd_restriction_classes = match_client_domain
match_client_domain = reject_unknown_client,
check_client_access hash:/etc/postfix/spoof_client_map,
check_sender_access regexp:/etc/postfix/strict_client.regexp,
reject

--
Greg


Jean wrote:
> Hello all,
>
> I often receive spams where the header looks like that:
>
> To: Jim Tiegal <my.name@myisp.com>
>
> "Ronal Tiegal" is not me but the name following it "<my.name@myisp.com>"
> corresponds to my real address. Is there a way with header_check or with
> the Postfix access file to filter these messages?
>
> Thanks
> Jean

Reply With Quote
  #3 (permalink)  
Old 12-14-2005
Andreas Grimm
 
Posts: n/a
Default Re: How to block with header_checks

Jean wrote:

> Hello all,
>
> I often receive spams where the header looks like that:
>
> To: Jim Tiegal <my.name@myisp.com>
>
> "Ronal Tiegal" is not me but the name following it "<my.name@myisp.com>"
> corresponds to my real address. Is there a way with header_check or with
> the Postfix access file to filter these messages?
>
> Thanks
> Jean


Hi Jean,

yes, use the following regular expression in /etc/postfix/header_checks

/^To:.*Jim Tiegal/ REJECT Wrong address, go away

in main.conf add the following line

header_checks=regex:/etc/postfix/header_checks

Not testet, but should work!

Then reload postfix, and it will be rejected.

--
Andreas Grimm
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:32 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0