From d276282b7474eee7f62d0aad54f82bcc6d41dc77 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 6 Dec 2002 07:12:04 +0000
Subject: [PATCH] Added checkbox to enable DNSBL debug logging.

---
 src/sbbs3/ctrl/MailCfgDlgUnit.cpp |  9 +++++++++
 src/sbbs3/ctrl/MailCfgDlgUnit.dfm | 13 +++++++++++--
 src/sbbs3/ctrl/MailCfgDlgUnit.h   |  1 +
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/sbbs3/ctrl/MailCfgDlgUnit.cpp b/src/sbbs3/ctrl/MailCfgDlgUnit.cpp
index a080ff5ab7..b1002a073b 100644
--- a/src/sbbs3/ctrl/MailCfgDlgUnit.cpp
+++ b/src/sbbs3/ctrl/MailCfgDlgUnit.cpp
@@ -135,6 +135,8 @@ void __fastcall TMailCfgDlg::FormShow(TObject *Sender)
 	    BLIgnoreRadioButton->Checked=true;
 	else
 	    BLTagRadioButton->Checked=true;
+    BLDebugCheckBox->Checked=MainForm->mail_startup.options
+    	&MAIL_OPT_DNSBL_DEBUG;
 
     TcpDnsCheckBox->Checked=MainForm->mail_startup.options
     	&MAIL_OPT_USE_TCP_DNS;
@@ -232,6 +234,8 @@ void __fastcall TMailCfgDlg::OKBtnClick(TObject *Sender)
     	MainForm->mail_startup.options|=MAIL_OPT_ALLOW_RELAY;
     else
 	    MainForm->mail_startup.options&=~MAIL_OPT_ALLOW_RELAY;
+
+    /* DNSBL */
 	MainForm->mail_startup.options&=
     	~(MAIL_OPT_DNSBL_IGNORE|MAIL_OPT_DNSBL_REFUSE|MAIL_OPT_DNSBL_BADUSER);
 	if(BLIgnoreRadioButton->Checked==true)
@@ -240,6 +244,11 @@ void __fastcall TMailCfgDlg::OKBtnClick(TObject *Sender)
     	MainForm->mail_startup.options|=MAIL_OPT_DNSBL_REFUSE;
     else if(BLBadUserRadioButton->Checked==true)
     	MainForm->mail_startup.options|=MAIL_OPT_DNSBL_BADUSER;
+    if(BLDebugCheckBox->Checked==true)
+    	MainForm->mail_startup.options|=MAIL_OPT_DNSBL_DEBUG;
+    else
+	    MainForm->mail_startup.options&=~MAIL_OPT_DNSBL_DEBUG;
+
 	if(HostnameCheckBox->Checked==false)
     	MainForm->mail_startup.options|=MAIL_OPT_NO_HOST_LOOKUP;
     else
diff --git a/src/sbbs3/ctrl/MailCfgDlgUnit.dfm b/src/sbbs3/ctrl/MailCfgDlgUnit.dfm
index 06543422bd..c9ce180f0c 100644
--- a/src/sbbs3/ctrl/MailCfgDlgUnit.dfm
+++ b/src/sbbs3/ctrl/MailCfgDlgUnit.dfm
@@ -53,8 +53,8 @@ object MailCfgDlg: TMailCfgDlg
     Top = 4
     Width = 342
     Height = 245
-    ActivePage = GeneralTabSheet
-    TabIndex = 0
+    ActivePage = DNSBLTabSheet
+    TabIndex = 5
     TabOrder = 3
     object GeneralTabSheet: TTabSheet
       Caption = 'General'
@@ -677,6 +677,15 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 2
         OnClick = DNSBLExemptionsButtonClick
       end
+      object BLDebugCheckBox: TCheckBox
+        Left = 256
+        Top = 8
+        Width = 73
+        Height = 26
+        Hint = 'Enable debug logging of DNSBL lookups'
+        Caption = 'Debug'
+        TabOrder = 3
+      end
     end
   end
   object OpenDialog: TOpenDialog
diff --git a/src/sbbs3/ctrl/MailCfgDlgUnit.h b/src/sbbs3/ctrl/MailCfgDlgUnit.h
index fe1c1a12b1..6477adbb46 100644
--- a/src/sbbs3/ctrl/MailCfgDlgUnit.h
+++ b/src/sbbs3/ctrl/MailCfgDlgUnit.h
@@ -123,6 +123,7 @@ __published:
 	TEdit *MaxRecipientsEdit;
 	TButton *DNSBLExemptionsButton;
 	TCheckBox *DebugRXCheckBox;
+	TCheckBox *BLDebugCheckBox;
     void __fastcall InboundSoundButtonClick(TObject *Sender);
     void __fastcall OutboundSoundButtonClick(TObject *Sender);
     void __fastcall FormShow(TObject *Sender);
-- 
GitLab