Skip to content
Snippets Groups Projects
Commit 2b7fac8f authored by rswindell's avatar rswindell
Browse files

spamlog() now takes an action parameter (it's not always "REJECT").

parent 44af79c8
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,8 @@ extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text, ...@@ -67,7 +67,8 @@ extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text,
return(TRUE); return(TRUE);
} }
extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason, char* host, char* ip_addr, char* to) extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action,
char* reason, char* host, char* ip_addr, char* to)
{ {
char hdr[512]; char hdr[512];
char to_user[128]; char to_user[128];
...@@ -86,8 +87,9 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason, char* hos ...@@ -86,8 +87,9 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason, char* hos
else else
sprintf(to_user,"to: %s",to); sprintf(to_user,"to: %s",to);
sprintf(hdr,"SUSPECTED %s SPAM REJECTED on %.24s\r\nFrom: %s [%s] %s\r\nReason: " sprintf(hdr,"SUSPECTED %s SPAM %s on %.24s\r\nFrom: %s [%s] %s\r\nReason: "
,prot ,prot
,action
,timestr(cfg,&now,tstr) ,timestr(cfg,&now,tstr)
,host ,host
,ip_addr ,ip_addr
......
...@@ -812,7 +812,7 @@ extern "C" { ...@@ -812,7 +812,7 @@ extern "C" {
/* logfile.cpp */ /* logfile.cpp */
DLLEXPORT BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text DLLEXPORT BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text
,char* host, SOCKADDR_IN* addr); ,char* host, SOCKADDR_IN* addr);
DLLEXPORT BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason DLLEXPORT BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action, char* reason
,char* host, char* ip_addr, char* to); ,char* host, char* ip_addr, char* to);
DLLEXPORT char * DLLCALL remove_ctrl_a(char* instr, char* outstr); DLLEXPORT char * DLLCALL remove_ctrl_a(char* instr, char* outstr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment