Discussion:
Why is this header_check not working?
(too old to reply)
Evan Platt
2006-11-08 00:29:05 UTC
Permalink
I see quite a few SEXUALLY EXPLICIT spams..

From: "Esmeralda Stokes" <***@tin.it>
To: <***@espphotography.com>
Subject: SEXUALLY EXPLICIT : Suzanne spreads puss


I have in my /etc/postfix/header_checks:

/SEXUALLY EXPLICIT/ Reject

header_checks = regexp:/etc/postfix/header_checks

But...

Just sent myself a test message with the same subject:

Nov 7 16:21:12 espphotography postfix/cleanup[1438]: 71F3D9B18B1:
reject: header Subject: SEXUALLY EXPLICIT: Hi from
web53413.mail.yahoo.com[206.190.39.73]; from=<***@yahoo.com>
to=<***@espphotography.com> proto=SMTP
helo=<web53413.mail.yahoo.com>: 5.7.1 message content rejected

So .. Am I missing something? It was caught by SpamAssassin (called
via procmail), but it should have been caught and discarded long before that.

Any ideas what I'm missing?

Also, I use spamcop filtering, and occasionally servers like yahoo
are added to Spamcop BL'ing, so I created /etc/postfix/rbl_access

66.94.237.26 OK
dcn.yahoo.com OK
scd.yahoo.com OK
mud.yahoo.com OK
yahoo.com OK
mail.apache.org OK
apache.org OK
140.211.11.2 OK

And add
check_client_access hash:/etc/postfix/rbl_access,

I then get
Nov 7 12:32:36 espphotography postfix/smtpd[615]: fatal: open
database /etc/postfix/rbl_access.db: Inappropriate file type or format

I did postmap hash:/etc/postfix/rbl_access, still no go.
postconf -n shows
command_directory = /sw/sbin
config_directory = /sw/etc/postfix
daemon_directory = /sw/lib/postfix
debug_peer_level = 2
html_directory = /sw/share/doc/postfix/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /sw/bin/mailq
manpage_directory = /sw/share/man
mynetworks_style = host
newaliases_path = /sw/bin/newaliases
queue_directory = /sw/var/spool/postfix
readme_directory = /sw/share/doc/postfix/README_FILES
sample_directory = /sw/etc/postfix
sendmail_path = /sw/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

I changed hash to regexp. Any reason that won't work?

Thanks.

Evan
Evan Platt
2006-11-08 00:45:58 UTC
Permalink
Post by Evan Platt
I see quite a few SEXUALLY EXPLICIT spams..
Subject: SEXUALLY EXPLICIT : Suzanne spreads puss
/SEXUALLY EXPLICIT/ Reject
header_checks = regexp:/etc/postfix/header_checks
But...
reject: header Subject: SEXUALLY EXPLICIT: Hi from
helo=<web53413.mail.yahoo.com>: 5.7.1 message content rejected
So .. Am I missing something? It was caught by SpamAssassin (called
via procmail), but it should have been caught and discarded long before that.
Any ideas what I'm missing?
Also, I use spamcop filtering, and occasionally servers like yahoo
are added to Spamcop BL'ing, so I created /etc/postfix/rbl_access
66.94.237.26 OK
dcn.yahoo.com OK
scd.yahoo.com OK
mud.yahoo.com OK
yahoo.com OK
mail.apache.org OK
apache.org OK
140.211.11.2 OK
And add
check_client_access hash:/etc/postfix/rbl_access,
I then get
Nov 7 12:32:36 espphotography postfix/smtpd[615]: fatal: open
database /etc/postfix/rbl_access.db: Inappropriate file type or format
I did postmap hash:/etc/postfix/rbl_access, still no go.
postconf -n shows
command_directory = /sw/sbin
config_directory = /sw/etc/postfix
daemon_directory = /sw/lib/postfix
debug_peer_level = 2
html_directory = /sw/share/doc/postfix/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /sw/bin/mailq
manpage_directory = /sw/share/man
mynetworks_style = host
newaliases_path = /sw/bin/newaliases
queue_directory = /sw/var/spool/postfix
readme_directory = /sw/share/doc/postfix/README_FILES
sample_directory = /sw/etc/postfix
sendmail_path = /sw/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
I changed hash to regexp. Any reason that won't work?
Yep, it wont'..
Nov 7 16:38:59 espphotography postfix/smtpd[1707]: warning: regexp
map /etc/postfix/rbl_access, line 1: ignoring unrecognized request
Nov 7 16:38:59 espphotography postfix/smtpd[1707]: warning: regexp
map /etc/postfix/rbl_access, line 2: ignoring unrecognized request

So any ideas why the hash isn't working?

Thanks again all...
James Lay
2006-11-08 00:55:26 UTC
Permalink
On Tue, 07 Nov 2006 16:45:58 -0800
Post by Evan Platt
Post by Evan Platt
I see quite a few SEXUALLY EXPLICIT spams..
Subject: SEXUALLY EXPLICIT : Suzanne spreads puss
/SEXUALLY EXPLICIT/ Reject
header_checks = regexp:/etc/postfix/header_checks
But...
reject: header Subject: SEXUALLY EXPLICIT: Hi from
helo=<web53413.mail.yahoo.com>: 5.7.1 message content rejected
So .. Am I missing something? It was caught by SpamAssassin (called
via procmail), but it should have been caught and discarded long before that.
Any ideas what I'm missing?
Also, I use spamcop filtering, and occasionally servers like yahoo
are added to Spamcop BL'ing, so I created /etc/postfix/rbl_access
66.94.237.26 OK
dcn.yahoo.com OK
scd.yahoo.com OK
mud.yahoo.com OK
yahoo.com OK
mail.apache.org OK
apache.org OK
140.211.11.2 OK
And add
check_client_access hash:/etc/postfix/rbl_access,
I then get
Nov 7 12:32:36 espphotography postfix/smtpd[615]: fatal: open
database /etc/postfix/rbl_access.db: Inappropriate file type or format
I did postmap hash:/etc/postfix/rbl_access, still no go.
postconf -n shows
command_directory = /sw/sbin
config_directory = /sw/etc/postfix
daemon_directory = /sw/lib/postfix
debug_peer_level = 2
html_directory = /sw/share/doc/postfix/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /sw/bin/mailq
manpage_directory = /sw/share/man
mynetworks_style = host
newaliases_path = /sw/bin/newaliases
queue_directory = /sw/var/spool/postfix
readme_directory = /sw/share/doc/postfix/README_FILES
sample_directory = /sw/etc/postfix
sendmail_path = /sw/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
I changed hash to regexp. Any reason that won't work?
Yep, it wont'..
Nov 7 16:38:59 espphotography postfix/smtpd[1707]: warning: regexp
map /etc/postfix/rbl_access, line 1: ignoring unrecognized request
Nov 7 16:38:59 espphotography postfix/smtpd[1707]: warning: regexp
map /etc/postfix/rbl_access, line 2: ignoring unrecognized request
So any ideas why the hash isn't working?
Thanks again all...
You did do a postmap header_checks in /etc/postfix once you made the
changes yes?

James
Evan Platt
2006-11-08 00:59:25 UTC
Permalink
Post by James Lay
You did do a postmap header_checks in /etc/postfix once you made the
changes yes?
No.. header_checks is regexp:

header_checks = regexp:/etc/postfix/header_checks

No?

Never had to do anything before.. This is the first I noticed it doesn't work.
mouss
2006-11-08 01:35:37 UTC
Permalink
[snip]
And add
check_client_access hash:/etc/postfix/rbl_access,
I then get
Nov 7 12:32:36 espphotography postfix/smtpd[615]: fatal: open
database /etc/postfix/rbl_access.db: Inappropriate file type or format
I did postmap hash:/etc/postfix/rbl_access, still no go.
postconf -n shows
command_directory = /sw/sbin
config_directory = /sw/etc/postfix
daemon_directory = /sw/lib/postfix
debug_peer_level = 2
html_directory = /sw/share/doc/postfix/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /sw/bin/mailq
manpage_directory = /sw/share/man
mynetworks_style = host
newaliases_path = /sw/bin/newaliases
queue_directory = /sw/var/spool/postfix
readme_directory = /sw/share/doc/postfix/README_FILES
sample_directory = /sw/etc/postfix
sendmail_path = /sw/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
do you seen any rbl_access or check_client_access in this 'postconf -n'?
Unless you're lying, this postconf -n doesn't match the log line.
Ralf Hildebrandt
2006-11-08 09:18:30 UTC
Permalink
Post by Evan Platt
I see quite a few SEXUALLY EXPLICIT spams..
Subject: SEXUALLY EXPLICIT : Suzanne spreads puss
/SEXUALLY EXPLICIT/ Reject
header_checks = regexp:/etc/postfix/header_checks
The header may be encoded, and thus your header_checks may no see it.
--
Ralf Hildebrandt (***@charite.de) ***@charite.de
Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
http://www.postfix-buch.com
Without C, We would only have Pasal, Basi, and obol
Loading...