Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Noel Jones (njonesmegan.vbhcs.org)
Date: Mon Jul 23 2007 - 11:41:03 CDT
At 11:08 AM 7/23/2007, Laurent CARON wrote:
>Some of my users are receiving spam like this one:
>Received: from localhost (localhost.localdomain [127.0.0.1])
> by sargon.lncsa.com (Postfix) with ESMTP id AD84D300EB31
> for <myusermydomain.com>; Mon, 23 Jul 2007 16:23:22 +0200 (CEST)
>Received: from sargon.lncsa.com ([127.0.0.1])
> by localhost (sargon.lncsa.com [127.0.0.1]) (amavisd-new, port
> with ESMTP id jb8EZlXA0q1v for <myusermydomain.com>;
> Mon, 23 Jul 2007 16:23:22 +0200 (CEST)
>Received: from [18.104.22.168] (unknown [22.214.171.124])
> by sargon.lncsa.com (Postfix) with ESMTP id 6DA17300EB2E
> for <myusermydomain.com>; Mon, 23 Jul 2007 16:21:43 +0200 (CEST)
>Received: from [126.96.36.199] by mail.qka.com; Mon, 23 Jul 2007 14:24:59
>Date: Mon, 23 Jul 2007 14:24:59 -0300
>From: "Gerald Hahn"lncsa.fr
>X-Mailer: The Bat! (v3.51.10) Home
>X-Priority: 3 (Normal)
>Subject: Boost your sexual power now!
>Content-Type: text/plain; charset=iso-8859-2
>The confusing thing is: From: "Gerald Hahn"mydomain.fr which is of
>course not a valid email address of this domain.
Likely the mail arrived with a header such as:
From: "Gerald Hahn"
which is not a valid From: header, and your postfix added mydomain to it. See
In particular, using the main.cf setting:
remote_header_rewrite_domain = domain.invalid
may reduce the confusion.
>What would be the best way to prevent such spams from reaching the inbox ?
>Would the following rule be valid in the header checks ?
>/^(From: "\w+ \w+"mydomain\.fr)/ REJECT Mail rejected by rule 228
That is a valid rule, and would likely have stopped this mail.
Note the (...) parenthesis are unneeded here.
Note also this could reject valid mail if you have any users with
You also might consider using
"reject_unknown_reverse_client_hostname" as part of your smtpd
restrictions, which would also have stopped this mail. But this rule
may reject some legit mail - you might want to use it for a while
proceeded with "warn_if_reject" to see what will be affected without
actually rejecting the mail.