summaryrefslogtreecommitdiffstats
path: root/korn/kconf_update/korn-3-5-ssl-update.pl
blob: b44ce10ff476394e1a30171f10c14a4fa8d81db6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
my $input;
my $group;
my $protocol;

while( $input = <STDIN> )
{
	chop $input;
	if( $input =~ /^\[.*\]$/ )
	{
		if( $input =~ /^\[(korn-(\d+)-\d+)\]$/ )
		{
			$group = $1;
		}
		else
		{
			$group = "";
		}
	}
	
	if( $input =~ /^protocol\=(.*)/ )
	{
		$protocol=$1;
		print "[$group]\n";
		if( $protocol eq "imaps" )
		{
			print "protocol=imap\n";
			print "ssl=true\n";
		}
		elsif( $protocol eq "pop3s" )
		{
			print "protocol=pop3\n";
			print "ssl=true\n";
		}
		else
		{
			print "ssl=false\n";
		}
	}
}