newtest : deltest
@ mkdir -p $(TESTDIR)/var/run
@ mkdir -p $(TESTDIR)/$(SBINDIR)
+ @ mkdir -p $(TESTDIR)/etc/$(APPNAME)
@ mkdir -p $(TESTDIR)/usr/share/$(APPNAME)
@ mkdir -p $(TESTDIR)/var/spool/$(APPNAME)/queue
@ mkdir -p $(TESTDIR)/var/spool/$(APPNAME)/mails
@ cp -a \
bin/* \
$(TESTDIR)/$(SBINDIR)
+ @ cp -a \
+ conf/* \
+ $(TESTDIR)/etc/$(APPNAME)
@ cp -a \
sql \
$(TESTDIR)/usr/share/$(APPNAME)/
/* */
/********************************************************/
#include <dirent.h>
+#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#include <syslog.h>
#include <unistd.h>
{
#define OPEP "scarmt.c:load_dnsbls,"
-const char *blcklist="XBLACKLIST";
+const char *blcklist="BLACKLISTER";
char **dnsbls;
+FILE *blkfile;
const char *filename;
int phase;
_Bool proceed;
dnsbls=(char **)0;
+blkfile=(FILE *)0;
phase=0;
proceed=true;
while (proceed==true) {
phase=999; //no need to go further
}
break;
+ case 1 : //opening the file
+ if (filename!=(char *)0) { //always
+ char *fullpath;
+
+ fullpath=rou_apppath(filename);
+ if ((blkfile=fopen(fullpath,"r"))==(FILE *)0) {
+ (void) rou_alert(0,"%s Unable to open file <%s> (error=<%s>)",
+ OPEP,fullpath,strerror(errno));
+ phase=999; //trouble trouble
+ }
+ fullpath=rou_freestr(fullpath);
+ }
+ break;
+ case 2 : //scaning file
+ if (blkfile!=(FILE *)0) { //always
+ char line[200];
+
+ while (fgets(line,sizeof(line)-1,blkfile)!=(char *)0) {
+ char *ptr;
+ int taille;
+
+ if ((ptr=strchr(line,'#'))!=(char *)0)
+ *ptr='\000';
+ taille=strlen(line);
+ while (taille>0) {
+ taille--;
+ ptr=line+taille;
+ if ((*ptr!=' ')&&(*ptr!='\t'))
+ break;
+ *ptr='\000';
+ }
+ if (strlen(line)>0) {
+ dnsbls=(char **)rou_addlist((void **)dnsbls,(void *)strdup(line));
+ }
+ }
+ (void) fclose(blkfile);
+ }
+ break;
default : //SAFE Guard
proceed=false;
break;
#Dovecot storage directory
DOV_MAILDIR="/var/spool/mailleur/mails"
#------------------------------------------------
-BLACKLIST=/etc/mailleur/blacklister.conf
+#The list of public blacklist serveur
+BLACKLISTER=/etc/mailleur/blacklister.conf
+#------------------------------------------------
#------------------------------------------------
SMTPPORTS="|127.127.10.25|1025|5,smtps|127.127.10.26|1465|3,smtp|127.127.10.26|1587|2"
#------------------------------------------------
-BLACKLIST=/home/jmp/safe-mailleur/mailleur/conf/blacklister.conf
+#The list of public blacklist serveur
+BLACKLISTER=/etc/mailleur/blacklister.conf
+#------------------------------------------------