Mercurial > masqmail
comparison src/masqmail.c @ 204:5745edd5b769
removed the --disable-smtp-server configure option
masqmail will now always have the possibility to listen on a port compiled in
if you don't want it to listen on a port add this to your masqmail.conf:
listen_addresses = ""
also, if you don't start it as daemon it will not listen neither
author | meillo@marmaro.de |
---|---|
date | Fri, 16 Jul 2010 15:38:53 +0200 |
parents | 89f951be358f |
children | 4fd237550525 |
comparison
equal
deleted
inserted
replaced
203:45acc5727493 | 204:5745edd5b769 |
---|---|
175 | 175 |
176 logwrite(LOG_NOTICE, "%s %s daemon starting", PACKAGE, VERSION); | 176 logwrite(LOG_NOTICE, "%s %s daemon starting", PACKAGE, VERSION); |
177 listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv); | 177 listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv); |
178 } | 178 } |
179 | 179 |
180 #ifdef ENABLE_SMTP_SERVER | |
181 static void | 180 static void |
182 mode_smtp() | 181 mode_smtp() |
183 { | 182 { |
184 /* accept smtp message on stdin */ | 183 /* accept smtp message on stdin */ |
185 /* write responses to stderr. */ | 184 /* write responses to stderr. */ |
202 } else if (errno != ENOTSOCK) | 201 } else if (errno != ENOTSOCK) |
203 exit(EXIT_FAILURE); | 202 exit(EXIT_FAILURE); |
204 | 203 |
205 smtp_in(stdin, stderr, peername, NULL); | 204 smtp_in(stdin, stderr, peername, NULL); |
206 } | 205 } |
207 #endif | |
208 | 206 |
209 static void | 207 static void |
210 mode_accept(address * return_path, gchar * full_sender_name, guint accept_flags, char **addresses, int addr_cnt) | 208 mode_accept(address * return_path, gchar * full_sender_name, guint accept_flags, char **addresses, int addr_cnt) |
211 { | 209 { |
212 /* accept message on stdin */ | 210 /* accept message on stdin */ |
498 arg++; | 496 arg++; |
499 } | 497 } |
500 | 498 |
501 if (mta_mode == MODE_VERSION) { | 499 if (mta_mode == MODE_VERSION) { |
502 gchar *with_resolver = ""; | 500 gchar *with_resolver = ""; |
503 gchar *with_smtp_server = ""; | |
504 gchar *with_auth = ""; | 501 gchar *with_auth = ""; |
505 gchar *with_maildir = ""; | 502 gchar *with_maildir = ""; |
506 gchar *with_ident = ""; | 503 gchar *with_ident = ""; |
507 | 504 |
508 #ifdef ENABLE_RESOLVER | 505 #ifdef ENABLE_RESOLVER |
509 with_resolver = " +resolver"; | 506 with_resolver = " +resolver"; |
510 #endif | |
511 #ifdef ENABLE_SMTP_SERVER | |
512 with_smtp_server = " +smtp-server"; | |
513 #endif | 507 #endif |
514 #ifdef ENABLE_AUTH | 508 #ifdef ENABLE_AUTH |
515 with_auth = " +auth"; | 509 with_auth = " +auth"; |
516 #endif | 510 #endif |
517 #ifdef ENABLE_MAILDIR | 511 #ifdef ENABLE_MAILDIR |
519 #endif | 513 #endif |
520 #ifdef ENABLE_IDENT | 514 #ifdef ENABLE_IDENT |
521 with_ident = " +ident"; | 515 with_ident = " +ident"; |
522 #endif | 516 #endif |
523 | 517 |
524 printf("%s %s%s%s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_smtp_server, | 518 printf("%s %s%s%s%s%s\n", PACKAGE, VERSION, with_resolver, |
525 with_auth, with_maildir, with_ident); | 519 with_auth, with_maildir, with_ident); |
526 | 520 |
527 exit(EXIT_SUCCESS); | 521 exit(EXIT_SUCCESS); |
528 } | 522 } |
529 | 523 |
644 } | 638 } |
645 } | 639 } |
646 break; | 640 break; |
647 | 641 |
648 case MODE_SMTP: | 642 case MODE_SMTP: |
649 #ifdef ENABLE_SMTP_SERVER | |
650 mode_smtp(); | 643 mode_smtp(); |
651 #else | |
652 fprintf(stderr, "smtp server support not compiled in\n"); | |
653 #endif | |
654 break; | 644 break; |
655 | 645 |
656 case MODE_LIST: | 646 case MODE_LIST: |
657 queue_list(); | 647 queue_list(); |
658 break; | 648 break; |