Mercurial > masqmail-0.2
comparison src/masqmail.c @ 12:9fb7ddbaf129
removed noop-code; some beautifying
author | meillo@marmaro.de |
---|---|
date | Wed, 29 Oct 2008 16:34:13 +0100 |
parents | 26e34ae9a3e3 |
children | 3cb6f383f07e |
comparison
equal
deleted
inserted
replaced
11:24872a9fe6e1 | 12:9fb7ddbaf129 |
---|---|
210 /* write responses to stderr. */ | 210 /* write responses to stderr. */ |
211 | 211 |
212 struct sockaddr_in saddr; | 212 struct sockaddr_in saddr; |
213 gchar *peername = NULL; | 213 gchar *peername = NULL; |
214 int dummy = sizeof(saddr); | 214 int dummy = sizeof(saddr); |
215 #ifdef ENABLE_IDENT | |
216 gchar *ident = NULL; | |
217 #endif | |
218 | 215 |
219 conf.do_verbose = FALSE; | 216 conf.do_verbose = FALSE; |
220 | 217 |
221 if (!conf.run_as_user) { | 218 if (!conf.run_as_user) { |
222 seteuid(conf.orig_uid); | 219 seteuid(conf.orig_uid); |
225 | 222 |
226 DEBUG(5) debugf("accepting smtp message on stdin\n"); | 223 DEBUG(5) debugf("accepting smtp message on stdin\n"); |
227 | 224 |
228 if (getpeername(0, (struct sockaddr *) (&saddr), &dummy) == 0) { | 225 if (getpeername(0, (struct sockaddr *) (&saddr), &dummy) == 0) { |
229 peername = g_strdup(inet_ntoa(saddr.sin_addr)); | 226 peername = g_strdup(inet_ntoa(saddr.sin_addr)); |
230 #ifdef ENABLE_IDENT | |
231 { | |
232 gchar *id = NULL; | |
233 if ((id = (gchar *) ident_id(0, 60))) { | |
234 ident = g_strdup(id); | |
235 } | |
236 } | |
237 #endif | |
238 } else if (errno != ENOTSOCK) | 227 } else if (errno != ENOTSOCK) |
239 exit(EXIT_FAILURE); | 228 exit(EXIT_FAILURE); |
240 | 229 |
241 //smtp_in(stdin, stdout, peername); | |
242 smtp_in(stdin, stderr, peername, NULL); | 230 smtp_in(stdin, stderr, peername, NULL); |
243 | |
244 #ifdef ENABLE_IDENT | |
245 if (ident) | |
246 g_free(ident); | |
247 #endif | |
248 } | 231 } |
249 #endif | 232 #endif |
250 | 233 |
251 static void | 234 static void |
252 mode_accept(address * return_path, gchar * full_sender_name, guint accept_flags, char **addresses, int addr_cnt) | 235 mode_accept(address * return_path, gchar * full_sender_name, guint accept_flags, char **addresses, int addr_cnt) |
565 } | 548 } |
566 arg++; | 549 arg++; |
567 } | 550 } |
568 | 551 |
569 if (mta_mode == MODE_VERSION) { | 552 if (mta_mode == MODE_VERSION) { |
570 gchar *with_resolver = "", *with_smtp_server = "", *with_pop3 = "", | 553 gchar *with_resolver = ""; |
571 *with_auth = "", *with_maildir = "", *with_ident = "", *with_mserver = ""; | 554 gchar *with_smtp_server = ""; |
555 gchar *with_pop3 = ""; | |
556 gchar *with_auth = ""; | |
557 gchar *with_maildir = ""; | |
558 gchar *with_ident = ""; | |
559 gchar *with_mserver = ""; | |
572 | 560 |
573 #ifdef ENABLE_RESOLVER | 561 #ifdef ENABLE_RESOLVER |
574 with_resolver = " +resolver"; | 562 with_resolver = " +resolver"; |
575 #endif | 563 #endif |
576 #ifdef ENABLE_SMTP_SERVER | 564 #ifdef ENABLE_SMTP_SERVER |