From kmail-devel Mon Feb 18 21:26:48 2002 From: Ingo =?iso-8859-1?q?Kl=F6cker?= Date: Mon, 18 Feb 2002 21:26:48 +0000 To: kmail-devel Subject: Re: [PATCH] KDE 2 -> KDE 3: upgrade SMTP/sendmail configuration X-MARC-Message: https://marc.info/?l=kmail-devel&m=101406833820391 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------Boundary-00=_OKZQMUP8DOIYQ0ZZEAYO" --------------Boundary-00=_OKZQMUP8DOIYQ0ZZEAYO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 18 February 2002 08:51, Michael H=E4ckel wrote: > On Sunday 17 February 2002 22:32:22, Ingo Kl=F6cker wrote: > > I didn't knew that there is a 'transports' counter. It shouldn't be > > difficult to add that. At least I hope so. The worst case would be > > to parse the whole config file. But as something like this was > > already write for klipper it shouldn't be too hard to implement. > > You could possibly add a transports key to the "Transport 1" section > you write anyway and then move this later with the normal > kconf_update functions to "General". Much to complicated. ;-) I just had to add the following two lines to the perl script: print "\n[General]\n"; print "transports=3D1\n"; kconf_update is really great. Regards, Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8cXGZGnR+RTDgudgRAne5AKCJcrdAVKSwkjgC/V40t7aetzQ0BgCgwyj0 cfhr3q3101s0MjTjMkmCR8Q=3D =3DyIrg -----END PGP SIGNATURE----- --------------Boundary-00=_OKZQMUP8DOIYQ0ZZEAYO Content-Type: text/x-perl; charset="iso-8859-1"; 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"; } print "\n[General]\n"; print "transports=1\n"; --------------Boundary-00=_OKZQMUP8DOIYQ0ZZEAYO-- _______________________________________________ kmail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail