removed pilergetd stuff

This commit is contained in:
SJ 2015-11-21 22:35:24 +01:00
parent 97fe864810
commit a83bdc43a7
5 changed files with 5 additions and 85 deletions

2
configure vendored
View File

@ -4889,7 +4889,7 @@ echo; echo
CFLAGS="$static -O2 -Wall -g" CFLAGS="$static -O2 -Wall -g"
LIBS="$antispam_libs $sunos_libs " LIBS="$antispam_libs $sunos_libs "
OBJS="dirs.o base64.o misc.o counters.o cfg.o sig.o decoder.o hash.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o import.o imap.o pop3.o extract.o mydomains.o retr.o $objs" OBJS="dirs.o base64.o misc.o counters.o cfg.o sig.o decoder.o hash.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o import.o imap.o pop3.o extract.o mydomains.o $objs"
ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile test/Makefile contrib/imap/Makefile" ac_config_files="$ac_config_files Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile test/Makefile contrib/imap/Makefile"

View File

@ -556,7 +556,7 @@ echo; echo
CFLAGS="$static -O2 -Wall -g" CFLAGS="$static -O2 -Wall -g"
LIBS="$antispam_libs $sunos_libs " LIBS="$antispam_libs $sunos_libs "
OBJS="dirs.o base64.o misc.o counters.o cfg.o sig.o decoder.o hash.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o import.o imap.o pop3.o extract.o mydomains.o retr.o $objs" OBJS="dirs.o base64.o misc.o counters.o cfg.o sig.o decoder.o hash.o parser.o parser_utils.o rules.o session.o message.o attachment.o digest.o store.o archive.o tai.o import.o imap.o pop3.o extract.o mydomains.o $objs"
AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile test/Makefile contrib/imap/Makefile]) AC_CONFIG_FILES([Makefile src/Makefile etc/Makefile util/Makefile init.d/Makefile test/Makefile contrib/imap/Makefile])
AC_OUTPUT AC_OUTPUT

View File

@ -33,16 +33,13 @@ MAKE = `which make`
INSTALL = @INSTALL@ INSTALL = @INSTALL@
all: libpiler.a piler pilerconf pilerget pilergetd pileraget pilerimport pilerexport pilerpurge reindex test all: libpiler.a piler pilerconf pilerget pileraget pilerimport pilerexport pilerpurge reindex test
install: install-piler install: install-piler
piler: piler.c libpiler.a piler: piler.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@ $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@
pilergetd: pilergetd.c libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@
libpiler.a: $(OBJS) $(SQL_OBJS) libpiler.a: $(OBJS) $(SQL_OBJS)
ar cr libpiler.a $(OBJS) $(SQL_OBJS) ar cr libpiler.a $(OBJS) $(SQL_OBJS)
ranlib libpiler.a ranlib libpiler.a
@ -86,7 +83,6 @@ install-piler:
(cd $(DESTDIR)$(libdir) && ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so.$(PILER_VERSION)) (cd $(DESTDIR)$(libdir) && ln -sf libpiler.so.$(LIBPILER_VERSION) libpiler.so.$(PILER_VERSION))
$(INSTALL) -m 0755 piler $(DESTDIR)$(sbindir) $(INSTALL) -m 0755 piler $(DESTDIR)$(sbindir)
$(INSTALL) -m 0755 pilergetd $(DESTDIR)$(sbindir)
$(INSTALL) -m 0755 pilerconf $(DESTDIR)$(sbindir) $(INSTALL) -m 0755 pilerconf $(DESTDIR)$(sbindir)
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilerget $(DESTDIR)$(bindir) $(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilerget $(DESTDIR)$(bindir)
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pileraget $(DESTDIR)$(bindir) $(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pileraget $(DESTDIR)$(bindir)
@ -97,7 +93,7 @@ install-piler:
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilertest $(DESTDIR)$(bindir) $(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) pilertest $(DESTDIR)$(bindir)
clean: clean:
rm -f *.o *.a libpiler.so* piler pilerconf pilerget pilergetd pileraget pilerimport pilerexport pilerpurge pilertest reindex rm -f *.o *.a libpiler.so* piler pilerconf pilerget pileraget pilerimport pilerexport pilerpurge pilertest reindex
distclean: clean distclean: clean
rm -f Makefile rm -f Makefile

View File

@ -209,82 +209,6 @@ CLEANUP:
} }
int file_from_archive_to_network(char *filename, int sd, int tls_enable, struct __data *data, struct __config *cfg){
int n, olen, tlen, len, fd=-1;
unsigned char *s=NULL, *addr=NULL, inbuf[REALLYBIGBUFSIZE];
struct stat st;
EVP_CIPHER_CTX ctx;
if(filename == NULL) return 1;
fd = open(filename, O_RDONLY);
if(fd == -1){
syslog(LOG_PRIORITY, "%s: cannot open()", filename);
return 1;
}
if(fstat(fd, &st)){
syslog(LOG_PRIORITY, "%s: cannot fstat()", filename);
close(fd);
return 1;
}
if(cfg->encrypt_messages == 1){
EVP_CIPHER_CTX_init(&ctx);
EVP_DecryptInit_ex(&ctx, EVP_bf_cbc(), NULL, cfg->key, cfg->iv);
len = st.st_size+EVP_MAX_BLOCK_LENGTH;
s = malloc(len);
if(!s){
syslog(LOG_PRIORITY, "error: malloc(), '%s'", filename);
goto CLEANUP2;
}
tlen = 0;
while((n = read(fd, inbuf, sizeof(inbuf)))){
if(!EVP_DecryptUpdate(&ctx, s+tlen, &olen, inbuf, n)){
syslog(LOG_PRIORITY, "%s: EVP_DecryptUpdate()", filename);
goto CLEANUP2;
}
tlen += olen;
}
if(EVP_DecryptFinal(&ctx, s + tlen, &olen) != 1){
syslog(LOG_PRIORITY, "%s: EVP_DecryptFinal()", filename);
goto CLEANUP2;
}
tlen += olen;
write1(sd, s, tlen, tls_enable, data->ssl);
}
else {
addr = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
write1(sd, addr, st.st_size, tls_enable, data->ssl);
munmap(addr, st.st_size);
}
CLEANUP2:
if(fd != -1) close(fd);
if(s) free(s);
if(cfg->encrypt_messages == 1) EVP_CIPHER_CTX_cleanup(&ctx);
return 0;
}
int retrieve_email_from_archive(struct session_data *sdata, struct __data *data, FILE *dest, struct __config *cfg){ int retrieve_email_from_archive(struct session_data *sdata, struct __data *data, FILE *dest, struct __config *cfg){
int i, attachments; int i, attachments;
char *buffer=NULL, *saved_buffer, *p, filename[SMALLBUFSIZE], pointer[SMALLBUFSIZE]; char *buffer=NULL, *saved_buffer, *p, filename[SMALLBUFSIZE], pointer[SMALLBUFSIZE];

View File

@ -14,7 +14,7 @@
#define VERSION "1.2.0-master" #define VERSION "1.2.0-master"
#define BUILD 926 #define BUILD 927
#define HOSTID "mailarchiver" #define HOSTID "mailarchiver"