Re: [spamdyke-users] Fail2ban integration

2016-07-25 Thread Gary Gendel via spamdyke-users

Sam,

Thanks.  I'll let you know how it goes.

Gary

On 07/25/2016 09:58 AM, Sam Clippinger via spamdyke-users wrote:
spamdyke won't log the IP in its current version, but it wouldn't be 
hard to add.  If you want a quick'n'dirty solution right away, you can 
add it very easily... just edit exec.c and change line 206 to this:
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_AUTH_FAILURE "%s 
%s", username, current_settings->server_ip);
Then recompile and replace the spamdyke binary with the new copy. 
 Once it's in place, the "authentication failure" messages should show 
the IP address right after the username, separated by a space.  (NOTE: 
I haven't compiled or tested this change, proceed with caution...)


-- Sam Clippinger




On Jul 22, 2016, at 6:17 PM, Gary Gendel via spamdyke-users 
> wrote:



Sam,

Is there a way to get spamdyke to log invalid authorizations in a 
manner that fail2ban can use?  My host has been hit continuously with 
brute-force attacks.  Unfortunately, the logs only have:


Jul 22 18:54:43 tardis spamdyke[26727]: [ID 702911 mail.info] 
FILTER_AUTH_REQUIRED
Jul 22 18:54:50 tardis spamdyke[26727]: [ID 702911 mail.info] 
ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure 
(bad username/password, vchkpw uses this to indicate SMTP access is 
not allowed): verizon
Jul 22 18:56:01 tardis spamdyke[26727]: [ID 702911 mail.info] 
ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
operation failed due to an I/O error, Unexpected EOF found
Jul 22 18:57:16 tardis spamdyke[26736]: [ID 702911 mail.info] 
FILTER_AUTH_REQUIRED
Jul 22 18:57:23 tardis spamdyke[26736]: [ID 702911 mail.info] 
ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure 
(bad username/password, vchkpw uses this to indicate SMTP access is 
not allowed): verizon
Jul 22 18:58:37 tardis spamdyke[26736]: [ID 702911 mail.info] 
ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
operation failed due to an I/O error, Unexpected EOF found
Jul 22 18:59:59 tardis spamdyke[26743]: [ID 702911 mail.info] 
FILTER_AUTH_REQUIRED
Jul 22 19:00:10 tardis spamdyke[26743]: [ID 702911 mail.info] 
ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure 
(bad username/password, vchkpw uses this to indicate SMTP access is 
not allowed): verizon
Jul 22 19:01:21 tardis spamdyke[26743]: [ID 702911 mail.info] 
ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
operation failed due to an I/O error, Unexpected EOF found
Jul 22 19:02:32 tardis spamdyke[26876]: [ID 702911 mail.info] 
FILTER_AUTH_REQUIRED
Jul 22 19:02:38 tardis spamdyke[26876]: [ID 702911 mail.info] 
ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure 
(bad username/password, vchkpw uses this to indicate SMTP access is 
not allowed): verizon
Jul 22 19:03:50 tardis spamdyke[26876]: [ID 702911 mail.info] 
ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
operation failed due to an I/O error, Unexpected EOF found
\Jul 22 19:05:11 tardis spamdyke[26891]: [ID 702911 mail.info] 
FILTER_AUTH_REQUIRED
Jul 22 19:05:16 tardis spamdyke[26891]: [ID 702911 mail.info] 
ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure 
(bad username/password, vchkpw uses this to indicate SMTP access is 
not allowed): verizon


They seem to have a huge list of account names to try and I've got 
thousands of attempts just for today.  Unfortunately, without any IP 
address in the message I can't have fail2ban automatically block these.


Gary


___
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





smime.p7s
Description: S/MIME Cryptographic Signature
___
spamdyke-users mailing list
spamdyke-users@spamdyke.org
http://www.spamdyke.org/mailman/listinfo/spamdyke-users


Re: [spamdyke-users] Fail2ban integration

2016-07-25 Thread Sam Clippinger via spamdyke-users
spamdyke won't log the IP in its current version, but it wouldn't be hard to 
add.  If you want a quick'n'dirty solution right away, you can add it very 
easily... just edit exec.c and change line 206 to this:
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_AUTH_FAILURE "%s 
%s", username, current_settings->server_ip);
Then recompile and replace the spamdyke binary with the new copy.  Once it's in 
place, the "authentication failure" messages should show the IP address right 
after the username, separated by a space.  (NOTE: I haven't compiled or tested 
this change, proceed with caution...)

-- Sam Clippinger




On Jul 22, 2016, at 6:17 PM, Gary Gendel via spamdyke-users 
 wrote:

> Sam,
> 
> Is there a way to get spamdyke to log invalid authorizations in a manner that 
> fail2ban can use?  My host has been hit continuously with brute-force 
> attacks.  Unfortunately, the logs only have:
> 
> Jul 22 18:54:43 tardis spamdyke[26727]: [ID 702911 mail.info] 
> FILTER_AUTH_REQUIRED
> Jul 22 18:54:50 tardis spamdyke[26727]: [ID 702911 mail.info] 
> ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure (bad 
> username/password, vchkpw uses this to indicate SMTP access is not allowed): 
> verizon
> Jul 22 18:56:01 tardis spamdyke[26727]: [ID 702911 mail.info] 
> ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
> operation failed due to an I/O error, Unexpected EOF found
> Jul 22 18:57:16 tardis spamdyke[26736]: [ID 702911 mail.info] 
> FILTER_AUTH_REQUIRED
> Jul 22 18:57:23 tardis spamdyke[26736]: [ID 702911 mail.info] 
> ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure (bad 
> username/password, vchkpw uses this to indicate SMTP access is not allowed): 
> verizon
> Jul 22 18:58:37 tardis spamdyke[26736]: [ID 702911 mail.info] 
> ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
> operation failed due to an I/O error, Unexpected EOF found
> Jul 22 18:59:59 tardis spamdyke[26743]: [ID 702911 mail.info] 
> FILTER_AUTH_REQUIRED
> Jul 22 19:00:10 tardis spamdyke[26743]: [ID 702911 mail.info] 
> ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure (bad 
> username/password, vchkpw uses this to indicate SMTP access is not allowed): 
> verizon
> Jul 22 19:01:21 tardis spamdyke[26743]: [ID 702911 mail.info] 
> ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
> operation failed due to an I/O error, Unexpected EOF found
> Jul 22 19:02:32 tardis spamdyke[26876]: [ID 702911 mail.info] 
> FILTER_AUTH_REQUIRED
> Jul 22 19:02:38 tardis spamdyke[26876]: [ID 702911 mail.info] 
> ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure (bad 
> username/password, vchkpw uses this to indicate SMTP access is not allowed): 
> verizon
> Jul 22 19:03:50 tardis spamdyke[26876]: [ID 702911 mail.info] 
> ERROR(tls_read()@tls.c:620): unable to read from SSL/TLS stream: The 
> operation failed due to an I/O error, Unexpected EOF found
> \Jul 22 19:05:11 tardis spamdyke[26891]: [ID 702911 mail.info] 
> FILTER_AUTH_REQUIRED
> Jul 22 19:05:16 tardis spamdyke[26891]: [ID 702911 mail.info] 
> ERROR(exec_checkpassword_argv()@exec.c:206): authentication failure (bad 
> username/password, vchkpw uses this to indicate SMTP access is not allowed): 
> verizon
> 
> They seem to have a huge list of account names to try and I've got thousands 
> of attempts just for today.  Unfortunately, without any IP address in the 
> message I can't have fail2ban automatically block these.
> 
> Gary
> 
> 
> ___
> 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


Re: [spamdyke-users] can't block envelope sender

2016-07-25 Thread Sam Clippinger via spamdyke-users
Could probably do that.  Or maybe print the matching file/line in the "reason" 
field, the same way it already does for blacklist matches?

-- Sam Clippinger




On Jul 22, 2016, at 11:37 AM, Faris Raouf  wrote:

> Hi Sam,
>  
> I just had a chance to have a go with the tests, and just as you expected it 
> was down to the rDNS of the sender being whitelisted.
> I don’t know how many times I’d checked, and missed seeing it J
>  
> Unfortunately I can’t remember why I whitelisted it L It belongs to an ESP. 
> If they are sending stuff that can’t pass SD’s filters, it doesn’t belong in 
> anybody’s mailbox. But obviously I needed to whitelist it for some reason at 
> some point. I will have to have a think about this.
>  
> But this situation inspires me to ask you to consider adding something to the 
> wishlist:
>  
> When a messages is allowed to pass as a result of being whitelisted, could 
> there be an option to change the logging so that instead of just ALLOWED it 
> shows ALLOWED_WL_[type] or maybe WHITELIST_[type] or something along those 
> lines?
>  
>  
>  
> If you can login to ms2 at the command line, you could also try running 
> spamdyke by hand so you can see more verbose output without flooding your 
> logs.
>  

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