Index: Makefile.in
--- Makefile.in.orig	2006-06-01 17:07:06 +0200
+++ Makefile.in	2006-06-05 09:51:25 +0200
@@ -703,7 +703,7 @@
 	@(cd soap && echo "making in soap/..." && \
 	$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
 	DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' \
-	USER='${USER}' GROUP='${GROUP}' SCRIPTDIR='${SCRIPTDIR}' \
+	USER='${USER}' GROUP='${GROUP}' SCRIPTDIR='${SCRIPTDIR}' enable_secure='${enable_secure}' \
 	CGIDIR='${CGIDIR}' WWSBINDIR='${WWSBINDIR}' MAILERPROGDIR='${MAILERPROGDIR}' \
 	PIDDIR='${PIDDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' ETCBINDIR='${ETCBINDIR}' \
 	DESTDIR='${DESTDIR}' USER='${USER}' GROUP='${GROUP}' ICONSDIR='${ICONSDIR}' newinstall) || exit 1;
Index: mail_tt2/Makefile
--- mail_tt2/Makefile.orig	2005-08-11 14:27:15 +0200
+++ mail_tt2/Makefile	2006-06-05 09:51:47 +0200
@@ -66,4 +66,4 @@
 	$(PERL) ../set_symlinks.pl mail_tt2 $(DESTDIR)$(ETCBINDIR)/mail_tt2
 	find $(DESTDIR)$(ETCBINDIR) -type d -exec chmod 755 {} \;
 	find $(DESTDIR)$(ETCBINDIR) -type f -exec chmod 444 {} \;
-	rm -f $(DESTDIR)$(ETCBINDIR)/web_tt2/authorization_reject.tt2 ; ln -s $(DESTDIR)$(ETCBINDIR)/mail_tt2/authorization_reject.tt2 $(DESTDIR)$(ETCBINDIR)/web_tt2
+	rm -f $(DESTDIR)$(ETCBINDIR)/web_tt2/authorization_reject.tt2 ; ln $(DESTDIR)$(ETCBINDIR)/mail_tt2/authorization_reject.tt2 $(DESTDIR)$(ETCBINDIR)/web_tt2
Index: soap/Makefile
--- soap/Makefile.orig	2004-01-12 09:18:13 +0100
+++ soap/Makefile	2006-06-05 09:51:25 +0200
@@ -50,9 +50,11 @@
 	chown $(USER) $(DESTDIR)$(CGIDIR)/$$i; \
 	chgrp $(GROUP) $(DESTDIR)$(CGIDIR)/$$i; \
 	done
-	@echo "Setting SetUID bit on sympa_soap_server.fcgi..."
-	chmod u+s $(DESTDIR)$(CGIDIR)/sympa_soap_server.fcgi
-	chmod g+s $(DESTDIR)$(CGIDIR)/sympa_soap_server.fcgi
+	@if [ "$(enable_secure)" != "yes" ]; then \
+	    echo "Setting SetUID bit on sympa_soap_server.fcgi..."; \
+	    chmod u+s $(DESTDIR)$(CGIDIR)/sympa_soap_server.fcgi; \
+	    chmod g+s $(DESTDIR)$(CGIDIR)/sympa_soap_server.fcgi; \
+	fi
 	@for i in $(lib_SUBST) ; do \
 	chown $(USER) $(DESTDIR)$(LIBDIR)/$$i; \
 	chgrp $(GROUP) $(DESTDIR)$(LIBDIR)/$$i; \
Index: soap/sympa_soap_server.fcgi
--- soap/sympa_soap_server.fcgi.orig	2006-02-24 15:36:30 +0100
+++ soap/sympa_soap_server.fcgi	2006-06-05 09:51:25 +0200
@@ -52,7 +52,7 @@
 ## Open log
 $wwsconf->{'log_facility'}||= $Conf{'syslog'};
 
-&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'soap');
+&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'soap', $Conf{'logfile'});
 &Log::do_log('info', 'SOAP server launched');
 
 unless ($List::use_db = &List::check_db_connect()) {
Index: src/Conf.pm
--- src/Conf.pm.orig	2006-04-04 14:55:51 +0200
+++ src/Conf.pm	2006-06-05 09:51:25 +0200
@@ -42,7 +42,7 @@
 		       default_shared_quota default_archive_quota default_list_priority distribution_mode edit_list email etc
 		       global_remind home host domain lang listmaster listmaster_email localedir log_socket_type log_level 
 		       logo_html_definition misaddressed_commands misaddressed_commands_regexp max_size maxsmtp nrcpt 
-		       owner_priority pidfile pidfile_distribute
+		       owner_priority logfile pidfile pidfile_distribute
 		       spool queue queuedistribute queueauth queuetask queuebounce queuedigest 
 		       queuemod queuetopic queuesubscribe queueoutgoing tmpdir
 		       loop_command_max loop_command_sampling_delay loop_command_decrease_factor loop_prevention_regex
@@ -88,6 +88,7 @@
      'host'    => undef,
      'domain'  => undef,
      'email'   => 'sympa',
+     'logfile' => '--PIDDIR--/sympa.log',
      'pidfile' => '--PIDDIR--/sympa.pid',
      'pidfile_distribute' => '--PIDDIR--/sympa-distribute.pid',
      'localedir'  => '--LOCALEDIR--',
Index: src/Language.pm
--- src/Language.pm.orig	2006-04-10 17:54:26 +0200
+++ src/Language.pm	2006-06-05 09:51:25 +0200
@@ -169,7 +169,7 @@
 	    }	
 	}
 	unless ($success) {
-	    &do_log('err','Failed to setlocale(%s) ; you either have a problem with the catalogue .mo files or you should extend available locales in  your /etc/locale.gen (or /etc/sysconfig/i18n) file', $locale);
+	    # &do_log('err','Failed to setlocale(%s) ; you either have a problem with the catalogue .mo files or you should extend available locales in  your /etc/locale.gen (or /etc/sysconfig/i18n) file', $locale);
 	    return undef;
 	}
     }
Index: src/Log.pm
--- src/Log.pm.orig	2006-03-24 18:00:31 +0100
+++ src/Log.pm	2006-06-05 09:51:25 +0200
@@ -24,12 +24,13 @@
 package Log;
 
 require Exporter;
-use Sys::Syslog;
+use IO::File;
 use Carp;
 
 @ISA = qw(Exporter);
 @EXPORT = qw(fatal_err do_log do_openlog $log_level);
 
+my ($log_fh, $log_file);
 my ($log_facility, $log_socket_type, $log_service);
 local $log_level |= 0;
 
@@ -37,8 +38,6 @@
     my $m  = shift;
     my $errno  = $!;
     
-    syslog('err', $m, @_);
-    syslog('err', "Exiting.");
     $m =~ s/%m/$errno/g;
 
     my $full_msg = sprintf $m,@_;
@@ -72,9 +71,9 @@
     # do not log if log level if too high regarding the log requested by user 
     return if ($level > $log_level);
 
-    unless (syslog($fac, $m, @_)) {
+    unless (&do_write($fac, $level, $m, @_)) {
 	&do_connect();
-	    syslog($fac, $m, @_);
+	&do_write($fac, $level, $m, @_);
     }
     if ($main::options{'foreground'}) {
 	if ($main::options{'log_to_stderr'} || 
@@ -85,12 +84,24 @@
     }    
 }
 
+sub do_write {
+    my ($fac, $level, $fmt, @args) = @_;
+    if (defined($log_fh)) {
+        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
+        my $date = sprintf("%b %2d %02d:%02d:%02d", $mon+1, $mday, $hour, $min, $sec);
+        $log_fh->printf("%s %s[%d]: [%s.%s] $fmt\n", $date, $log_service, $$, $fac, $level, @args);
+        return 1;
+    }
+    else {
+        return 0;
+    }
+}
 
 sub do_openlog {
-   my ($fac, $socket_type, $service) = @_;
+   my ($fac, $socket_type, $service, $logfile) = @_;
    $service ||= 'sympa';
 
-   ($log_facility, $log_socket_type, $log_service) = ($fac, $socket_type, $service);
+   ($log_facility, $log_socket_type, $log_service, $log_file) = ($fac, $socket_type, $service, $logfile);
 
 #   foreach my $k (keys %options) {
 #       printf "%s = %s\n", $k, $options{$k};
@@ -100,12 +111,8 @@
 }
 
 sub do_connect {
-    if ($log_socket_type =~ /^(unix|inet)$/i) {
-      Sys::Syslog::setlogsock(lc($log_socket_type));
-    }
-    # close log may be usefull : if parent processus did open log child process inherit the openlog with parameters from parent process 
-    closelog ; 
-    openlog("$log_service\[$$\]", 'ndelay', $log_facility);
+    $log_fh->close() if defined($log_fh); 
+    $log_fh = new IO::File ">>$log_file";
 }
 
 1;
Index: src/alias_manager.pl
--- src/alias_manager.pl.orig	2006-01-04 14:16:30 +0100
+++ src/alias_manager.pl	2006-06-05 09:51:25 +0200
@@ -43,7 +43,7 @@
 my $tmp_alias_file = $Conf{'tmpdir'}.'/sympa_aliases.'.time;
 
 
-my $alias_wrapper = '--MAILERPROGDIR--/aliaswrapper';
+my $alias_wrapper = '--LIBEXECDIR--/aliaswrapper';
 my $lock_file = '--EXPL_DIR--/alias_manager.lock';
 my $default_domain;
 my $path_to_queue = '--MAILERPROGDIR--/queue';
Index: src/etc/script/mod2html.pl
--- src/etc/script/mod2html.pl.orig	2005-08-12 17:46:18 +0200
+++ src/etc/script/mod2html.pl	2006-06-05 09:51:25 +0200
@@ -12,7 +12,7 @@
 unless (Conf::load('--CONFIG--')) {
     die "Can't load Sympa configuration file";
 }
-&do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa');
+&do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa', $Conf{'logfile'});
 
 if ($Conf{'db_name'} and $Conf{'db_type'}) {
     unless ($List::use_db = &List::probe_db()) {
Index: src/etc/script/testlogs.pl
--- src/etc/script/testlogs.pl.orig	2003-03-12 08:49:34 +0100
+++ src/etc/script/testlogs.pl	2006-06-05 09:51:25 +0200
@@ -19,7 +19,7 @@
 
 
 ## Open the syslog and say we're read out stuff.
-do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa');
+do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa', $Conf{'logfile'});
 
 # setting log_level using conf unless it is set by calling option
 if ($main::options{'log_level'}) {
Index: src/sympa.pl
--- src/sympa.pl.orig	2006-03-30 14:50:18 +0200
+++ src/sympa.pl	2006-06-05 09:51:25 +0200
@@ -164,7 +164,7 @@
 }
 
 ## Open the syslog and say we're read out stuff.
-do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa');
+do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, 'sympa', $Conf{'logfile'});
 
 # setting log_level using conf unless it is set by calling option
 if ($main::options{'log_level'}) {
@@ -256,7 +256,7 @@
     my $service = 'sympa';
     $service .= '(message)' if ($main::daemon_usage eq 'message');
     $service .= '(command)' if ($main::daemon_usage eq 'command');
-    do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, $service);
+    do_openlog($Conf{'syslog'}, $Conf{'log_socket_type'}, $service, $Conf{'logfile'});
 
     do_log('debug', "Running server $$ with main::daemon_usage = $main::daemon_usage ");
     unless ($main::options{'batch'} ) {
Index: src/sympa_wizard.pl
--- src/sympa_wizard.pl.orig	2006-03-15 10:18:47 +0100
+++ src/sympa_wizard.pl	2006-06-05 09:51:25 +0200
@@ -65,6 +65,12 @@
 	       'query' => 'Directory for configuration files ; it also contains scenari/ and templates/ directories',
 	       'file' => 'sympa.conf'},
 
+	      {'name' => 'logfile',
+	       'default' => '--PIDDIR--/sympa.log',
+	       'query' => 'File to which Sympa logs.',
+	       'file' => 'sympa.conf',
+               'advice' =>'Sympa logs to this file instead of Syslog.'},
+
 	      {'name' => 'pidfile',
 	       'default' => '--PIDDIR--/sympa.pid',
 	       'query' => 'File containing Sympa PID while running.',
@@ -92,13 +98,13 @@
                'advice' =>''},
 
 	      {'name' => 'arc_path',
-	       'default' => '--DIR--/arc',
+	       'default' => '--DIR--/var/sympa/store/arc',
 	       'query' => 'Where to store HTML archives',
 	       'file' => 'wwsympa.conf','edit' => '1',
                'advice' =>'Better if not in a critical partition'},
 	      
 	      {'name' => 'bounce_path',
-	       'default' => '--DIR--/bounce',
+	       'default' => '--DIR--/var/sympa/store/bounce',
 	       'query' => 'Where to store bounces',
 	       'file' => 'wwsympa.conf',
                'advice' =>'Better if not in a critical partition'},
@@ -154,13 +160,13 @@
 	      {'title' => 'General definition'},
 	      
 	      {'name' => 'domain',
-	       'default' => '--HOST--',
+	       'default' => 'example.com',
 	       'query' => 'Main robot hostname',
 	       'file' => 'sympa.conf',
 	       'advice' =>''},
 	      
 	      {'name' => 'listmaster',
-	       'default' => 'your_email_address@--HOST--',
+	       'default' => 'listmaster@example.com',
 	       'query' => 'Listmasters email list comma separated',
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' =>'Sympa will associate listmaster privileges to these email addresses (mail and web interfaces). Some error reports may also be sent to these addresses.'},
@@ -268,7 +274,7 @@
 	      {'title' => 'MTA related'},
 
 	      {'name' => 'sendmail',
-	       'default' => '/usr/sbin/sendmail',
+	       'default' => '--DIR--/sbin/sendmail',
 	       'query' => 'Path to the MTA (sendmail, postfix, exim or qmail)',
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' => "should point to a sendmail-compatible binary (eg: a binary named \'sendmail\' is distributed with Postfix)"},
@@ -295,7 +301,7 @@
 	      {'title' => 'Pluggin'},
 
 	      {'name' => 'antivirus_path',
-	       'sample' => '/usr/local/uvscan/uvscan',
+	       'sample' => '--DIR--/bin/uvscan',
 	       'query' => 'Path to the antivirus scanner engine',
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' =>'supported antivirus : McAfee/uvscan, Fsecure/fsav, Sophos, AVP and Trend Micro/VirusWall'},
@@ -308,14 +314,14 @@
 	       'advice' =>''},
 
               {'name' => 'mhonarc',
-	       'default' => '/usr/bin/mhonarc',
+	       'default' => '--DIR--/bin/mhonarc',
 	       'query' => 'Path to MhOnarc mail2html pluggin',
 	       'file' => 'wwsympa.conf','edit' => '1',
 	       'advice' =>'This is required for HTML mail archiving'},
 
 	      {'title' => 'S/MIME pluggin'},
 	      {'name' => 'openssl',
-	       'sample' => '/usr/local/bin/openssl',
+	       'sample' => '--DIR--/bin/openssl',
 	       'query' => 'Path to OpenSSL',
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' =>'Sympa knowns S/MIME if openssl is installed'},
@@ -336,7 +342,7 @@
 	       'file' => 'sympa.conf'},
 
 	      {'name' => 'key_passwd',
-	       'sample' => 'your_password',
+	       'sample' => 'sympa',
 	       'query' => 'Password used to crypt lists private keys',
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' =>''},
@@ -373,7 +379,7 @@
 	       'advice' =>''},
 	      
 	      {'name' => 'db_passwd',
-	       'sample' => 'your_passwd',
+	       'sample' => 'sympa',
 	       'query' => 'Database password (associated to the db_user)',
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' =>'What ever you use a password or not, you must protect the SQL server (is it a not a public internet service ?)'},
@@ -404,7 +410,7 @@
 	       'advice' =>'This module provide much faster web interface'},
 
 	      {'name' => 'wwsympa_url',
-	       'default' => 'http://--HOST--/sympa',
+	       'default' => 'http://www.example.com/sympa',
 	       'query' => "Sympa\'s main page URL",
 	       'file' => 'sympa.conf','edit' => '1',
 	       'advice' =>''},
Index: src/task_manager.pl
--- src/task_manager.pl.orig	2006-04-19 15:21:17 +0200
+++ src/task_manager.pl	2006-06-05 09:51:25 +0200
@@ -119,7 +119,7 @@
 $log_level = $main::options{'log_level'} || $Conf{'log_level'};
 
 $wwsconf->{'log_facility'}||= $Conf{'syslog'};
-do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'task_manager');
+do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'task_manager', $Conf{'logfile'});
 
 # setting log_level using conf unless it is set by calling option
 if ($main::options{'log_level'}) {
Index: wwsympa/archived.pl
--- wwsympa/archived.pl.orig	2006-04-19 15:21:17 +0200
+++ wwsympa/archived.pl	2006-06-05 09:51:25 +0200
@@ -114,7 +114,7 @@
 $log_level = $main::options{'log_level'} || $Conf{'log_level'};
 
 $wwsconf->{'log_facility'}||= $Conf{'syslog'};
-do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'archived');
+do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'archived', $Conf{'logfile'});
 
 ## Set the UserID & GroupID for the process
 $( = $) = (getgrnam('--GROUP--'))[2];
Index: wwsympa/bounced.pl
--- wwsympa/bounced.pl.orig	2006-04-19 15:21:17 +0200
+++ wwsympa/bounced.pl	2006-06-05 09:51:25 +0200
@@ -142,7 +142,7 @@
 $log_level = $main::options{'log_level'} || $Conf{'log_level'};
 
 $wwsconf->{'log_facility'}||= $Conf{'syslog'};
-do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'bounced');
+do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'bounced', $Conf{'logfile'});
 
 ## Set the UserID & GroupID for the process
 $( = $) = (getgrnam('--GROUP--'))[2];
Index: wwsympa/wwsympa.fcgi
--- wwsympa/wwsympa.fcgi.orig	2006-06-01 15:15:56 +0200
+++ wwsympa/wwsympa.fcgi	2006-06-05 09:51:25 +0200
@@ -530,7 +530,7 @@
 ## Open log
 $wwsconf->{'log_facility'}||= $Conf{'syslog'};
 
-&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'wwsympa');
+&Log::do_openlog($wwsconf->{'log_facility'}, $Conf{'log_socket_type'}, 'wwsympa', $Conf{'logfile'});
 &do_log('info', 'WWSympa started');
 
 ## Set locale configuration	 
