comparison src/masqmail.c @ 378:5781ba87df95

Removed ident. This had been discussed on the mailing list in Oct 2011. Ident is hardly useful in typical setups for masqmail. Probably Oliver had used it in his setup; that would make sense. Now, I know of nobody who needs it.
author markus schnalke <meillo@marmaro.de>
date Sat, 14 Jan 2012 21:36:58 +0100
parents b27f66555ba8
children cdd16614c1f5
comparison
equal deleted inserted replaced
377:9bc3e47b0222 378:5781ba87df95
75 75
76 signal(sig, SIG_DFL); 76 signal(sig, SIG_DFL);
77 raise(sig); 77 raise(sig);
78 } 78 }
79 79
80 #ifdef ENABLE_IDENT /* so far used for that only */
81 static gboolean
82 is_in_netlist(gchar *host, GList *netlist)
83 {
84 guint hostip = inet_addr(host);
85 struct in_addr addr;
86
87 addr.s_addr = hostip;
88 if (addr.s_addr != INADDR_NONE) {
89 GList *node;
90 foreach(netlist, node) {
91 struct in_addr *net = (struct in_addr *) (node->data);
92 if ((addr.s_addr & net->s_addr) == net->s_addr)
93 return TRUE;
94 }
95 }
96 return FALSE;
97 }
98 #endif
99
100 /* 80 /*
101 ** argv: the original argv 81 ** argv: the original argv
102 ** argp: number of arg (may get modified!) 82 ** argp: number of arg (may get modified!)
103 ** cp: pointing to the char after the option 83 ** cp: pointing to the char after the option
104 ** e.g. `-d 6' `-d6' 84 ** e.g. `-d 6' `-d6'
359 if (strcmp(pw->pw_name, msg->ident) != 0) { 339 if (strcmp(pw->pw_name, msg->ident) != 0) {
360 fprintf(stderr, "you do not own message id %s\n", *id); 340 fprintf(stderr, "you do not own message id %s\n", *id);
361 continue; 341 continue;
362 } 342 }
363 343
364 if ( (msg->received_host || (msg->received_prot != PROT_LOCAL)) 344 if (msg->received_host || (msg->received_prot != PROT_LOCAL)) {
365 #ifdef ENABLE_IDENT 345 fprintf(stderr, "message %s was not received locally\n", *id);
366 && !is_in_netlist(msg->received_host, conf.ident_trusted_nets)
367 #endif
368 ) {
369 fprintf(stderr, "message %s was not received locally or from a trusted network\n", *id);
370 continue; 346 continue;
371 } 347 }
372 348
373 ok = queue_delete(*id); 349 ok = queue_delete(*id);
374 } 350 }
405 static void 381 static void
406 mode_version(void) 382 mode_version(void)
407 { 383 {
408 gchar *with_resolver = ""; 384 gchar *with_resolver = "";
409 gchar *with_auth = ""; 385 gchar *with_auth = "";
410 gchar *with_ident = "";
411 386
412 #ifdef ENABLE_RESOLVER 387 #ifdef ENABLE_RESOLVER
413 with_resolver = " +resolver"; 388 with_resolver = " +resolver";
414 #endif 389 #endif
415 #ifdef ENABLE_AUTH 390 #ifdef ENABLE_AUTH
416 with_auth = " +auth"; 391 with_auth = " +auth";
417 #endif 392 #endif
418 #ifdef ENABLE_IDENT 393
419 with_ident = " +ident"; 394 printf("%s %s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth);
420 #endif
421
422 printf("%s %s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth,
423 with_ident);
424 } 395 }
425 396
426 void 397 void
427 set_mode(enum mta_mode mode) 398 set_mode(enum mta_mode mode)
428 { 399 {