[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: [PATCH] KDE 2 -> KDE 3: upgrade SMTP/sendmail configuration
From: Ingo =?iso-8859-1?q?Kl=F6cker?= <ingo.kloecker () epost ! de>
Date: 2002-02-16 18:56:15
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
the attached perl script together with the small change in kmail.upd
(and Makefile.am) will upgrade the SMTP/sendmail configuration during
the KDE 2 -> KDE 3 upgrade.
Please review!
Regards,
Ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8bqtPGnR+RTDgudgRArDvAJ9ZQCdJFenjSjVWmLjV3eqAeWt4iQCgl3xr
6DtWna8wEClouuQzSfgKxD0=
=yO9t
-----END PGP SIGNATURE-----
["upgrade-transport.pl" (text/x-perl)]
#!/usr/bin/perl
my (%data);
#read in all the data and split it up into hashes.
while (<>) {
$data{$1} = $2 if /^([^=]*)=(.*)$/;
}
# Delete obsolete entries from the [sending mail] section
print "# DELETE Mailer\n";
print "# DELETE Method\n";
print "# DELETE Precommand\n";
print "# DELETE Smtp Host\n";
print "# DELETE Smtp Password\n";
print "# DELETE Smtp Port\n";
print "# DELETE Smtp Username\n";
# Write entries to the [Transport 1] section
print "precommand=$data{'Precommand'}\n";
print "port=$data{'Smtp Port'}\n";
if ($data{'Method'} eq "smtp") {
print "type=smtp\n";
print "host=$data{'Smtp Host'}\n";
print "name=$data{'Smtp Host'}\n";
}
else {
print "type=sendmail\n";
print "host=$data{'Mailer'}\n";
print "name=Sendmail\n";
}
["upgrade-transport.diff" (text/x-diff)]
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdenetwork/kmail/Makefile.am,v
retrieving revision 1.133
diff -u -3 -p -r1.133 Makefile.am
--- Makefile.am 2002/01/05 11:18:09 1.133
+++ Makefile.am 2002/02/16 14:22:34
@@ -53,7 +53,7 @@ rcdir = $(kde_datadir)/kmail
rc_DATA = kmcomposerui.rc kmmainwin.rc
updatedir = $(kde_datadir)/kconf_update
-update_DATA = kmail.upd
+update_DATA = kmail.upd upgrade-transport.pl
messages: rc.cpp
$(XGETTEXT) *.cpp *.h -o $(podir)/kmail.pot
Index: kmail.upd
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmail.upd,v
retrieving revision 1.7
diff -u -3 -p -r1.7 kmail.upd
--- kmail.upd 2001/12/23 17:56:00 1.7
+++ kmail.upd 2002/02/16 14:22:40
@@ -2,8 +2,7 @@
Id=1
File=kmailrc,kmailrc
Group=sending mail,Transport 1
-Key=Smtp Host,host
-Key=Smtp Port,port
+Script=upgrade-transport.pl,perl
# Remove passwords in the old format
Id=3
File=kmailrc
_______________________________________________
kmail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic