head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	PFIX-3-11-2:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.64
	netbsd-11-base:1.1.1.1
	PFIX-3-10-1:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	perseant-exfatfs-base-20240630:1.1.1.1
	perseant-exfatfs:1.1.1.1.0.62
	perseant-exfatfs-base:1.1.1.1
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	PFIX-3-8-4:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.60
	netbsd-10-base:1.1.1.1
	PFIX-3-7-3:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.58
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.56
	cjep_staticlib_x-base:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	PFIX-3-5-2:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.54
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-8-2-RELEASE:1.1.1.1
	PFIX-3-5-0:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.52
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	netbsd-8-0-RELEASE:1.1.1.1
	phil-wifi:1.1.1.1.0.50
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	pgoyette-compat-0415:1.1.1.1
	pgoyette-compat-0407:1.1.1.1
	pgoyette-compat-0330:1.1.1.1
	pgoyette-compat-0322:1.1.1.1
	pgoyette-compat-0315:1.1.1.1
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.1.1.1.0.48
	pgoyette-compat-base:1.1.1.1
	netbsd-7-1-1-RELEASE:1.1.1.1
	matt-nb8-mediatek:1.1.1.1.0.46
	matt-nb8-mediatek-base:1.1.1.1
	perseant-stdc-iso10646:1.1.1.1.0.44
	perseant-stdc-iso10646-base:1.1.1.1
	netbsd-8:1.1.1.1.0.42
	netbsd-8-base:1.1.1.1
	prg-localcount2-base3:1.1.1.1
	prg-localcount2-base2:1.1.1.1
	prg-localcount2-base1:1.1.1.1
	prg-localcount2:1.1.1.1.0.40
	prg-localcount2-base:1.1.1.1
	pgoyette-localcount-20170426:1.1.1.1
	bouyer-socketcan-base1:1.1.1.1
	pgoyette-localcount-20170320:1.1.1.1
	netbsd-7-1:1.1.1.1.0.38
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	PFIX-3-1-4:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.1.1.1.0.36
	bouyer-socketcan-base:1.1.1.1
	pgoyette-localcount-20170107:1.1.1.1
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.1.1.1
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.1.1.1
	netbsd-7-nhusb:1.1.1.1.0.34
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.32
	pgoyette-localcount-base:1.1.1.1
	netbsd-7-0-1-RELEASE:1.1.1.1
	netbsd-7-0:1.1.1.1.0.30
	netbsd-7-0-RELEASE:1.1.1.1
	PFIX-2-11-6:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	PFIX-2-11-4:1.1.1.1
	PFIX-2-11-3:1.1.1.1
	netbsd-5-2-3-RELEASE:1.1.1.1.2.2
	netbsd-5-1-5-RELEASE:1.1.1.1.2.2
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.1.0.28
	netbsd-7-base:1.1.1.1
	PFIX-2-11-1:1.1.1.1
	yamt-pagecache-base9:1.1.1.1
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.26
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	PFIX-2-10-3:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-5-2-2-RELEASE:1.1.1.1.2.2
	netbsd-5-1-4-RELEASE:1.1.1.1.2.2
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	PFIX-2-10-2:1.1.1.1
	netbsd-5-2-1-RELEASE:1.1.1.1.2.2
	netbsd-5-1-3-RELEASE:1.1.1.1.2.2
	PFIX-2-9-7:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.20
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.24
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.22
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	PFIX-2-9-5:1.1.1.1
	netbsd-5-2:1.1.1.1.2.2.0.6
	PFIX-2-8-13:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	netbsd-5-2-RELEASE:1.1.1.1.2.2
	netbsd-5-2-RC1:1.1.1.1.2.2
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.18
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.16
	tls-maxphys-base:1.1.1.1
	matt-nb6-plus:1.1.1.1.0.14
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	PFIX-2-8-12:1.1.1.1
	PFIX-2-8-11:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	PFIX-2-8-8:1.1.1.1
	netbsd-6:1.1.1.1.0.12
	netbsd-6-base:1.1.1.1
	netbsd-5-1-2-RELEASE:1.1.1.1.2.2
	netbsd-5-1-1-RELEASE:1.1.1.1.2.2
	yamt-pagecache-base3:1.1.1.1
	PFIX-2-8-7:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.10
	yamt-pagecache-base:1.1.1.1
	PFIX-2-8-6:1.1.1.1
	PFIX-2-8-5:1.1.1.1
	PFIX-2-8-4:1.1.1.1
	cherry-xenmp:1.1.1.1.0.8
	cherry-xenmp-base:1.1.1.1
	PFIX-2-8-3:1.1.1.1
	PFIX-2-8-2:1.1.1.1
	PFIX-2-8-1:1.1.1.1
	bouyer-quota2-nbase:1.1.1.1
	bouyer-quota2:1.1.1.1.0.6
	bouyer-quota2-base:1.1.1.1
	matt-mips64-premerge-20101231:1.1.1.1
	matt-nb5-mips64-premerge-20101231:1.1.1.1.4.2
	matt-nb5-pq3:1.1.1.1.2.2.0.4
	matt-nb5-pq3-base:1.1.1.1.2.2
	PFIX-2-7-2:1.1.1.1
	netbsd-5-1:1.1.1.1.2.2.0.2
	netbsd-5-1-RELEASE:1.1.1.1.2.2
	netbsd-5-1-RC4:1.1.1.1.2.2
	matt-nb5-mips64-k15:1.1.1.1.4.2
	PFIX-2-7-1:1.1.1.1
	netbsd-5-1-RC3:1.1.1.1.2.2
	netbsd-5-1-RC2:1.1.1.1.2.2
	netbsd-5-1-RC1:1.1.1.1.2.2
	matt-nb5-mips64:1.1.1.1.0.4
	PFIX-2-6-6:1.1.1.1
	matt-premerge-20091211:1.1.1.1
	netbsd-5:1.1.1.1.0.2
	PFIX-2-6-5:1.1.1.1
	PFIX-2-6-2:1.1.1.1
	VENEMA:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2009.06.23.10.08.36;	author tron;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2009.06.23.10.08.36;	author tron;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.4.1;
next	;

1.1.1.1.2.1
date	2009.06.23.10.08.36;	author snj;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2009.09.15.06.02.21;	author snj;	state Exp;
branches;
next	;

1.1.1.1.4.1
date	2009.06.23.10.08.36;	author matt;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2010.04.21.05.23.38;	author matt;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#!/usr/bin/perl

# Usage: xpostdef postconf.proto >postconf.proto.new

# Update parameter default values in postconf prototype file.

$POSTCONF="postconf";

# Read all the default parameter values. This also provides us with
# a list of all the parameters that postconf knows about.

open(POSTCONF, "$POSTCONF -d|") || die "cannot run $POSTCONF -d: !$\n";
while(<POSTCONF>) {
    chop;
    if (($name, $defval) = split(/\s+=\s+/, $_, 2)) {
	$defval =~ s/&/\&amp;/g;
	$defval =~ s/</\&lt;/g;
	$defval =~ s/>/\&gt;/g;
	$defval =~ s/\s+$//;
	$defaults{$name} = $defval;
    } else {
	die "unexpected $POSTCONF output: $_\n";
    }
}
close(POSTCONF) || die "$POSTCONF failed: $!\n"; 

# Censor out default values that are system or version dependent, or
# that don't display well.

$censored = <<EOF;
alias_database
alias_maps
command_directory
command_expansion_filter
config_directory
daemon_directory
default_database_type
default_rbl_reply
execution_directory_expansion_filter
export_environment
forward_expansion_filter
forward_path
html_directory
import_environment
mail_release_date
mail_spool_directory
mail_version
mailbox_delivery_lock
mailq_path
manpage_directory
mydomain
myhostname
mynetworks
newaliases_path
parent_domain_matches_subdomains
proxy_read_maps
queue_directory
readme_directory
sendmail_path
smtpd_expansion_filter
tls_random_source
virtual_mailbox_lock
milter_connect_macros
milter_helo_macros
milter_mail_macros
milter_rcpt_macros
milter_data_macros
milter_unknown_command_macros
milter_end_of_data_macros
EOF

for $name (split(/\s+/, $censored)) {
    $defaults{$name} = "see \"postconf -d\" output";
}

# Process the postconf prototype file, and update default values
# with output from the postconf command. Leave alone any defaults
# that postconf didn't know about. This can happen when conditional
# features have been compile time disabled.

$name = $defval = $text = $line = "";

while(<>) {
    if (/^%PARAM/) {

	# Print the updated parameter text. Keep the old default if
	# postconf doesn't have a suitable one.

	if ($name) {
	    $defval = $defaults{$name} if (defined($defaults{$name}));
	    print "%PARAM $name $defval\n";
	}
	print $text;

	# Reset the parameter name, default, and accumulated text.

	$name = $defval = $text = $line = "";

	# Accumulate the parameter name and default value.

	do {
	    $_ =~ s/\s+$//;
	    $line .= " " . $_;
	} while(($_ = <POSTCONF>) && /^../);
	($junk, $class, $name, $defval) = split(/\s+/, $line, 4);
    } else {

	# Accumulate the text in the parameter definition.

	$_ =~ s/\s+$/\n/;
	$text .= $_;

    }
}

# Fix the last parameter.

if ($name && $text) {
    $defval = $defaults{$name} if (defined($defaults{$name}));
    print "%PARAM $name $defval\n$text";
}
@


1.1.1.1
log
@Import Postfix 2.6.2.
@
text
@@


1.1.1.1.4.1
log
@file xpostdef was added on branch matt-nb5-mips64 on 2010-04-21 05:23:38 +0000
@
text
@d1 121
@


1.1.1.1.4.2
log
@sync to netbsd-5
@
text
@a0 121
#!/usr/bin/perl

# Usage: xpostdef postconf.proto >postconf.proto.new

# Update parameter default values in postconf prototype file.

$POSTCONF="postconf";

# Read all the default parameter values. This also provides us with
# a list of all the parameters that postconf knows about.

open(POSTCONF, "$POSTCONF -d|") || die "cannot run $POSTCONF -d: !$\n";
while(<POSTCONF>) {
    chop;
    if (($name, $defval) = split(/\s+=\s+/, $_, 2)) {
	$defval =~ s/&/\&amp;/g;
	$defval =~ s/</\&lt;/g;
	$defval =~ s/>/\&gt;/g;
	$defval =~ s/\s+$//;
	$defaults{$name} = $defval;
    } else {
	die "unexpected $POSTCONF output: $_\n";
    }
}
close(POSTCONF) || die "$POSTCONF failed: $!\n"; 

# Censor out default values that are system or version dependent, or
# that don't display well.

$censored = <<EOF;
alias_database
alias_maps
command_directory
command_expansion_filter
config_directory
daemon_directory
default_database_type
default_rbl_reply
execution_directory_expansion_filter
export_environment
forward_expansion_filter
forward_path
html_directory
import_environment
mail_release_date
mail_spool_directory
mail_version
mailbox_delivery_lock
mailq_path
manpage_directory
mydomain
myhostname
mynetworks
newaliases_path
parent_domain_matches_subdomains
proxy_read_maps
queue_directory
readme_directory
sendmail_path
smtpd_expansion_filter
tls_random_source
virtual_mailbox_lock
milter_connect_macros
milter_helo_macros
milter_mail_macros
milter_rcpt_macros
milter_data_macros
milter_unknown_command_macros
milter_end_of_data_macros
EOF

for $name (split(/\s+/, $censored)) {
    $defaults{$name} = "see \"postconf -d\" output";
}

# Process the postconf prototype file, and update default values
# with output from the postconf command. Leave alone any defaults
# that postconf didn't know about. This can happen when conditional
# features have been compile time disabled.

$name = $defval = $text = $line = "";

while(<>) {
    if (/^%PARAM/) {

	# Print the updated parameter text. Keep the old default if
	# postconf doesn't have a suitable one.

	if ($name) {
	    $defval = $defaults{$name} if (defined($defaults{$name}));
	    print "%PARAM $name $defval\n";
	}
	print $text;

	# Reset the parameter name, default, and accumulated text.

	$name = $defval = $text = $line = "";

	# Accumulate the parameter name and default value.

	do {
	    $_ =~ s/\s+$//;
	    $line .= " " . $_;
	} while(($_ = <POSTCONF>) && /^../);
	($junk, $class, $name, $defval) = split(/\s+/, $line, 4);
    } else {

	# Accumulate the text in the parameter definition.

	$_ =~ s/\s+$/\n/;
	$text .= $_;

    }
}

# Fix the last parameter.

if ($name && $text) {
    $defval = $defaults{$name} if (defined($defaults{$name}));
    print "%PARAM $name $defval\n$text";
}
@


1.1.1.1.2.1
log
@file xpostdef was added on branch netbsd-5 on 2009-09-15 06:02:21 +0000
@
text
@d1 121
@


1.1.1.1.2.2
log
@Apply patch (requested by tron in ticket #944):
Update Postfix to 2.6.5.
@
text
@a0 121
#!/usr/bin/perl

# Usage: xpostdef postconf.proto >postconf.proto.new

# Update parameter default values in postconf prototype file.

$POSTCONF="postconf";

# Read all the default parameter values. This also provides us with
# a list of all the parameters that postconf knows about.

open(POSTCONF, "$POSTCONF -d|") || die "cannot run $POSTCONF -d: !$\n";
while(<POSTCONF>) {
    chop;
    if (($name, $defval) = split(/\s+=\s+/, $_, 2)) {
	$defval =~ s/&/\&amp;/g;
	$defval =~ s/</\&lt;/g;
	$defval =~ s/>/\&gt;/g;
	$defval =~ s/\s+$//;
	$defaults{$name} = $defval;
    } else {
	die "unexpected $POSTCONF output: $_\n";
    }
}
close(POSTCONF) || die "$POSTCONF failed: $!\n"; 

# Censor out default values that are system or version dependent, or
# that don't display well.

$censored = <<EOF;
alias_database
alias_maps
command_directory
command_expansion_filter
config_directory
daemon_directory
default_database_type
default_rbl_reply
execution_directory_expansion_filter
export_environment
forward_expansion_filter
forward_path
html_directory
import_environment
mail_release_date
mail_spool_directory
mail_version
mailbox_delivery_lock
mailq_path
manpage_directory
mydomain
myhostname
mynetworks
newaliases_path
parent_domain_matches_subdomains
proxy_read_maps
queue_directory
readme_directory
sendmail_path
smtpd_expansion_filter
tls_random_source
virtual_mailbox_lock
milter_connect_macros
milter_helo_macros
milter_mail_macros
milter_rcpt_macros
milter_data_macros
milter_unknown_command_macros
milter_end_of_data_macros
EOF

for $name (split(/\s+/, $censored)) {
    $defaults{$name} = "see \"postconf -d\" output";
}

# Process the postconf prototype file, and update default values
# with output from the postconf command. Leave alone any defaults
# that postconf didn't know about. This can happen when conditional
# features have been compile time disabled.

$name = $defval = $text = $line = "";

while(<>) {
    if (/^%PARAM/) {

	# Print the updated parameter text. Keep the old default if
	# postconf doesn't have a suitable one.

	if ($name) {
	    $defval = $defaults{$name} if (defined($defaults{$name}));
	    print "%PARAM $name $defval\n";
	}
	print $text;

	# Reset the parameter name, default, and accumulated text.

	$name = $defval = $text = $line = "";

	# Accumulate the parameter name and default value.

	do {
	    $_ =~ s/\s+$//;
	    $line .= " " . $_;
	} while(($_ = <POSTCONF>) && /^../);
	($junk, $class, $name, $defval) = split(/\s+/, $line, 4);
    } else {

	# Accumulate the text in the parameter definition.

	$_ =~ s/\s+$/\n/;
	$text .= $_;

    }
}

# Fix the last parameter.

if ($name && $text) {
    $defval = $defaults{$name} if (defined($defaults{$name}));
    print "%PARAM $name $defval\n$text";
}
@


