From kmail-devel Sat Feb 16 18:56:15 2002 From: Ingo =?iso-8859-1?q?Kl=F6cker?= Date: Sat, 16 Feb 2002 18:56:15 +0000 To: kmail-devel Subject: [PATCH] KDE 2 -> KDE 3: upgrade SMTP/sendmail configuration X-MARC-Message: https://marc.info/?l=kmail-devel&m=101388596312414 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------Boundary-00=_R93NU4XSOJ4PULKDB4JE" --------------Boundary-00=_R93NU4XSOJ4PULKDB4JE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, the attached perl script together with the small change in kmail.upd=20 (and Makefile.am) will upgrade the SMTP/sendmail configuration during=20 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=3D =3DyO9t -----END PGP SIGNATURE----- --------------Boundary-00=_R93NU4XSOJ4PULKDB4JE Content-Type: text/x-perl; charset="us-ascii"; name="upgrade-transport.pl" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="upgrade-transport.pl" #!/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"; } --------------Boundary-00=_R93NU4XSOJ4PULKDB4JE Content-Type: text/x-diff; charset="us-ascii"; name="upgrade-transport.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="upgrade-transport.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 --------------Boundary-00=_R93NU4XSOJ4PULKDB4JE-- _______________________________________________ kmail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail