[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipfire-scm
Subject:    [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 7577ec1eb17f727e6397b1e6457c05df
From:       git () ipfire ! org (Michael Tremer)
Date:       2015-08-25 13:03:33
Message-ID: 20150825130345.A03342262A () argus ! ipfire ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  7577ec1eb17f727e6397b1e6457c05dfef0c3371 (commit)
       via  8f4af2b25a4c514c6c7405c0665b6be3b93a04c4 (commit)
       via  1986cc88a18168c01fbc5eb2b50c34a945307cd7 (commit)
       via  fa39f287c7dbedebae5d5f6b9b6c8492c2cabe93 (commit)
       via  9c19634a3c3200c4e12396aeb0b0e09d78cca55e (commit)
       via  8d1b6fcf4ac367a32e393c01cc8f3270fd420f76 (commit)
       via  982ac2f7a25992ebd23fe14b46388077f8a299d6 (commit)
       via  d70462b6a44f92f6eea7c4b6668c4f1ed0c49259 (commit)
       via  701984cab3fb4f892e00215abdff17e757cbe8c0 (commit)
       via  999241446a4452ba0a5ab56c6a8084b916398b5b (commit)
       via  9c7b90207ed941175f4f906f038e1966fea1d362 (commit)
       via  fb79f85b49d9304185463195d627d046672701c6 (commit)
       via  de849bc570c26f206bf02f5b6db043363d0e5afd (commit)
       via  5267e19c3ae2cbadb67434d832f612ca0b3e1734 (commit)
       via  42edc41f30b5ec4a45534598fe5a5901ceb8a88b (commit)
      from  a6b15086d96af7b10b280cbb897e7b2200a37e53 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7577ec1eb17f727e6397b1e6457c05dfef0c3371
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Aug 25 14:02:49 2015 +0100

    core94: Ship changes from dma branch
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 8f4af2b25a4c514c6c7405c0665b6be3b93a04c4
Merge: a6b1508 1986cc8
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Aug 25 13:57:40 2015 +0100

    Merge branch 'dma' into next

commit 1986cc88a18168c01fbc5eb2b50c34a945307cd7
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Tue Aug 25 14:11:44 2015 +0200

    dma: add loggingoption to weblog for mail
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit fa39f287c7dbedebae5d5f6b9b6c8492c2cabe93
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Mon Aug 24 11:49:15 2015 +0200

    dma: fix rootfile

commit 9c19634a3c3200c4e12396aeb0b0e09d78cca55e
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Aug 21 21:08:02 2015 +0100

    Revert "chkconfig: Include configuration directories recursively"
    
    This reverts commit fb79f85b49d9304185463195d627d046672701c6.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 8d1b6fcf4ac367a32e393c01cc8f3270fd420f76
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Aug 21 21:07:39 2015 +0100

    Rootfile update
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 982ac2f7a25992ebd23fe14b46388077f8a299d6
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Aug 21 09:54:20 2015 +0100

    postfix: Uninstall sendmail alternative when uninstalling
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit d70462b6a44f92f6eea7c4b6668c4f1ed0c49259
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Aug 21 09:52:55 2015 +0100

    dma: Update rootfile
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 701984cab3fb4f892e00215abdff17e757cbe8c0
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Aug 21 09:52:43 2015 +0100

    dma: Fix rebuild if directory already exists
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 999241446a4452ba0a5ab56c6a8084b916398b5b
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Aug 21 09:50:26 2015 +0100

    dma: Make installing sendmail link more robust
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 9c7b90207ed941175f4f906f038e1966fea1d362
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Fri Aug 21 09:46:26 2015 +0100

    Add web UI for the system MTA
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit fb79f85b49d9304185463195d627d046672701c6
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Thu Aug 20 10:12:56 2015 +0200

    chkconfig: Include configuration directories recursively
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit de849bc570c26f206bf02f5b6db043363d0e5afd
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Thu Aug 13 14:45:11 2015 +0200

    dma: New package
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 5267e19c3ae2cbadb67434d832f612ca0b3e1734
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Thu Aug 20 10:00:37 2015 +0200

    make postfix ready for alternatives (chkconfig)
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 42edc41f30b5ec4a45534598fe5a5901ceb8a88b
Author: Alexander Marx <alexander.marx@ipfire.org>
Date:   Thu Aug 20 09:11:01 2015 +0200

    Add Perl modules needed by dma to compose mails
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/backup/includes/dma                         |   5 +
 config/menu/40-services.menu                       |   5 +
 config/rootfiles/common/Email-Date-Format          |   8 +
 config/rootfiles/common/MIME-Lite                  |   6 +
 config/rootfiles/common/dma                        |  12 +
 config/rootfiles/common/web-user-interface         |   1 +
 .../rootfiles/core/94/filelists/Email-Date-Format  |   1 +
 config/rootfiles/core/94/filelists/MIME-Lite       |   1 +
 config/rootfiles/core/94/filelists/dma             |   1 +
 config/rootfiles/core/94/filelists/files           |   3 +
 config/rootfiles/core/94/update.sh                 |   7 +
 config/rootfiles/packages/postfix                  |   2 +-
 html/cgi-bin/logs.cgi/log.dat                      |   4 +
 html/cgi-bin/mail.cgi                              | 345 +++++++++++++++++++++
 langs/de/cgi-bin/de.pl                             |  20 ++
 langs/en/cgi-bin/en.pl                             |  20 ++
 lfs/{perl-PDF-API2 => dma}                         |  22 +-
 lfs/{GD-Graph => perl-Email-Date-Format}           |   6 +-
 lfs/{which => perl-MIME-Lite}                      |   8 +-
 lfs/postfix                                        |   3 +-
 make.sh                                            |   3 +
 src/paks/postfix/install.sh                        |   3 +
 src/paks/postfix/uninstall.sh                      |   1 +
 23 files changed, 469 insertions(+), 18 deletions(-)
 create mode 100644 config/backup/includes/dma
 create mode 100644 config/rootfiles/common/Email-Date-Format
 create mode 100644 config/rootfiles/common/MIME-Lite
 create mode 100644 config/rootfiles/common/dma
 create mode 120000 config/rootfiles/core/94/filelists/Email-Date-Format
 create mode 120000 config/rootfiles/core/94/filelists/MIME-Lite
 create mode 120000 config/rootfiles/core/94/filelists/dma
 create mode 100755 html/cgi-bin/mail.cgi
 copy lfs/{perl-PDF-API2 => dma} (83%)
 copy lfs/{GD-Graph => perl-Email-Date-Format} (96%)
 copy lfs/{which => perl-MIME-Lite} (95%)

Difference in files:
diff --git a/config/backup/includes/dma b/config/backup/includes/dma
new file mode 100644
index 0000000..7c75205
--- /dev/null
+++ b/config/backup/includes/dma
@@ -0,0 +1,5 @@
+/var/ipfire/dma
+/var/ipfire/dma/dma.conf
+/var/ipfire/dma/auth.conf
+/var/ipfire/dma/mail.conf
+/var/spool/dma
diff --git a/config/menu/40-services.menu b/config/menu/40-services.menu
index 2f4d96e..aaf1ad7 100644
--- a/config/menu/40-services.menu
+++ b/config/menu/40-services.menu
@@ -20,6 +20,11 @@
 				'title' => "$Lang::tr{'time server'}",
 				'enabled' => 1,
 				};
+    $subservices->{'41.dma'} = {'caption' => $Lang::tr{'email settings'},
+				'uri' => '/cgi-bin/mail.cgi',
+				'title' => "$Lang::tr{'email settings'}",
+				'enabled' => 1,
+				};
     $subservices->{'50.qos'} = {'caption' => 'Quality of Service',
 				'uri' => '/cgi-bin/qos.cgi',
 				'title' => "Quality of Service",
diff --git a/config/rootfiles/common/Email-Date-Format \
b/config/rootfiles/common/Email-Date-Format new file mode 100644
index 0000000..dbfab85
--- /dev/null
+++ b/config/rootfiles/common/Email-Date-Format
@@ -0,0 +1,8 @@
+#usr/lib/perl5/site_perl/5.12.3/Email
+#usr/lib/perl5/site_perl/5.12.3/Email/Date
+usr/lib/perl5/site_perl/5.12.3/Email/Date/Format.pm
+#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/Email
+#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/Email/Date
+#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/Email/Date/Format
+#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/Email/Date/Format/.packlist
 +#usr/share/man/man3/Email::Date::Format.3
diff --git a/config/rootfiles/common/MIME-Lite b/config/rootfiles/common/MIME-Lite
new file mode 100644
index 0000000..89248ae
--- /dev/null
+++ b/config/rootfiles/common/MIME-Lite
@@ -0,0 +1,6 @@
+usr/lib/perl5/site_perl/5.12.3/MIME/Lite.pm
+#usr/lib/perl5/site_perl/5.12.3/MIME/changes.pod
+#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/MIME/Lite
+#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/MIME/Lite/.packlist
+#usr/share/man/man3/MIME::Lite.3
+#usr/share/man/man3/MIME::changes.3
diff --git a/config/rootfiles/common/dma b/config/rootfiles/common/dma
new file mode 100644
index 0000000..24c365d
--- /dev/null
+++ b/config/rootfiles/common/dma
@@ -0,0 +1,12 @@
+etc/alternatives/sendmail
+usr/lib/dma-mbox-create
+usr/sbin/dma
+usr/sbin/mailq
+usr/sbin/sendmail
+usr/sbin/sendmail.dma
+#usr/share/man/man8/dma.8
+var/ipfire/dma
+var/ipfire/dma/auth.conf
+var/ipfire/dma/dma.conf
+var/lib/alternatives/sendmail
+var/spool/dma
diff --git a/config/rootfiles/common/web-user-interface \
b/config/rootfiles/common/web-user-interface index dc22367..d22c1a3 100644
--- a/config/rootfiles/common/web-user-interface
+++ b/config/rootfiles/common/web-user-interface
@@ -48,6 +48,7 @@ srv/web/ipfire/cgi-bin/logs.cgi/showrequestfromport.dat
 srv/web/ipfire/cgi-bin/logs.cgi/summary.dat
 srv/web/ipfire/cgi-bin/logs.cgi/urlfilter.dat
 srv/web/ipfire/cgi-bin/mac.cgi
+srv/web/ipfire/cgi-bin/mail.cgi
 srv/web/ipfire/cgi-bin/mdstat.cgi
 srv/web/ipfire/cgi-bin/media.cgi
 srv/web/ipfire/cgi-bin/memory.cgi
diff --git a/config/rootfiles/core/94/filelists/Email-Date-Format \
b/config/rootfiles/core/94/filelists/Email-Date-Format new file mode 120000
index 0000000..b98751e
--- /dev/null
+++ b/config/rootfiles/core/94/filelists/Email-Date-Format
@@ -0,0 +1 @@
+../../../common/Email-Date-Format
\ No newline at end of file
diff --git a/config/rootfiles/core/94/filelists/MIME-Lite \
b/config/rootfiles/core/94/filelists/MIME-Lite new file mode 120000
index 0000000..c388805
--- /dev/null
+++ b/config/rootfiles/core/94/filelists/MIME-Lite
@@ -0,0 +1 @@
+../../../common/MIME-Lite
\ No newline at end of file
diff --git a/config/rootfiles/core/94/filelists/dma \
b/config/rootfiles/core/94/filelists/dma new file mode 120000
index 0000000..60f4682
--- /dev/null
+++ b/config/rootfiles/core/94/filelists/dma
@@ -0,0 +1 @@
+../../../common/dma
\ No newline at end of file
diff --git a/config/rootfiles/core/94/filelists/files \
b/config/rootfiles/core/94/filelists/files index 2dce10a..a603603 100644
--- a/config/rootfiles/core/94/filelists/files
+++ b/config/rootfiles/core/94/filelists/files
@@ -1,4 +1,7 @@
 etc/system-release
 etc/issue
 etc/rc.d/init.d/sshd
+srv/web/ipfire/cgi-bin/logs.cgi/log.dat
+srv/web/ipfire/cgi-bin/mail.cgi
 var/ipfire/langs
+var/ipfire/menu/40-services.menu
diff --git a/config/rootfiles/core/94/update.sh b/config/rootfiles/core/94/update.sh
index 1ba38e0..d820b11 100644
--- a/config/rootfiles/core/94/update.sh
+++ b/config/rootfiles/core/94/update.sh
@@ -54,6 +54,13 @@ mv -f /etc/ssh/ssh_host_rsa_key{,.old}
 # Update crontab
 sed -i /var/spool/cron/root.orig -e "/Force an update once a month/d"
 sed -i /var/spool/cron/root.orig -e "/ddns update-all --force/d"
+
+grep -qv "dma -q" || cat <<EOF >> /var/spool/cron/root.orig
+
+# Retry sending spooled mails regularly
+%hourly * /usr/sbin/dma -q
+EOF
+
 fcrontab -z &>/dev/null
 
 # Start services
diff --git a/config/rootfiles/packages/postfix b/config/rootfiles/packages/postfix
index c347bb8..bc4739d 100644
--- a/config/rootfiles/packages/postfix
+++ b/config/rootfiles/packages/postfix
@@ -68,7 +68,7 @@ usr/sbin/postmap
 usr/sbin/postmulti
 usr/sbin/postqueue
 usr/sbin/postsuper
-usr/sbin/sendmail
+usr/sbin/sendmail.postfix
 #usr/share/man/man1/mailq.1
 #usr/share/man/man1/newaliases.1
 #usr/share/man/man1/postalias.1
diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
index 1813862..e8635d7 100644
--- a/html/cgi-bin/logs.cgi/log.dat
+++ b/html/cgi-bin/logs.cgi/log.dat
@@ -53,6 +53,7 @@ my %sections = (
         'red' => '(red:|pppd\[.*\]: \
|chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: \
ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])',  'ddns' => \
'(ddns\[\d+\]:)',  'dns' => '(dnsmasq\[.*\]: )',
+        'dma' => '(dma\[.*\]: )',
         'dhcp' => '(dhcpd: )',
         'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )',
         'collectd' => '(collectd\[.*\]: )',
@@ -73,6 +74,7 @@ my %trsections = (
         'red' => 'RED',
         'ddns' => $Lang::tr{'dynamic dns'},
         'dns' => 'DNS',
+        'dma' => 'Mail',
         'dhcp' => "$Lang::tr{'dhcp server'}",
         'cron' => 'Cron',
         'collectd' => 'Collectd',
@@ -192,8 +194,10 @@ while ($gzindex >=0 && $loop) {
         # calculate file name
         if ($gzindex == 0) {
             $filestr = "/var/log/messages";
+            $filestr = "/var/log/mail" if (${section} =~ 'dma');
         } else {
             $filestr = "/var/log/messages.$gzindex";
+            $filestr = "/var/log/mail.$gzindex" if (${section} =~ 'dma');
     	    $filestr = "$filestr.gz" if -f "$filestr.gz";
         }
 	# now read file if existing
diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi
new file mode 100755
index 0000000..d409a4c
--- /dev/null
+++ b/html/cgi-bin/mail.cgi
@@ -0,0 +1,345 @@
+#!/usr/bin/perl
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2015  IPFire Team  <alexander.marx@ipfire.org>                #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+ 
+use MIME::Lite;
+ 
+#enable only the following on debugging purpose
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
+
+require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
+require "${General::swroot}/header.pl";
+
+#Initialize variables and hashes
+my $dmafile="${General::swroot}/dma/dma.conf";
+my $authfile="${General::swroot}/dma/auth.conf";
+my $mailfile="${General::swroot}/dma/mail.conf";
+my %dma=();
+my %auth=();
+my %mail=();
+my %mainsettings=();
+my %cgiparams=();
+my $errormessage='';
+
+#Read all parameters for site
+&Header::getcgihash(\%cgiparams);
+&General::readhash("${General::swroot}/main/settings", \%mainsettings);
+&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \
\%color); +
+#Show Headers
+&Header::showhttpheaders();
+
+#Check configfiles
+if ( -f $dmafile){
+	open (FILE, "<", $dmafile) or die $!;
+	foreach my $line (<FILE>) {
+		$line =~ m/^([A-Z]+)\s+?(.*)?$/;
+		my $key = $1;
+		my $val = $2;
+		$dma{$key}=$val;
+	}
+}else{
+	open(FILE, ">$dmafile") or die $!;
+}
+close FILE;
+
+if (exists $dma{'AUTHPATH'}){
+	open (FILE, "<", $dma{'AUTHPATH'}) or die "$dma{'AUTHPATH'} nicht gefunden $! ";
+	my $authline;
+	foreach my $line (<FILE>) {
+		$authline = $line;
+	}
+	my @part1 = split(/\|/,$authline);
+	my @part2 = split(/\:/,$part1[1]);
+	$auth{'AUTHNAME'} = $part1[0];
+	$auth{'AUTHHOST'} = $part2[0];
+	$auth{'AUTHPASS'} = $part2[1];
+}
+
+if ( -f $mailfile){
+	&General::readhash($mailfile, \%mail);
+}
+
+#ACTIONS
+if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #SaveButton on configsite
+	#Check fields
+	if ($cgiparams{'USEMAIL'} eq 'on'){
+		$errormessage=&checkmailsettings;
+	}else{
+		$cgiparams{'txt_mailserver'}='';
+		$cgiparams{'txt_mailport'}='';
+		$cgiparams{'txt_mailuser'}='';
+		$cgiparams{'txt_mailpass'}='';
+		$cgiparams{'mail_tls'}='';
+		$cgiparams{'txt_mailsender'}='';
+		$cgiparams{'txt_recipient'}='';
+	}
+	if(!$errormessage){
+		#clear hashes
+		%auth=();
+		%dma=();
+		%mail=();
+
+		#clear configfiles
+		open (TXT, ">$dmafile") or die("Could not open /var/ipfire/dma/dma.conf: $!\n");
+		open (TXT1, ">$authfile") or die("Could not open /var/ipfire/dma/dma.conf: $!\n");
+		open (TXT2, ">$mailfile") or die("Could not open /var/ipfire/dma/dma.conf: $!\n");
+		close TXT2;
+
+		#Fill hashes with actual values
+		$mail{'USEMAIL'}		= $cgiparams{'USEMAIL'};
+		$mail{'SENDER'} 		= $cgiparams{'txt_mailsender'};
+		$mail{'RECIPIENT'}		= $cgiparams{'txt_recipient'};
+
+		$auth{'AUTHNAME'}		= $cgiparams{'txt_mailuser'};
+		$auth{'AUTHPASS'}		= $cgiparams{'txt_mailpass'};
+		$auth{'AUTHHOST'}		= $cgiparams{'txt_mailserver'};
+
+		$dma{'SMARTHOST'}		= $cgiparams{'txt_mailserver'};
+		$dma{'PORT'}			= $cgiparams{'txt_mailport'};
+		$dma{'STARTTLS'}		= '' if ($cgiparams{'mail_tls'});
+		$dma{'SECURETRANSFER'}	= '' if exists $dma{'STARTTLS'};
+		$dma{'SPOOLDIR'}		= "/var/spool/dma";
+		$dma{'FULLBOUNCE'}		= '';
+		$dma{'MAILNAME'}		= "$mainsettings{'HOSTNAME'}.$mainsettings{DOMAINNAME}";
+		$dma{'AUTHPATH'}		= "$authfile" if exists $auth{'AUTHNAME'};
+
+		#Create new configfiles
+		&General::writehash("$mailfile", \%mail);
+		while ( ($k,$v) = each %dma ) {
+			print TXT "$k $v\n";
+		}
+		close TXT;
+		print TXT1 "$auth{'AUTHNAME'}|$auth{'AUTHHOST'}:$auth{'AUTHPASS'}\n";
+		close TXT2;
+
+	}else{
+		$cgiparams{'update'}='on';
+		&configsite;
+	}
+}
+if ($cgiparams{'ACTION'} eq "$Lang::tr{'email testmail'}"){ #Testmail button on \
configsite +	&testmail;
+}
+
+#Show site
+&configsite;
+
+#FUNCTIONS
+sub configsite{
+	
+
+	#If update set fieldvalues new
+	if($cgiparams{'update'} eq 'on'){
+		$dma{'USEMAIL'}= 'on';
+		$dma{'SMARTHOST'} 	= $cgiparams{'txt_mailserver'};
+		$dma{'PORT'} 		= $cgiparams{'txt_mailport'};
+		$auth{'AUTHUSER'} 	= $cgiparams{'txt_mailuser'};
+		$auth{'AUTHHOST'}	= $cgiparams{'txt_mailserver'};
+		$auth{'AUTHPASS'} 	= $cgiparams{'txt_mailpass'};
+	}
+	#find preselections
+	$checked{'usemail'}{$mail{'USEMAIL'}}	= 'CHECKED';
+	$checked{'mail_tls'}{'on'}				= 'CHECKED' if exists $dma{'STARTTLS'};
+	
+	#Open site
+	&Header::openpage($Lang::tr{'email settings'}, 1, '');
+	&Header::openbigbox('100%', 'center');
+	&error;
+	&info;
+	&Header::openbox('100%', 'left', $Lang::tr{'email config'});
+	
+	#### JAVA SCRIPT ####
+	print<<END;
+<script>
+	\$(document).ready(function() {
+		// Show/Hide elements when USEMAIL checkbox is checked.
+		if (\$("#MAIL").attr("checked")) {
+			\$(".MAILSRV").show();
+		} else {
+			\$(".MAILSRV").hide();
+		}
+
+		// Toggle MAIL elements when "USEMAIL" checkbox is clicked
+		\$("#MAIL").change(function() {
+			\$(".MAILSRV").toggle();
+		});
+	});
+</script>
+END
+	##### JAVA SCRIPT END ####
+	my $col="style='background-color:$color{'color22'}'";
+	print<<END;
+	<form method='post' action='$ENV{'SCRIPT_NAME'}'>
+	<table style='width:100%' border='0'>
+	<tr>
+		<th colspan='3'></th>
+	</tr>
+	<tr>
+		<td style='width:24em'>$Lang::tr{'email usemail'}</td>
+		<td><label><input type='checkbox' name='USEMAIL' id='MAIL' \
$checked{'usemail'}{'on'}></label></td> +		<td></td>
+	</tr>
+	</table><br>
+
+	<div class="MAILSRV">
+		<table style='width:100%;'>
+		<tr>
+			<td style='width:24em'>$Lang::tr{'email mailaddr'}</td>
+			<td><input type='text' name='txt_mailserver' value='$dma{'SMARTHOST'}' \
style='width:22em;'></td> +		</tr>
+		<tr>
+			<td>$Lang::tr{'email mailport'}</td>
+			<td><input type='text' name='txt_mailport' value='$dma{'PORT'}' size='3'></td>
+		</tr>
+		<tr>
+			<td>$Lang::tr{'email mailuser'}<img src='/blob.gif' alt='*' /></td>
+			<td><input type='text' name='txt_mailuser' value='$auth{'AUTHNAME'}' \
style='width:22em;'></td> +		</tr>
+		<tr>
+			<td>$Lang::tr{'email mailpass'}<img src='/blob.gif' alt='*' /></td>
+			<td><input type='password' name='txt_mailpass' value='$auth{'AUTHPASS'}' \
style='width:22em;' ></td> +		</tr>
+		<tr>
+			<td>$Lang::tr{'email tls'}</td>
+			<td><input type='checkbox' name='mail_tls' $checked{'mail_tls'}{'on'}></td>
+		</tr>
+		<tr>
+			<td>$Lang::tr{'email mailsender'}</td>
+			<td><input type='text' name='txt_mailsender' value='$mail{'SENDER'}' \
style='width:22em;'></td> +		</tr>
+		<tr>
+			<td>$Lang::tr{'email mailrcpt'}</td>
+			<td><input type='text' name='txt_recipient' value='$mail{'RECIPIENT'}' \
style='width:22em;'></td> +		</tr>
+END
+		if (! -z $dmafile && $mail{'USEMAIL'} eq 'on'){
+			print "<tr>";
+			print "<td></td>";
+			print "<td><input type='submit' name='ACTION' value='$Lang::tr{'email \
testmail'}'></td>"; +			print "</tr>";
+		}
+		print<<END;;
+		<tr>
+			<td colspan='2'>&nbsp;</td>
+		</tr>
+		</table>
+	</div>
+
+	<table style='width:100%;'>
+	<tr>
+		<td colspan='3' display:inline align='right'><input type='submit' name='ACTION' \
value='$Lang::tr{'save'}'></td> +	</tr>
+	</table>
+	<br>
+	</form>
+END
+	&Header::closebox();
+	&Header::closebigbox();	
+	&Header::closepage();
+	exit 0;
+}
+
+sub checkmailsettings {
+	#Check if mailserver is an ip address or a domain
+	if ($cgiparams{'txt_mailserver'} =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/){
+		if (! &General::validip($cgiparams{'txt_mailserver'})){
+			$errormessage.="$Lang::tr{'email invalid mailip'} \
$cgiparams{'txt_mailserver'}<br>"; +		}
+	}elsif(! &General::validfqdn($cgiparams{'txt_mailserver'})){
+			$errormessage.="$Lang::tr{'email invalid mailfqdn'} \
$cgiparams{'txt_mailserver'}<br>"; +	}
+	#Check valid mailserverport
+	if($cgiparams{'txt_mailport'} < 1 || $cgiparams{'txt_mailport'} > 65535){
+		$errormessage.="$Lang::tr{'email invalid mailport'} \
$cgiparams{'txt_mailport'}<br>"; +	}
+	#Check valid sender
+	if(! $cgiparams{'txt_mailsender'}){
+		$errormessage.="$Lang::tr{'email empty field'} $Lang::tr{'email mailsender'}<br>";
+	}else{
+		if (! &General::validemail($cgiparams{'txt_mailsender'})){
+			$errormessage.="<br>$Lang::tr{'email invalid'} $Lang::tr{'email \
mailsender'}<br>"; +		}
+	}
+	return $errormessage;
+}
+
+sub testmail {
+	### Create a new multipart message:
+	$msg = MIME::Lite->new(
+		From	=> $mail{'SENDER'},
+		To		=> $mail{'RECIPIENT'},
+		#Cc		=> 'some@other.com, some@more.com',
+		Subject	=> 'IPFire Testmail',
+		Type	=> 'multipart/mixed'
+	);
+
+	### Add parts (each "attach" has same arguments as "new"):
+	$msg->attach(
+		Type	=> 'TEXT',
+		Data	=> "This is the IPFire test mail."
+	);
+
+	### Add attachment for testing
+	#$msg->attach(
+	#	Type     => 'application/txt',
+	#	Encoding => 'base64',
+	#	Path     => '/var/ipfire/dma/dma.conf',
+	#	Filename => 'dma.conf',
+	#	Disposition => 'attachment'
+	#);
+
+	$msg->send_by_sendmail;
+}
+
+sub info {
+	if ($infomessage) {
+		&Header::openbox('100%', 'left', $Lang::tr{'info messages'});
+		print "<class name='base'>$infomessage\n";
+		print "&nbsp;</class>\n";
+		&Header::closebox();
+	}
+}
+
+sub error {
+	if ($errormessage) {
+		&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
+		print "<class name='base'>$errormessage\n";
+		print "&nbsp;</class>\n";
+		&Header::closebox();
+	}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index 48ade28..36b54b8 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -833,6 +833,26 @@
 'edit share' => 'Freigabe bearbeiten',
 'editor' => 'Editor',
 'eg' => 'z.B.:',
+'email invalid mailip' => 'Ungültige IP-Adresse für Mailserver',
+'email invalid mailfqdn' => 'Ungültiger FQDN für Mailserver',
+'email invalid mailport' => 'Ungültiger Port für Mailserver',
+'email empty field' => 'Leeres Feld',
+'email mailaddr' => 'Mailserver-Adresse',
+'email mailport' => 'Mailserver-Port',
+'email mailuser' => 'Benutzername',
+'email mailpass' => 'Passwort',
+'email tls' => 'TLS aktivieren',
+'email mailrcpt' => 'E-Mail-Empfänger',
+'email mailsender' => 'E-Mail Absender',
+'email usemail' => 'Mailversand aktivieren',
+'email settings' => 'Mailversand',
+'email config' => 'Konfiguration',
+'email subject' => 'IPFire Testmail',
+'email text' => 'Testnachricht vom IPFire Mailversand.',
+'email testmail' => 'Testnachricht senden',
+'email success' => 'Testmail erfolgreich versendet',
+'email error' => 'ERROR: Testmail konnte nicht versendet werden',
+'email invalid' => 'Ungültiges Feld',
 'email server can not be empty' => 'Email-Server darf nicht leer sein',
 'emailreportlevel' => 'Email-Reportlevel',
 'empty' => 'Dieses Feld kann leer bleiben',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index af7fda9..ef5f50b 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -859,6 +859,26 @@
 'edit share' => 'Edit share',
 'editor' => 'Editor',
 'eg' => 'e.g.:',
+'email invalid mailip' => 'Invalid mailserver IP address',
+'email invalid mailfqdn' => 'Invalid mailserver fqdn',
+'email invalid mailport' => 'Invalid mailserver port',
+'email empty field' => 'Empty field',
+'email mailaddr' => 'Mailserver address',
+'email mailport' => 'Mailserver port',
+'email mailuser' => 'Username',
+'email mailpass' => 'Password',
+'email tls' => 'Use TLS',
+'email mailrcpt' => 'Mail recipient',
+'email mailsender' => 'Mail sender',
+'email usemail' => 'Activate Mailservice',
+'email settings' => 'Mailservice',
+'email config' => 'Configuration',
+'email subject' => 'IPFire Testmail',
+'email text' => 'Testmail from IPFire Mailservice.',
+'email testmail' => 'Send testmail',
+'email success' => 'Testmail successfully sent',
+'email error' => 'ERROR: Testmail could not be sent',
+'email invalid' => 'Invalid field',
 'email server can not be empty' => 'E-mail server can not be empty',
 'emailreportlevel' => 'E-mailreportlevel',
 'emerging rules' => 'Emergingthreats.net Community Rules',
diff --git a/lfs/dma b/lfs/dma
new file mode 100644
index 0000000..4e6150e
--- /dev/null
+++ b/lfs/dma
@@ -0,0 +1,86 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2011  IPFire Team  <info@ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 0.9.1
+
+THISAPP    = dma-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = dma
+PAK_VER    = 1
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 56afaf438ba34d4ff9c8879dc29a16b1
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	mkdir -pv /var/ipfire/dma
+	cd $(DIR_APP) && sed -i '/PREFIX/s/usr\/local/usr/g' Makefile
+	cd $(DIR_APP) && sed -i '/CONFDIR/s/etc\/dma/var\/ipfire\/dma/g' Makefile
+	cd $(DIR_APP) && make
+	cd $(DIR_APP) && make install mailq-link install-spool-dirs install-etc
+	chown -R nobody.nobody /var/ipfire/dma
+	chown nobody.root /var/ipfire/dma/auth.conf
+	ln -svf dma /usr/sbin/sendmail.dma
+	/usr/sbin/alternatives --install /usr/sbin/sendmail sendmail /usr/sbin/sendmail.dma \
20 +	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/lfs/perl-Email-Date-Format b/lfs/perl-Email-Date-Format
new file mode 100644
index 0000000..ce55d14
--- /dev/null
+++ b/lfs/perl-Email-Date-Format
@@ -0,0 +1,77 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 1.005
+
+THISAPP    = Email-Date-Format-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 030dcee3bc1a44674900b0132925bd03
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && perl Makefile.PL
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/lfs/perl-MIME-Lite b/lfs/perl-MIME-Lite
new file mode 100644
index 0000000..c6f53e6
--- /dev/null
+++ b/lfs/perl-MIME-Lite
@@ -0,0 +1,77 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 3.030
+
+THISAPP    = MIME-Lite-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 5a6d90329e049eee77248d667343acc7
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && yes |perl Makefile.PL
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/lfs/postfix b/lfs/postfix
index fd33253..5810c56 100644
--- a/lfs/postfix
+++ b/lfs/postfix
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = postfix
-PAK_VER    = 8
+PAK_VER    = 9
 
 DEPS       = "amavisd mysql"
 
@@ -115,5 +115,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
 	install -v -m 644 $(DIR_SRC)/config/backup/includes/postfix \
 			 /var/ipfire/backup/addons/includes/postfix
+	mv /usr/sbin/sendmail /usr/sbin/sendmail.postfix
 	@rm -rf $(DIR_APP)
 	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 3687976..4032fc2 100755
--- a/make.sh
+++ b/make.sh
@@ -641,6 +641,7 @@ buildipfire() {
   ipfiremake clamav
   ipfiremake spamassassin
   ipfiremake amavisd
+  ipfiremake dma
   ipfiremake alsa
   ipfiremake mpfire
   ipfiremake guardian
@@ -713,6 +714,8 @@ buildipfire() {
   ipfiremake perl-Net-SMTP-SSL
   ipfiremake perl-MIME-Base64
   ipfiremake perl-Authen-SASL
+  ipfiremake perl-MIME-Lite
+  ipfiremake perl-Email-Date-Format
   ipfiremake git
   ipfiremake squidclamav
   ipfiremake vnstat
diff --git a/src/paks/postfix/install.sh b/src/paks/postfix/install.sh
index 0932d2e..1629d21 100644
--- a/src/paks/postfix/install.sh
+++ b/src/paks/postfix/install.sh
@@ -34,3 +34,6 @@ start_service ${NAME}
 ln -sf  ../init.d/postfix /etc/rc.d/rc0.d/K25postfix
 ln -sf  ../init.d/postfix /etc/rc.d/rc3.d/S35postfix
 ln -sf  ../init.d/postfix /etc/rc.d/rc6.d/K25postfix
+
+# Update alternatives
+/usr/sbin/alternatives --install /usr/sbin/sendmail sendmail \
                /usr/sbin/sendmail.postfix 15
diff --git a/src/paks/postfix/uninstall.sh b/src/paks/postfix/uninstall.sh
index bc70451..bff411a 100644
--- a/src/paks/postfix/uninstall.sh
+++ b/src/paks/postfix/uninstall.sh
@@ -25,5 +25,6 @@
 extract_backup_includes
 stop_service ${NAME}
 make_backup ${NAME}
+/usr/sbin/alternatives --remove sendmail /usr/sbin/sendmail.postfix
 remove_files
 rm -rfv /etc/rc.d/rc*.d/*postfix


hooks/post-receive
--
IPFire 2.x development tree



_______________________________________________
IPFire-SCM mailing list
IPFire-SCM@lists.ipfire.org
http://lists.ipfire.org/mailman/listinfo/ipfire-scm


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic