projects
/
mymail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed the *second* reference to bash-mymail.sh. *sight*
[mymail.git]
/
mymail.c
diff --git
a/mymail.c
b/mymail.c
index
8a5fa24
..
d84d387
100644
(file)
--- a/
mymail.c
+++ b/
mymail.c
@@
-37,6
+37,7
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
@@
-48,7
+49,7
@@
#include <time.h>
#define MYMAIL_DB_MAGIC_TOKEN "mymail_index_file"
#include <time.h>
#define MYMAIL_DB_MAGIC_TOKEN "mymail_index_file"
-#define MYMAIL_VERSION "0.9.
9
"
+#define MYMAIL_VERSION "0.9.
10
"
#define MYMAIL_DB_FORMAT_VERSION 1
#define MYMAIL_DB_FORMAT_VERSION 1
@@
-380,6
+381,7
@@
void extract_mail(const char *mail_filename, unsigned long int position_in_mail,
/* printf("Extract\n"); */
mail_file = safe_fopen(mail_filename, "r", "mbox for mail extraction");
/* printf("Extract\n"); */
mail_file = safe_fopen(mail_filename, "r", "mbox for mail extraction");
+ /* fchmod(fileno(mail_file), 0x660); */
fseek(mail_file, position_in_mail, SEEK_SET);
if(fgets(raw_mbox_line, BUFFER_SIZE, mail_file)) {
fseek(mail_file, position_in_mail, SEEK_SET);
if(fgets(raw_mbox_line, BUFFER_SIZE, mail_file)) {
@@
-581,8
+583,8
@@
int search_in_db(const char *db_filename,
}
}
}
}
- printf("global_discard_mail_from_the_future = %d\n",
- global_discard_mail_from_the_future);
+
/*
printf("global_discard_mail_from_the_future = %d\n",
+ global_discard_mail_from_the_future); */
if(nb_extracted_mails < global_nb_mails_max &&
current_mail_filename[0] &&
if(nb_extracted_mails < global_nb_mails_max &&
current_mail_filename[0] &&
@@
-833,6
+835,7
@@
struct time_criterion {
static struct time_criterion time_criteria[] = {
static struct time_criterion time_criteria[] = {
+ { "1h", 0, 1, -1, -1 },
{ "8h", 0, 8, -1, -1 },
{ "24h", 0, 24, -1, -1 },
{ "48h", 0, 48, -1, -1 },
{ "8h", 0, 8, -1, -1 },
{ "24h", 0, 24, -1, -1 },
{ "48h", 0, 48, -1, -1 },
@@
-1055,6
+1058,9
@@
int main(int argc, char **argv) {
struct search_condition search_conditions[MAX_NB_SEARCH_CONDITIONS];
struct alias_node *a, *b;
struct search_condition search_conditions[MAX_NB_SEARCH_CONDITIONS];
struct alias_node *a, *b;
+ /* Group and others have no access */
+ umask(S_IRWXG | S_IRWXO);
+
if(regcomp(&global_leading_from_line_regexp, LEADING_FROM_LINE_REGEXP_STRING, 0)) {
fprintf(stderr,
"mymail: Cannot compile leading \"from\" line regexp. That is strange.\n");
if(regcomp(&global_leading_from_line_regexp, LEADING_FROM_LINE_REGEXP_STRING, 0)) {
fprintf(stderr,
"mymail: Cannot compile leading \"from\" line regexp. That is strange.\n");