Commits (1)
...@@ -89,6 +89,7 @@ ulong bundles_unpacked=0; ...@@ -89,6 +89,7 @@ ulong bundles_unpacked=0;
int cur_smb=0; int cur_smb=0;
FILE *fidologfile=NULL; FILE *fidologfile=NULL;
str_list_t subject_can;
str_list_t twit_list; str_list_t twit_list;
str_list_t bad_areas; str_list_t bad_areas;
...@@ -3175,6 +3176,7 @@ enum { ...@@ -3175,6 +3176,7 @@ enum {
,IMPORT_FILTERED_TWIT = 2 ,IMPORT_FILTERED_TWIT = 2
,IMPORT_FILTERED_EMPTY = 3 ,IMPORT_FILTERED_EMPTY = 3
,IMPORT_FILTERED_AGE = 4 ,IMPORT_FILTERED_AGE = 4
,IMPORT_FILTERED_SUBJ = 5
}; };
/****************************************************************************/ /****************************************************************************/
...@@ -3204,6 +3206,11 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint usernumber, uint subnum) ...@@ -3204,6 +3206,11 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint usernumber, uint subnum)
return IMPORT_FILTERED_TWIT; return IMPORT_FILTERED_TWIT;
} }
if(findstr_in_list(hdr->subj, subject_can)) {
lprintf(LOG_INFO,"Filtering message from %s with subject: %s", hdr->from, hdr->subj);
return IMPORT_FILTERED_SUBJ;
}
memset(&msg,0,sizeof(smbmsg_t)); memset(&msg,0,sizeof(smbmsg_t));
if(hdr->attr&FIDO_PRIVATE) if(hdr->attr&FIDO_PRIVATE)
msg.hdr.attr|=MSG_PRIVATE; msg.hdr.attr|=MSG_PRIVATE;
...@@ -4528,6 +4535,9 @@ int import_netmail(const char* path, const fmsghdr_t* inhdr, FILE* fp, const cha ...@@ -4528,6 +4535,9 @@ int import_netmail(const char* path, const fmsghdr_t* inhdr, FILE* fp, const cha
case IMPORT_FILTERED_AGE: /* too-old */ case IMPORT_FILTERED_AGE: /* too-old */
lprintf(LOG_WARNING,"%s Filtered - Too Old", info); lprintf(LOG_WARNING,"%s Filtered - Too Old", info);
break; break;
case IMPORT_FILTERED_SUBJ:
lprintf(LOG_WARNING,"%s Filtered - Subject", info);
break;
default: default:
lprintf(LOG_ERR,"ERROR (%d) Importing %s",i,info); lprintf(LOG_ERR,"ERROR (%d) Importing %s",i,info);
break; break;
...@@ -6239,6 +6249,8 @@ int main(int argc, char **argv) ...@@ -6239,6 +6249,8 @@ int main(int argc, char **argv)
SAFEPRINTF(str,"%stwitlist.cfg",scfg.ctrl_dir); SAFEPRINTF(str,"%stwitlist.cfg",scfg.ctrl_dir);
twit_list=findstr_list(str); twit_list=findstr_list(str);
subject_can = trashcan_list(&scfg,"subject");
if(scfg.total_faddrs) if(scfg.total_faddrs)
sys_faddr=scfg.faddr[0]; sys_faddr=scfg.faddr[0];
......