spamdyke should already be blocking messages to recipients with no domain name 
-- that particular feature is not configurable.  But it doesn't check the "To" 
line in the message headers by default.  You should be able to block them using 
the header blacklist filter, something like this:
        To: *@

As for why the header blacklist filter isn't working for you, it's hard to say 
without more information.  Could you post your configuration file?  Have you 
tried running the config-test feature to look for errors in your configuration? 
 If you could capture a full log (full-log-dir) from one of the connections 
that should be blocked, it would show exactly what spamdyke is doing (or not 
doing) at every step.

-- Sam Clippinger




On Jun 27, 2015, at 11:55 AM, Shane Bywater via spamdyke-users 
<spamdyke-users@spamdyke.org> wrote:

> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 24 Jun 2015 15:40:10 +0000
> From: Shane Bywater <sh...@apexia.ca>
> To: "spamdyke-users@spamdyke.org" <spamdyke-users@spamdyke.org>
> Subject: [spamdyke-users] can spamdyke reject emails with improper
>       from and        to fields?
> Message-ID:
>       <c2615c1606841d429fe282c972131c7b31f1e...@s11maild020n2.sh11.lan>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hi,
>       Does anyone know if spamdyke can reject an email if it contains 
> improper "from" and "to" fields (for example no from address)?  I get 
> hundreds of entries daily in the maillog file as shown below and would rather 
> qmail not even try to send a bounce message to such emails.
> 
> Jun 24 11:31:15 qmail-queue-handlers[20290]: Handlers Filter before-queue for 
> qmail started ...
> Jun 24 11:31:15 qmail-queue-handlers[20290]: from= Jun 24 11:31:15 
> qmail-queue-handlers[20290]: to=%from_email Jun 24 11:31:15 
> qmail-queue-handlers[20290]: Unable to get sender domain by sender mailname 
> Jun 24 11:31:15 qmail-queue-handlers[20290]: Unable to get sender domain by 
> sender mailname Jun 24 11:31:15 qmail-queue-handlers[20290]: Unable to get 
> sender domain by sender mailname Jun 24 11:31:15 qmail-queue-handlers[20290]: 
> Unable to get sender domain by sender mailname Jun 24 11:31:15 
> qmail-queue-handlers[20290]: Incorrect recipient mailname : %from_email Jun 
> 24 11:31:15 qmail: 1435159875.553019 warning: trouble injecting bounce 
> message, will try later
> 
>       Note:  I'm using spamdyke 5.0.1 on a Plesk 10.4 CentOS 6 server.  BTW 
> thanks to Sam for continuing to develop and improve spamdyke.
> 
> Regards,
> Shane Bywater
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 24 Jun 2015 11:24:47 -0500
> From: Sam Clippinger <s...@silence.org>
> To: spamdyke users <spamdyke-users@spamdyke.org>
> Subject: Re: [spamdyke-users] can spamdyke reject emails with improper
>       from    and to fields?
> Message-ID: <b47b331a-febc-4a20-9b7a-af7c99945...@silence.org>
> Content-Type: text/plain; charset="us-ascii"
> 
> It can do this in a limited fashion right now.  If the improper To field is 
> always "To: %from_email" (or something from a known set of bad values), you 
> could use the header blacklist filter to block it.  But at present, there's 
> no way to block a message with a missing header line.
> 
> -- Sam Clippinger
> 
> 
> Hi,
>        Is there a way to use spamdyke (header blacklist?) to block emails 
> with no domain in the email address (ie. tksofxpwfhc@).  Also, it doesn't 
> seem like the header-blacklist file is even being used by Spamdyke as I have 
> setup my /var/spamdyke/header-blacklist-file to contain "Subject: hhh" (minus 
> the quotes) and when I send myself an email from an external email address 
> with such the subject line containing hhh it passes through without Spamdyke 
> blocking it.  In my spamdyke.conf file I have 
> header-blacklist-file=/var/spamdyke/header-blacklist-file and it has the same 
> permissions as the other spamdyke files in such a directory.  I also tried 
> entering header-blacklist-entry=Subject: hhh in my spamdyke.conf file but 
> that email was allowed through as well. 
>       My sending email address is not whitelisted and there is no spamdyke 
> messages appearing in the maillog file.  What could I be doing wrong?
> 
> Regards,
> Shane Bywater
> _______________________________________________
> spamdyke-users mailing list
> spamdyke-users@spamdyke.org
> http://www.spamdyke.org/mailman/listinfo/spamdyke-users

_______________________________________________
spamdyke-users mailing list
spamdyke-users@spamdyke.org
http://www.spamdyke.org/mailman/listinfo/spamdyke-users

Reply via email to