Package postfix: Specfile

   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
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
Name: postfix
Version: 3.8.3
Release: alt1
Epoch: 1

Summary: Postfix Mail Transport Agent
License: EPL-2.0 and IPL-1.0
Group: System/Servers
Url: https://www.postfix.org/

# Repacked ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%version.tar.gz
Source: %name-%version.tar

Patch: postfix-%version-%release.patch

%def_with cdb
%def_with ldap
%def_with mysql
%def_with pcre
%def_with pgsql
%def_with sasl
%def_with cyrus
%def_with tls

# Chrooted environment
%define ROOT /var/spool/%name

# Configuration definitions below are here for both customization
# and to simplify building list of files for a package (converting
# postfix-files list to rpm's filelist).

%define _libexecdir /usr/libexec

%define queue_directory %_var/spool/%name
%define config_directory %_sysconfdir/%name

%define plugin_directory %_libdir/%name
%define daemon_directory %_libexecdir/%name
%define data_directory %_localstatedir/%name
%define program_directory %daemon_directory
%define command_directory %_sbindir

%define newaliases_path %_bindir/newaliases
%define mailq_path %_bindir/mailq
%define sendmail_path %_sbindir/sendmail

%define docdir %_docdir/%name-%version
%define manpage_directory %_mandir
%define html_directory %docdir/html
%define readme_directory %config_directory/README_FILES

%define mail_admin mailadm
%define mail_owner postfix
%define setgid_group postdrop
%define default_privs postman

%define libpostfix lib%name-%version.so
%define libpostfix_dict lib%{name}_dict-%version.so

%define _buildaltdir %_builddir/%name-%version/%name-%version/alt

Provides: MTA, MailTransportAgent
Provides: smtpd, smtpdaemon, %name-smtpd
Conflicts: sendmail, masqmail, exim
Obsoletes: %name-beta, %name-smtpd
Requires(pre): sendmail-common >= 1.3, chrooted >= 0.3, %name-control >= 1.6

# This is used to be MDA, but default postfix main.cf uses procmail.
Requires: procmail

BuildPreReq: rpm-build >= 4.0.4-alt0.3, sendmail-common >= 1.3, chrooted >= 0.3
%{?_with_cdb:BuildPreReq: libcdb-devel}
%{?_with_pcre:BuildPreReq: libpcre-devel}
%{?_with_ldap:BuildPreReq: libldap-devel}
%{?_with_mysql:BuildPreReq: libMySQL-devel}
%{?_with_pgsql:BuildPreReq: postgresql-devel}
%{?_with_cyrus:BuildPreReq: libsasl2-devel}
%{?_with_tls:BuildPreReq: libssl-devel}

# Automatically added by buildreq on Fri Oct 31 2003
BuildRequires: groff-base html2text libdb4-devel

%description
Postfix is Wietse Venema's attempt to provide an alternative to the
widely-used Sendmail program.  Postfix attempts to be fast, easy to
administer, and hopefully secure, while at the same time being sendmail
compatible enough to not upset your users.

%package ldap
Summary: LDAP map support for Postfix
Group: System/Servers
Requires: %name = %EVR

%description ldap
This package provides support for LDAP maps in Postfix.

%package mysql
Summary: MySQL map support for Postfix
Group: System/Servers
Requires: %name = %EVR

%description mysql
This package provides support for MySQL maps in Postfix.

%package pcre
Summary: PCRE map support for Postfix
Group: System/Servers
Requires: %name = %EVR

%description pcre
This package provides support for PCRE maps in Postfix.

%package pgsql
Summary: PostgreSQL map support for Postfix
Group: System/Servers
Requires: %name = %EVR

%description pgsql
This package provides support for PostgreSQL maps in Postfix.

%package cyrus
Summary: Cyrus SASL plugin for Postfix
Group: System/Servers
Requires: %name = %EVR

%description cyrus
This package provides Cyrus SASL support for Postfix.

%package dovecot
Summary: Dovecot SASL plugin for Postfix
Group: System/Servers
Requires: %name = %EVR

%description dovecot
This package provides Dovecot SASL support for Postfix.

%package tls
Summary: SSL/TLS support for Postfix
Group: System/Servers
Requires: %name = %EVR

%description tls
This package provides support for SSL/TLS in Postfix.

%package html
Summary: html documentation for Postfix
Group: System/Servers
BuildArch: noarch
Requires: %name = %EVR

%description html
This package provides documentation for Postfix in html format.

%package test-tools
Summary: Postfix testing tools
Group: System/Servers

%description test-tools
Various postfix testing tools

%prep
%setup -cT -a0
cd %name-%version
%patch -p1

find -type f -print0 |
	xargs -r0 grep -FZl @libdir@ -- |
	xargs -r0 sed -i 's,@libdir@,%_libdir,g' --

# Remove license, makedefs.out, html documentation, man pages, readme files and sample files from master list.
sed -i '/\(LICENSE\|makedefs\.out\|\(html\|manpage\|readme\|sample\)_directory\)/ d' conf/%name-files
rm -f conf/LICENSE

# Adjust arch-dependent paths.
sed -i s,@LIB@,%_lib, conf/%name-files

# Fix build with util-linux-ng.
sed -i 's/col -bx |/LANG=en_US &/' proto/Makefile.in

if [ "%_libexecdir" != "/usr/libexec" ]; then
	find -type f -print0 |
		xargs -r0 grep -FZl /usr/libexec -- |
		xargs -r0 sed -i 's,/usr/libexec,%_libexecdir,g' --
fi

# Create mynetworks and mydestination.
install -pm644 %_buildaltdir/mynetworks conf/
touch conf/mydestination

# Set executable bit on scripts we are going to execute later.
chmod a+x postfix-install

# Force documentation re-generation
touch -t 01010000 man/*/* html/*

%if_with tls
cp -a . ../%name-%version-tls

sed -i 's/^PROG[[:space:]]*=.*/&-tls/' ../%name-%version-tls/src/{smtp,smtpd}/Makefile.in
%endif

# Change program names for smtp and smtpd.
sed -i 's/^PROG[[:space:]]*=.*/&-std/' src/{smtp,smtpd}/Makefile.in

# More std/tls tweaks for filelist.
sed -i 's,^.*/\(smtp\|smtpd\),&-std,' conf/%name-files

# comment out tls.*
sed -i 's/[^#]*tls/#&/' conf/%name-files

### BUILD ###
%build
OPT="%optflags -fno-strict-aliasing -Wno-comment -Wno-missing-braces"
CCARGS="\
 -DNO_NIS \
 -DDEF_COMMAND_DIR=\\\"%command_directory\\\" \
 -DDEF_CONFIG_DIR=\\\"%config_directory\\\" \
 -DDEF_DAEMON_DIR=\\\"%daemon_directory\\\" \
 -DDEF_DATA_DIR=\\\"%data_directory\\\" \
 -DDEF_SHLIB_DIR=\\\"%plugin_directory\\\" \
 -DDEF_HTML_DIR=\\\"%html_directory\\\" \
 -DDEF_MAILQ_PATH=\\\"%mailq_path\\\" \
 -DDEF_MANPAGE_DIR=\\\"%manpage_directory\\\" \
 -DDEF_NEWALIAS_PATH=\\\"%newaliases_path\\\" \
 -DDEF_PROGRAM_DIR=\\\"%program_directory\\\" \
 -DDEF_QUEUE_DIR=\\\"%queue_directory\\\" \
 -DDEF_README_DIR=\\\"%readme_directory\\\" \
 -DDEF_SAMPLE_DIR=\\\"%readme_directory\\\" \
 -DDEF_SENDMAIL_PATH=\\\"%sendmail_path\\\" \
"
DICTS=
DICT_LIBS="-ldb"
DICT_ARGS=
SYSLIBS="-lresolv -ldl"
AUXLIBS=

%if_with sasl
# USE_SASL_AUTH is used by smtp, smtpd and xsasl
CCARGS="$CCARGS -DUSE_SASL_AUTH"
%endif #with sasl

%if_with cyrus
CCARGS="$CCARGS -DUSE_CYRUS_SASL -I%{_includedir}/sasl"
%endif #with cyrus

%if_with cdb
DICT_ARGS="$DICT_ARGS -DHAS_CDB"
DICT_LIBS="$DICT_LIBS -lcdb"
AUXLIBS_CDB="$(pkg-config --libs libcdb)"
%endif #with cdb

%if_with ldap
DICT_ARGS="$DICT_ARGS -DHAS_LDAP"
DICTS="$DICTS \$(DICT_LDAP)"
AUXLIBS_LDAP="-lldap -llber"
%endif #with ldap

%if_with mysql
DICT_ARGS="$DICT_ARGS -DHAS_MYSQL -I%_includedir/mysql"
DICTS="$DICTS \$(DICT_MYSQL)"
AUXLIBS_MYSQL="$(mysql_config --libs) -lm"
%endif #with mysql

%if_with pcre
DICT_ARGS="$DICT_ARGS -DHAS_PCRE $(pcre-config --cflags)"
DICTS="$DICTS \$(DICT_PCRE)"
AUXLIBS_PCRE="$(pcre-config --libs)"
%endif #with pcre

%if_with pgsql
DICT_ARGS="$DICT_ARGS -DHAS_PGSQL -I%_includedir/pgsql"
DICTS="$DICTS \$(DICT_PGSQL)"
AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
%endif #with pgsql

%if_with tls
# USE_TLS is used by smtp, smtpd, tls and tlsmgr
TLS_ARGS="-DUSE_TLS $(pkg-config libssl --cflags)"
TLS_LIBS='-lssl -lcrypto'
%endif #with tls

make -C %name-%version \
	tidy makefiles \
	shared=yes pie=yes dynamicmaps=yes \
	SYSLIBS="$SYSLIBS" \
	AUXLIBS="$AUXLIBS" \
	AUXLIBS_PCRE="$AUXLIBS_PCRE" \
	AUXLIBS_CDB="$AUXLIBS_CDB" \
	AUXLIBS_LDAP="$AUXLIBS_LDAP" \
	AUXLIBS_MYSQL="$AUXLIBS_MYSQL" \
	AUXLIBS_PGSQL="$AUXLIBS_PGSQL" \
	AUXLIBS_SQLITE="$AUXLIBS_SQLITE" \
	CCARGS="$CCARGS $DICT_ARGS" \
	OPT="$OPT" \
	DEBUG= \
	SHLIB_RPATH= \
	#

%make_build -C %name-%version \
	static_libtls=yes \
	%{?_with_sasl:XSASLS='$(DOVECOT_PLUGIN)%{?_with_cyrus: $(CYRUS_PLUGIN)}'} \
	#

%if_with tls
make -C %name-%version-tls \
	tidy makefiles \
	shared=yes pie=yes dynamicmaps=yes \
	SYSLIBS="$SYSLIBS" \
	AUXLIBS="$AUXLIBS $TLS_LIBS" \
	AUXLIBS_PCRE="$AUXLIBS_PCRE" \
	AUXLIBS_CDB="$AUXLIBS_CDB" \
	AUXLIBS_LDAP="$AUXLIBS_LDAP" \
	AUXLIBS_MYSQL="$AUXLIBS_MYSQL" \
	AUXLIBS_PGSQL="$AUXLIBS_PGSQL" \
	AUXLIBS_SQLITE="$AUXLIBS_SQLITE" \
	CCARGS="$CCARGS $DICT_ARGS $TLS_ARGS" \
	OPT="$OPT" \
	DEBUG= \
	SHLIB_RPATH= \
	#

%make_build -C %name-%version-tls \
	%{?_with_sasl:XSASLS='$(DOVECOT_PLUGIN)%{?_with_cyrus: $(CYRUS_PLUGIN)}'} \
	#
%endif

# SMP build seems to be broken here.
for d in proto man html; do
	make -C %name-%version/$d -f Makefile.in clobber
done
make -C %name-%version manpages

cd %name-%version
install -pm644 /usr/share/sendmail-common/aliases conf/
mkdir -p libexec/postqueue
mv bin/postqueue libexec/postqueue/
cd -

### INSTALL ###
%install
mkdir -p %buildroot{%ROOT,%_bindir,%_sbindir,%_libdir,%daemon_directory/postqueue,%plugin_directory,%_mandir}

:>%name.files

make -C %name-%version non-interactive-package \
       %{?_with_sasl:XSASLS='$(XSASL_DOVECOT)%{?_with_cyrus: $(XSASL_CYRUS)}'} \
       install_root=%buildroot \
       shlib_directory=%{plugin_directory} \
       config_directory=%{config_directory} \
       meta_directory=%{config_directory} \
       daemon_directory=%{daemon_directory} \
       command_directory=%{command_directory} \
       queue_directory=%{queue_directory} \
       data_directory=%{data_directory} \
       sendmail_path=%{sendmail_path} \
       newaliases_path=%{newaliases_path} \
       mailq_path=%{mailq_path} \
       mail_owner=%{mail_owner} \
       setgid_group=%{setgid_group} \
       manpage_directory=%{manpage_directory} \
       sample_directory=%{readme_directory} \
       readme_directory=%{readme_directory} \
       tempdir=%_tmppath \
       static_libtls=yes \
       #

%if_with ldap
install -p -m644 %name-%version/lib/dict_ldap.so \
	%buildroot%plugin_directory/
%endif #with ldap

%if_with mysql
install -p -m644 %name-%version/lib/dict_mysql.so \
	%buildroot%plugin_directory/
%endif #with mysql

%if_with pcre
install -p -m644 %name-%version/lib/dict_pcre.so \
	%buildroot%plugin_directory/
%endif #with pcre

%if_with pgsql
install -p -m644 %name-%version/lib/dict_pgsql.so \
	%buildroot%plugin_directory/
%endif #with pgsql

%if_with sasl
install -p -m644 %name-%version/lib/xsasl_*.so \
	%buildroot%plugin_directory/
%endif

install -pm644 %name-%version/lib/libpostfix-*.so %buildroot%_libdir/

cat %name-%version/%name.files > %name.files

# install testing tools
install %name-%version/bin/*-* %buildroot%_bindir/

# install minimal main.cf
mv %buildroot%config_directory/main.cf{,.dist}
install -pm644 %_buildaltdir/main.cf %buildroot%config_directory/

# prepare for std
for i in smtp smtpd; do
	ln -snf $i-std %buildroot%daemon_directory/$i
done
ln -snf smtp %buildroot%daemon_directory/lmtp

%if_with tls
install -pm755 %name-%version-tls/libexec/{*-tls,tlsmgr,tlsproxy,postfix-tls-script} %buildroot%daemon_directory/
install -pm755 %name-%version-tls/bin/posttls* %buildroot%_bindir/
install -pm644 %name-%version-tls/lib/libpostfix-tls.so %buildroot%_libdir/
%endif #with tls

# Finish postqueue install.
chmod 700 %buildroot%daemon_directory/postqueue
ln -rsnf %buildroot%daemon_directory/postqueue/postqueue \
	%buildroot%command_directory/

install -pD -m755 %_buildaltdir/init \
	%buildroot%_initdir/%name
install -pD -m644 %_buildaltdir/%name.service \
	%buildroot%_unitdir/%name.service
install -pD -m755 %_buildaltdir/cron.daily \
	%buildroot%_sysconfdir/cron.daily/%name
install -pD -m750 %_buildaltdir/chroot.lib \
	%buildroot%_sysconfdir/chroot.d/%name.lib
install -pD -m750 %_buildaltdir/chroot.conf \
	%buildroot%_sysconfdir/chroot.d/%name.conf
install -pD -m750 %_buildaltdir/chroot.all \
	%buildroot%_sysconfdir/chroot.d/%name.all
%if_with tls
install -pm755 %_buildaltdir/postfix-generate-ssl-certificate \
	%buildroot%_sbindir/
%endif #with tls

# Install /etc/aliases.
ln -rsnf %buildroot%config_directory/aliases %buildroot%_sysconfdir/

# Install manpages
cp -a %name-%version/man/man{1,5,8} %buildroot%manpage_directory/

# Install qshape and rmail.
install -p -m755 %name-%version/auxiliary/qshape/qshape.pl %buildroot%_bindir/qshape
install -p -m755 %name-%version/auxiliary/rmail/rmail %buildroot%_bindir/

rm -rf %buildroot%docdir
mkdir -p %buildroot%docdir

(cd %name-%version; cp -a html examples *README* COMPATIBILITY HISTORY LICENSE PORTING RELEASE_NOTES \
	%buildroot%docdir/)
xz -9 %buildroot%docdir/HISTORY
%if_with tls
mkdir -p %buildroot%docdir/tls
cp -a %name-%version/TLS_* %buildroot%docdir/
xz -9 %buildroot%docdir/TLS_CHANGES
%endif #with tls

install -pm644 %name-%version/IPv6-ChangeLog %buildroot%docdir/
xz -9 %buildroot%docdir/IPv6-ChangeLog

# Install README_FILES.
rm -rf %buildroot%config_directory/README_FILES
mkdir -p %buildroot%docdir/README_FILES
ln -rsnf %buildroot%docdir/README_FILES %buildroot%config_directory/

# Install README.ALT
install -pm644 %_buildaltdir/README.ALT-ru_RU.utf8 %buildroot%docdir/

touch %buildroot%config_directory/{access,aliases,canonical,relocated,transport,virtual}.{cdb,db}

# syslog.d
mkdir -pm700 %buildroot%_sysconfdir/syslog.d
ln -s %ROOT/dev/log %buildroot%_sysconfdir/syslog.d/%name

# Chrooted environment
touch %buildroot%ROOT%_sysconfdir/{localtime,hosts,services,{host,nsswitch,resolv}.conf}
mksock %buildroot%ROOT/dev/log

# Remove sendmail-common files
rm %buildroot%_bindir/{mailq,newaliases}

# Package plugins separately
sed '/\/postfix-[^-.]*\.so/d' -i %name.files

### RUNTIME SCRIPTS ###

%pre
/usr/sbin/groupadd -r -f %setgid_group
/usr/sbin/groupadd -r -f %mail_owner
/usr/sbin/groupadd -r -f %default_privs
/usr/sbin/groupadd -r -f %mail_admin
/usr/sbin/useradd -r -N -g %name -d %ROOT -s /dev/null -c %name %name >/dev/null 2>&1 ||:
/usr/sbin/useradd -r -N -g %default_privs -d /dev/null -s /dev/null -c %default_privs %default_privs >/dev/null 2>&1 ||:

%pre_service_stop_posttrans_start %name
if [ $1 -ge 2 ]; then
	if [ ! -f %daemon_directory/postqueue/postqueue -a \
	       -f %command_directory/postqueue -a \
	     ! -L %command_directory/postqueue ]; then
		mkdir -pm755 %daemon_directory/postqueue &&
		cp -pf %command_directory/postqueue %daemon_directory/postqueue/
	fi
	/usr/sbin/control-dump %name postqueue
fi

oua=/usr/sbin/update-alternatives
if [ -x "$oua" ]; then
	"$oua" --remove aliases %config_directory/aliases >/dev/null 2>&1 ||:
fi

%post
if [ $1 -eq 1 ]; then
	chkconfig --add %name
else
	chkconfig %name resetpriorities
	SYSTEMCTL=systemctl
	sd_booted && "$SYSTEMCTL" --version >/dev/null 2>&1 &&
		"$SYSTEMCTL" daemon-reload ||:
fi
rm -f %config_directory/{access,aliases,canonical,relocated,transport,virtual}.{,c}db
%_libexecdir/postfix/post-install \
	config_directory=%config_directory \
	meta_directory=%config_directory \
	daemon_directory=%daemon_directory \
	upgrade-package
if [ $1 -ge 2 ]; then
	ALIASES=%config_directory/aliases /usr/share/sendmail-common/rebuild_aliases
	%_sysconfdir/chroot.d/%name.all --force
	/usr/sbin/control-restore %name postqueue
else
	/usr/sbin/control %name local
	/usr/sbin/control postqueue public
fi

%preun
if [ $1 = 0 ]; then
	service %name condstop
	chkconfig --del %name
	rm -f %ROOT/lib/* %ROOT%_sysconfdir/* %ROOT/var/yp/binding/* \
		%ROOT/var/nis/NIS_COLD_START
fi

%if_with tls
%post tls
for n in smtp smtpd; do
      ln -snf "$n"-tls %daemon_directory/"$n"
done
sed -i 's/^#\(.*tls\)/\1/' %config_directory/%name-files
%_libexecdir/postfix/post-install \
	meta_directory=%config_directory \
	upgrade-package

%preun tls
if [ $1 = 0 ]; then
	for n in smtp smtpd; do
	      ln -snf "$n"-std %daemon_directory/"$n"
	done
	sed -i 's/[^#]*tls/#&/' %config_directory/%name-files
fi
%endif #with tls

%triggerpostun -- sendmail, exim, %name <= 0:20010228
[ $1 = 0 ] || exit 0
ln -snf %name/aliases %_sysconfdir/aliases
%_sysconfdir/chroot.d/%name.all

%files -f %name.files
%config %config_directory/main.cf.dist
%config %_initdir/%name
%config(noreplace) %_sysconfdir/cron.daily/%name
%config %_sysconfdir/chroot.d/*
%_sysconfdir/aliases
%ghost %attr(644,root,root) %config(missingok) %verify(not md5 mtime size) %config_directory/*.db
%ghost %attr(644,root,root) %config(missingok) %verify(not md5 mtime size) %config_directory/*.cdb
%attr(-,root,root) %daemon_directory/lmtp
%attr(-,root,root) %daemon_directory/smtp
%attr(-,root,root) %daemon_directory/smtpd
%_unitdir/%name.service
%_libdir/libpostfix-*.so
%exclude %_libdir/libpostfix-tls.so
%_sysconfdir/syslog.d/%name
%attr(700,root,root) %verify(not mode,group) %dir %daemon_directory/postqueue
%command_directory/postqueue
%dir %plugin_directory
%_bindir/qshape
%_bindir/rmail
%_mandir/man?/*
%exclude %_mandir/man1/*-*
%if_with tls
%exclude %_mandir/man?/*tls*
%endif #with tls

%doc %config_directory/README_FILES
%dir %docdir
%docdir/examples
%docdir/[A-Z]*
%if_with tls
%exclude %docdir/TLS_*
%endif # with tls

# Chrooted environment
%attr(644,root,root) %verify(not md5 mtime size) %ghost %ROOT%_sysconfdir/*
%attr(666,root,root) %ghost %ROOT/dev/log

%files test-tools
%_bindir/*-*
%_mandir/man1/*-*

%files html
%dir %docdir
%docdir/html

%if_with ldap
%files ldap
%dir %plugin_directory
%plugin_directory/dict_ldap.so
%endif #with ldap

%if_with mysql
%files mysql
%dir %plugin_directory
%plugin_directory/dict_mysql.so
%endif #with mysql

%if_with pcre
%files pcre
%dir %plugin_directory
%plugin_directory/dict_pcre.so
%endif #with pcre

%if_with pgsql
%files pgsql
%dir %plugin_directory
%plugin_directory/dict_pgsql.so
%endif #with pgsql

%if_with sasl
%if_with cyrus
%files cyrus
%dir %plugin_directory
%plugin_directory/xsasl_cyrus.so
%endif #with cyrus

%files dovecot
%dir %plugin_directory
%plugin_directory/xsasl_dovecot.so
%endif #with sasl

%if_with tls
%files tls
%_sbindir/postfix-generate-ssl-certificate
%_mandir/man8/*tls*
%_libdir/libpostfix-tls.so
%dir %daemon_directory
%daemon_directory/*-tls
%daemon_directory/tlsmgr
%daemon_directory/tlsproxy
%daemon_directory/postfix-tls-script
%dir %docdir
%docdir/TLS_*
%endif #with tls

%changelog
* Wed Dec 06 2023 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.8.3-alt1
- Updated to 3.8.3.
- Fixed repocop specfile-useradd-n warning.

* Sun Aug 20 2023 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.10-alt1
- Updated to 3.6.10.

* Mon May 08 2023 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.9-alt1
- Updated to 3.6.9 (fixes FTBFS with Linux 6).

* Mon Jul 04 2022 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.6-alt1
- Updated to 3.6.6.
- Fixed 'egrep is obsolescent' warning (arriving from cron job)
  (thnx Vitaly Chikunov).

* Wed Jan 19 2022 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.4-alt1
- Updated to 3.6.4.

* Wed Dec 15 2021 Dmitry V. Levin <ldv@altlinux.org> 1:3.6.3-alt2
- spec: switched to use %%pre_service_stop_posttrans_start.

* Tue Dec 14 2021 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.3-alt1
- Updated to 3.6.3.

* Tue Aug 10 2021 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.2-alt1
- Updated to 3.6.2.

* Mon Jun 07 2021 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.0-alt2
- Removed notes about mynetworks_style from COMPATIBILITY_README.
- Changed postfix(1) to point to packaged version of COMPATIBILITY_README.
- post-install: silenced messages about unused erroneously packaged (in
  previous versions) files /usr/libexec/postfix/main.cf and
  /usr/libexec/postfix/master.cf .
- Changed default value of smtpd_relay_restrictions option to be:
  + independent of compatibility_level option value;
  + compatible with postfix < 2.10.

* Sat May 29 2021 Gleb F-Malinovskiy <glebfm@altlinux.org> 1:3.6.0-alt1
- Updated to 3.6.0.
- /etc/postfix/main.cf: set compatibility_level=3.6 for new installations.

* Wed Dec 02 2020 Dmitry V. Levin <ldv@altlinux.org> 1:2.11.11-alt4
- Fixed build with gcc 10.x.

* Sun Jul 05 2020 Dmitry V. Levin <ldv@altlinux.org> 1:2.11.11-alt3
- Fixed build on linux 5.x.

* Thu Apr 11 2019 Dmitry V. Levin <ldv@altlinux.org> 1:2.11.11-alt2
- chroot.conf: do not apply alias_maps update rules to alias_database files.
- dict_mysql: backported MySQL 8.x support.
- tls: backported assorted upstream (by vt@).

* Sun Jan 28 2018 Dmitry V. Levin <ldv@altlinux.org> 1:2.11.11-alt1
- 2.11.7 -> 2.11.11.
- Disabled NIS/NIS+ support as it was disabled in glibc-2.26.0.124.98f244e-alt1.
- Restart postfix from filetrigger (closes: #21620).
- Save a copy of %config_directory/aliases before rewriting it (closes: #25238).
- Fixed "postconf -a" and "postconf -A" (closes: #28372).
- Fixed Cyrus SASL support (by asy@; closes: #30270).
- Fixed update procedure when systemd is active (closes: #31363).
- Recoded README.ALT-ru_RU from koi8r to utf8 (closes: #32038).
- Cleared executable bit from postfix.service (closes: #34567).

* Wed Mar 02 2016 Fr. Br. George <george@altlinux.ru> 1:2.11.7-alt2
- Making /etc/sysconfig/network optional (closes: #31827)
- Extra/chroot.conf: added support for alias_maps (closes: #31822)
- Disable TLS micro version check (closes: #31752)

* Wed Oct 14 2015 Fr. Br. George <george@altlinux.ru> 1:2.11.7-alt1
- Version upgrade (still on legacy branch)
- Test tools package addded (closes: #28476)

* Wed Oct 22 2014 Fr. Br. George <george@altlinux.ru> 1:2.11.3-alt1
- Autobuild version bump to 2.11.3

* Wed May 14 2014 Fr. Br. George <george@altlinux.ru> 1:2.11.1-alt1
- Autobuild version bump to 2.11.1
- Patch fixed

* Wed Feb 05 2014 Fr. Br. George <george@altlinux.ru> 1:2.10.3-alt1
- Autobuild version bump to 2.10.3

* Mon Oct 14 2013 Fr. Br. George <george@altlinux.ru> 1:2.10.2-alt1
- Autobuild version bump to 2.10.2
- Next bugfix release

* Thu Aug 22 2013 Fr. Br. George <george@altlinux.ru> 1:2.10.1-alt1
- Autobuild version bump to 2.10.1
- Bugfix release

* Mon Apr 22 2013 Fr. Br. George <george@altlinux.ru> 1:2.10.0-alt1
- Version up
- Use upstream "postconf -x" instead of "postconf -E"

* Thu Dec 13 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.5-alt1
- Autobuild version bump to 2.9.5
- Bugfix release

* Mon Nov 26 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.4-alt3
- Reimplement 2.5-style postconf -E (still no default values evaluation)

* Mon Nov 19 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.4-alt2
- Fix ill-applied ignore-system-user patch
- Add systemd service

* Mon Oct 29 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.4-alt1
- Autobuild version bump to 2.9.4
- Bugfix release

* Tue Aug 14 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.3-alt3
- Remove obsoleted MAKEFLAGS from spec
- Implement and settle "inet_protocols = any" configuration option

* Tue Jul 31 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.3-alt2
- Fix postscreen open after close + chroot misfeature

* Mon Jun 18 2012 Fr. Br. George <george@altlinux.ru> 1:2.9.3-alt1
- Version up to 2.9.3 (4 middle-version jumps!)
- Reverting generated files patches
- Settle tlsproxy on postfix-tls
- Heavy merge of old ALT patches

* Thu Jul 14 2011 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.14-alt1
- Updated to 2.5.14.

* Mon May 09 2011 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.13-alt1
- Updated to 2.5.13 (fixes CVE-2011-1720 in SMTP server Cyrus SASL support).

* Tue Mar 08 2011 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.12-alt1
- Updated to 2.5.12.

* Sat Dec 04 2010 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.11-alt1
- Updated to 2.5.11.

* Wed Nov 03 2010 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.9-alt4
- Fixed a namespace conflict (closes: #24496).

* Fri Oct 01 2010 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.9-alt3
- Rebuilt with libssl.so.10 and libmysqlclient.so.16.

* Tue Sep 01 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.9-alt2
- Fixed SSL certificate generation conditions check (closes: #21164).

* Mon Aug 31 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.9-alt1
- Updated to 2.5.9.

* Fri Aug 21 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.7-alt3
- Changed startup script to generate SSL certificate
  if %name-tls is installed (closes: #21164).

* Mon Jun 08 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.7-alt2
- Fixed main.cf.params generation to make it always sorted.

* Tue May 12 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.7-alt1
- Updated to 2.5.7.

* Tue Mar 03 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.6-alt1
- Updated to 2.5.6.

* Thu Dec 04 2008 Dmitry V. Levin <ldv@altlinux.org> 1:2.5.5-alt1
- Updated to 2.5.5.

* Sun Nov 30 2008 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.9-alt2
- Removed obsolete %%post_ldconfig/%%postun_ldconfig calls.
- Packaged html subpackage as noarch.
- Do not package MEMCACHE_README* unless memcache support is enabled (closes: #18046).

* Sun Aug 31 2008 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.9-alt1
- Updated to 2.4.9 (fixes potential epoll file descriptor leak).

* Sat Aug 09 2008 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.8-alt2
- Fixed build with kerberized openssl.

* Tue Aug 05 2008 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.8-alt1
- Updated to 2.4.8 (fixes CVE-2008-2936).

* Mon Feb 25 2008 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.7-alt1
- Updated to 2.4.7.

* Sun Dec 23 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.6-alt3
- Fixed build of documentation.

* Sun Dec 09 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.6-alt2
- main.cf: Removed unneeded unknown_local_recipient_reject_code.
- post-install: Fixed adding missing entry for retry service.

* Tue Dec 04 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.6-alt1
- Updated to 2.4.6.
- postconf: Enabled "-E" option support.
- /etc/chroot.d/postfix.conf: Use "postconf -E" (fixes #12282).

* Tue Oct 23 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.13-alt1
- Updated to 2.3.13.

* Tue Aug 07 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.12-alt1
- Updated to 2.3.12.

* Thu May 31 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.11-alt1
- Updated to 2.3.11.

* Wed May 02 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.9-alt1
- Updated to 2.3.9.

* Fri Mar 30 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.8-alt1.1
- Rebuilt due to libpq.so.4 -> libpq.so.5 soname change.

* Thu Mar 08 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.8-alt1
- Updated to 2.3.8.

* Fri Mar 02 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.7-alt4
- Fixed postfix-cyrus configuration on x86-64,
  reported by Vladimir V. Kamarzin.

* Tue Feb 27 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.7-alt3
- Fixed postfix-tls, reported by Vladimir V. Kamarzin.

* Mon Feb 26 2007 Stanislav Ievlev <inger@altlinux.org> 1:2.3.7-alt2.1
- master.cf: add content filter

* Fri Feb 16 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.7-alt2
- Enabled build of Dovecot SASL plugin by default.
- main.cf.dist:
  Added comments about message_size_limit and mailbox_size_limit (#7923).

* Sun Feb 11 2007 Dmitry V. Levin <ldv@altlinux.org> 1:2.3.7-alt1
- Updated to 2.3.7.
- Enabled SASL support by default.
- Disabled memcache by default.
- Minimized default main.cf file.
- Stripped postfix version from plugin file names.
- Implemented dynamic loading of xsasl plugins.
- Build Cyrus SASL plugin by default.
- Changed daemon_directory to /usr/libexec/%name.
- Changed plugin_directory to %%_libdir/%name.
- Changed default parameters:
  biff = no
  mydestination = $myhostname, localhost.$mydomain, localhost, $config_directory/mydestination
  smtpd_data_restrictions = reject_unauth_pipelining
  smtpd_etrn_restrictions = permit_mynetworks, reject
  smtpd_helo_required = yes

* Sat Sep 09 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.11-alt2
- Fixed default path to sasl plugins on multilib arches (closes #9975).

* Sun Jul 30 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.11-alt1
- Updated to 2.2.11.
- Changed postfix-install script to avoid adding default installation
  parameters to main.cf and therefore avoid potential upgrade problems
  (closes #9747).

* Thu May 25 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.10-alt2
- print_unknown_params: Fixed typo.

* Fri Apr 07 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.10-alt1
- Updated to 2.2.10.

* Fri Mar 24 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.9-alt3
- Reverted version change introduced by 2.2.10-RC1 patch (#9314).

* Fri Mar 17 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.9-alt2
- Updated to 2.2.10-RC1.
- postfix-script(check-warn):
  + If main.cf contains unknown parameters, print them.
- postconf(5): Document this change.
- init.d/postfix(check):
  + Disabled "postfix check" output redirection.
- Added dict_memcache, patch from ns@ and lakostis@.

* Mon Mar 06 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.9-alt1
- Updated to 2.2.9.

* Thu Jan 05 2006 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.8-alt1
- Updated to 2.2.8.

* Tue Dec 13 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.7-alt1
- Updated to 2.2.7.

* Fri Dec 02 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.6-alt1
- Updated to 2.2.6.

* Sun Nov 06 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.5-alt2
- Added x86_64 support (fixes #8111).
- Enhanced mailbox_unpriv_delivery patch.

* Tue Aug 09 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.5-alt1
- Updated to 2.2.5.
- Updated deb-man patch.

* Wed Jun 29 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.4-alt3
- Changed default database type:
  alias_database = cdb:/etc/postfix/aliases
  alias_maps = cdb:/etc/postfix/aliases
  default_database_type = cdb
- Hardened $queue_directory/maildrop directory permissions.
- Enhanced documentation of ALT-specific changes of defaults.

* Sat Jun 25 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.4-alt2
- Packaged qshape.

* Thu Jun 23 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.4-alt1
- Updated to 2.2.4.
- Rediffed patches.

* Mon Jun 13 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.2.3-alt1
- Removed no longer needed deb-tls-master.cf patch.
- Updated alt-post-install patch to handle new services properly.
- Updated awk build scripts to handle new master.cf properly.
- Minor README.ALT tweaks.

* Thu Jun 12 2005 LAKostis <lakostis at altlinux.org> 1:2.2.3-alt0.5
- Returned back to old build model, with tls and sasl enabled together.
- Removed sed from build dependencies.
- Updated sasl_config patch for 2.2.3.
- Added README.ALT.

* Thu Jun 02 2005 LAKostis <lakostis at altlinux.org> 1:2.2.3-alt0.4
- s,alt,deb, in sasl_config patch as more correct.
- Define SASL vars in all build stages.
- Build with TLS and SASL by default.

* Sun May 29 2005 LAKostis <lakostis at altlinux.org> 1:2.2.3-alt0.3
- Updated to 2.2.3.
- Merged debian patches (for man pages and /etc/postfix/sasl/smtpd.conf).
- Updated alt patches.
- Build with new postgresql.
- 0.1 and 0.2 - internal releases.

* Wed May 11 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.1.6-alt1
- Updated to 2.1.6.

* Thu Apr 21 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.1.5-alt3
- Build fix: updated %name-lorder.sh to use join(1) in more portable way.

* Thu Mar 10 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.1.5-alt2
- Reverted change to default queue_minfree value
  which was introduced in 2.1.5-alt1.
- Fixed postfix-tls (closes #6214).
- Enabled ipv6 for postfix-tls by default (closes #6216).

* Fri Feb 25 2005 Dmitry V. Levin <ldv@altlinux.org> 1:2.1.5-alt1
- Cleaned up shlib model.
- Reviewed and rediffed patches.
- Disabled oqmgr packaging.
- Relocated documentation.
- Merged -readme subpackage back to main package.
- Updated TLS patch to deb-2.1.5-8.
- Changed daemon suffixes.
- Disabled %%verify check for files which are ususally changed after
  package installation, and for directory controlled via control(8) facility.
- Marked rare %%ghost files with %%config(missingok) attribute.
- Documented ALT-specific changes of defaults:
  default_privs = postman (introduced in 2.0.16-alt1);
  disable_vrfy_command = yes (introduced in 2.0.16-alt1);
  mynetworks_style = host (introduced in 2.0.16-alt1);
  mailbox_unpriv_delivery = yes (introduced in 2.0.16-alt3);
  virtual_minimum_uid = 500 (introduced in 2.0.16-alt3).
- Changed packager tag to reflect reality.

* Wed Feb 23 2005 LAKostis <lakostis at altlinux.ru> 1:2.1.5-alt0.5
- handle post/preun for -tls more correctly.
- remove bogus obsoletes tags.

* Tue Feb 22 2005 LAKostis <lakostis at altlinux.ru> 1:2.1.5-alt0.4
- relocate -virgin back to main postfix.
- disable ipv6 support.

* Mon Feb 21 2005 LAKostis <lakostis at altlinux.ru> 1:2.1.5-alt0.3
- rebuild with libdb4.3.
- check for proper dist-upgrade.
- TODO:
  - IPV6 patch update or IPV6 removal? :)

* Sat Jan 22 2005 LAKostis <lakostis at altlinux.ru> 1:2.1.5-alt0.2
- Move SASL2 and TLS to separate package (tnx to debian and ns@ for idea).
- Make postfix-virgin package with old functionality.
- Use tls+ipv6 patch from debian.
- TODO:
  + html-docs
  ? make cdb default

* Sat Jan 15 2005 LAKostis <lakostis at altlinux.ru> 1:2.1.5-alt0.1
- 2.1.5.
- update patches & spec.
- remove obsolete patches.

* Thu Oct 28 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.20-alt2
- init.d/postfix(reload): check postfix configuration.

* Fri Apr 23 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.20-alt1
- Updated to 2.0.20.

* Mon Apr 19 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.19-alt3
- dict_cdb: updated to libcdb.so.1.
- postfix.chroot.conf: fixed tab spaces handling.

* Mon Apr 19 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.19-alt2
- Changed shlib model to reduce shlib dependencies.  It should
  fix potential upgrade problems caused by shlib soname changes.
- chroot.d/postfix.conf: honor --verbose option.

* Tue Mar 16 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.19-alt1
- Updated to 2.0.19.

* Tue Mar 09 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.18-alt4
- postfix.chroot.conf: fail when postconf(1) fails (#3789).
- regexp_table(5): fixed regex syntax reference (#3766).

* Mon Feb 16 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.18-alt3
- Updated for chrooted-0.3.
- Rebuilt with libdb-4.2.so.

* Wed Feb 11 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.18-alt2
- postconf: show virtual_maps legacy parameter.
- main.cf.default: fixed (was empty).
- postfix.chroot.conf: implemented smart aliases and maps update.

* Fri Jan 23 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.18-alt1
- Updated to 2.0.18.

* Wed Jan 21 2004 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.17-alt1
- Updated to 2.0.17.
- Fixed %%pre script to avoid unwanted postfix start on upgrade.

* Sat Nov 08 2003 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.16-alt5
- Ensure that all shared libraries are built with %%optflags_shared.

* Sat Nov 01 2003 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.16-alt4
- Fixed dynamic map loading support (broken in -alt3).

* Thu Oct 30 2003 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.16-alt3
- Documented cdb hashing method everywhere.
- Implemented change to local(8) service and unix:passwd.byname map,
  to skip system users by default.
  Tunable by local_minimum_uid parameter, default is 500.
- Implemented change to local(8) deliver_mailbox_file to perform
  all operations as recipient user by default.
  Tunable by mailbox_unpriv_delivery parameter, default is true.
- Changed hardcoded default for virtual_minimum_uid parameter,
  from 100 to 500.
- Relocated shared library.
- Enable manpage regeneration.

* Wed Oct 29 2003 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.16-alt2
- Provide smoother migration from %name-smtpd.
- Fixed build without optional modules (reported by Anton V. Denisov).

* Sun Oct 19 2003 Dmitry V. Levin <ldv@altlinux.org> 1:2.0.16-alt1
- Updated to 2.0.16.
- Dropped update-alternatives support for %_sysconfdir/aliases.
- Updated startup script.
- Updated patches:
  owl-sparse-hack, alt-install, alt-main.cf.
- New patches:
  ns-mx-acl-patch (unofficial from upstream),
  pg.postfix-2.0.0.2 (pgsql support),
  mjt-sharedlib-cmdmaxtime, pld-doc-cdb, deb-alt-doc, deb-ldap,
  alt-check, alt-defaults, alt-filelist, alt-post-install, alt-dynamicmaps.
- Removed patches:
  alt-script (obsoleted by alt-install)
  alt-def_mailbox_lock (obsoleted by alt-defaults)
- Hardcoded most essential changes in config defaults:
  alias_database = hash:/etc/postfix/aliases
  alias_maps = hash:/etc/postfix/aliases
  daemon_directory = /usr/lib/postfix
  default_privs = postman
  disable_vrfy_command = yes
  mailbox_delivery_lock = fcntl
  mynetworks_style = host
- Build postfix shared library.
- Added CDB support.
  See http://www.corpit.ru/mjt/tinycdb.html for details.
- Enabled ldap support (in -ldap subpackage).
- Enabled mysql support (in -mysql subpackage).
- Enabled pcre support (in -pcre subpackage).
- Added pgsql support (in -pgsql subpackage).
- Implemented dynamic map loading support.
- Implemented control(8) support for postfix server and postqueue.
- Dropped smtpd subpackage.
- Disabled nis:mail.aliases lookup by default.
- Disabled sasl support for a while.

* Mon Jul 28 2003 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.13-alt1
- Updated to 1.1.13 (bugfix release).
- Updated start/stop script to new rc scheme.
- Updated build dependencies.

* Wed Jan 29 2003 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.12-alt2
- Make use of syslogd-1.4.1-alt11 /etc/syslog.d/ feature (#0002062).

* Mon Nov 25 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.12-alt1
- 1.1.12 release.
- chrooted.d/postfix.conf:
  + purge all chroot jail configs in force mode;
  + be more verbose on errors.
- chrooted.d/postfix.lib:
  + purge all chroot jail libs in force mode;
  + don't put unneeded libraries into chroot jail.

* Thu Oct 31 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.11-alt2
- Use subst instead of perl for build and %%post* scripts.

* Thu May 30 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.11-alt1
- 1.1.11 release.

* Tue May 21 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.10-alt2
- Fixed typo in startup script made in previous release.

* Mon May 20 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.10-alt1
- 1.1.10 release.
- Moved /usr/share/postfix/* to sendmail-common package.

* Sat May 18 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.9-alt2
- Smtp/inet service now turned off by default unless postfix-smtpd is installed.
- Added SASL support for lmtp/unix, smtp/unix and smtp/inet services:
  it is turned off by default unless corresponding -sasl subpackages are installed.
- Startup script: added "condreload" option.

* Tue May 14 2002 Dmitry V. Levin <ldv@altlinux.org> 1:1.1.9-alt1
- 1.1.9 release.

* Tue May 07 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.8-alt1
- 1.1.8 release.
- Set default mailbox_lock style to "fcntl".

* Tue Apr 16 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.7-alt2
- Updated chroot (added NIS/NIS+ support).

* Mon Apr 01 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.7-alt1
- 1.1.7 release.
- Updated --with/--without specfile logic.

* Wed Mar 27 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.6-alt1
- 1.1.6 release.

* Mon Mar 25 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.5-alt2
- Updated --with/--without specfile logic.
- Build with libdb4.

* Fri Mar 22 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.5-alt1
- 1.1.5 release.

* Mon Feb 04 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.3-alt1
- 1.1.3 release.

* Mon Jan 28 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.2-alt1
- 1.1.2 release.

* Thu Jan 24 2002 Dmitry V. Levin <ldv@alt-linux.org> 1:1.1.1-alt1
- 1.1.1 release.

* Sun Jan 13 2002 Dmitry V. Levin <ldv@alt-linux.org> 20020112-alt1
- 20020112.

* Sun Jan 13 2002 Dmitry V. Levin <ldv@alt-linux.org> 20020110-alt1
- 20020110.
- Changed postdrop command sgid named to postdrop.
- Changed local delivery agent default_privs to postman.
- Updated description (owl).
- Added %_sysconfdir/%name/{pcre,regexp}_table files.
- Rewritten %%install script.

* Fri Jan 04 2002 Dmitry V. Levin <ldv@alt-linux.org> 20011226-alt2
- Updated make_aliases script to work with tcb.

* Fri Dec 28 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011226-alt1
- 20011226 (safety, see RELEASE_NOTES and HISTORY files).

* Wed Dec 19 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011217-alt1
- 20011217 (security, see RELEASE_NOTES and HISTORY files).

* Thu Nov 29 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011127-alt1
- 20011127:
  + New parameter smtpd_noop_commands;
  + New header/body_check.

* Tue Nov 27 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011125-alt1
- 20011125:
  + New parameter smtpd_sender_login_maps;
  + New sender anti-spoofing restriction reject_sender_login_mismatch.

* Thu Nov 22 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011121-alt1
- 20011121.

* Mon Nov 19 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011115-alt2
- Correct build with new pcre.

* Fri Nov 16 2001 Dmitry V. Levin <ldv@alt-linux.org> 20011115-alt1
- 20011115 (session log memory exhaustion bugfix).

* Tue Oct 09 2001 Dmitry V. Levin <ldv@altlinux.ru> 20011008-alt1
- 20011008.

* Thu Sep 27 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010808-alt2
- Fixed %%post script: do not chkconfig if upgrading.

* Sun Sep 23 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010808-alt1
- 20010808.
- Build with ldap support.

* Tue Jul 17 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010714-alt1
- 20010714.

* Wed Jul 11 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010709-alt1
- 20010709.

* Mon Jun 11 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010610-alt1
- 20010610.

* Thu Jun 07 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010525-alt3
- Fixed directory permissions in %ROOT (was undefined before).

* Mon Jun 04 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010525-alt2
- Fixed startup and check scripts.

* Tue May 29 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010525-alt1
- 20010525.

* Tue May 08 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010502-alt1
- 20010502.

* Mon Apr 02 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010329-alt1
- 20010329.

* Wed Mar 21 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010228-ipl3mdk
- Fixed %%triggerpostun script.

* Mon Mar 19 2001 Dmitry V. Levin <ldv@altlinux.ru> 20010228-ipl2mdk
- Updated aliases template.

* Fri Mar 02 2001 Dmitry V. Levin <ldv@fandra.org> 20010228-ipl1mdk
- Snapshot 20010228.

* Mon Feb 26 2001 Dmitry V. Levin <ldv@fandra.org> 20010225-ipl1mdk
- Snapshot 20010225.
- Updated aliases template.

* Thu Feb 22 2001 Dmitry V. Levin <ldv@fandra.org> 19991231pl13-ipl6mdk
- Moved common sendmail links to sendmail-common package.
- Fixed Requires.

* Wed Feb 07 2001 Dmitry V. Levin <ldv@fandra.org> 19991231pl13-ipl5mdk
- Fixed startup script (abort startup if failed to setup chroot).

* Fri Feb 02 2001 Dmitry V. Levin <ldv@fandra.org> 19991231pl13-ipl4mdk
- Rebuilt with db3-3.2.9.

* Wed Jan 31 2001 Dmitry V. Levin <ldv@fandra.org> 19991231pl13-ipl3mdk
- Added smtpd_size patch.
- Ported to new chrooted scheme.

* Sat Jan 06 2001 Dmitry V. Levin <ldv@fandra.org> 19991231pl13-ipl2mdk
- Rebuilt with db3-3.2.3e.

* Wed Dec 27 2000 Dmitry V. Levin <ldv@fandra.org> 19991231pl13-ipl1mdk
- Fixed %_datadir/%name/make_aliases script (installation problem).
- Fixed groupadd/useradd/chkconfig calls.

* Tue Dec 12 2000 Dmitry V. Levin <ldv@fandra.org>
- 19991231-pl13.
- Patched to work with LFS and pthread-aware db3.
- RE adaptions.
- FHSification.

* Fri Jun  2 2000 Dmitry V. Levin <ldv@fandra.org>
- 19991231-pl08

* Mon May 15 2000 Dmitry V. Levin <ldv@fandra.org>
- 19991231-pl07

* Tue Apr  4 2000 Dmitry V. Levin <ldv@fandra.org>
- 19991231-pl06

* Tue Mar 28 2000 Dmitry V. Levin <ldv@fandra.org>
- dependency fix with resolv.conf and chroot setup

* Mon Mar 13 2000 Dmitry V. Levin <ldv@fandra.org>
- 19991231-pl05

* Wed Mar 08 2000 Dmitry V. Levin <ldv@fandra.org>
- updated to rpm-3.0.4

* Thu Feb 10 2000 Dmitry V. Levin <ldv@fandra.org>
- 19991231-pl03

* Mon Jan  3 2000 Dmitry V. Levin <ldv@fandra.org>
- fixed chrooted libraries

* Sun Dec 26 1999 Dmitry V. Levin <ldv@fandra.org>
- 19990906-pl09
- fixed chrooted environment

* Wed Dec  1 1999 Dmitry V. Levin <ldv@fandra.org>
- 19990906-pl07
- fixed permissions

* Wed Sep  7 1999 Dmitry V. Levin <ldv@fandra.org>
- Fandra adaptions

* Sat Jun  5 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
- install bins from libexec/

* Sat Jun  5 1999 Bernhard Rosenkränzer <bero@mandrakesoft.com>
- 19990601
- .spec cleanup for easier updates

* Wed May 26 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
- created link from /usr/sbin/sendmail to /usr/lib/sendmail
  so it doesn't bug out when i rpm -e sendmail
- Now removes /var/lock/subsys/postfix like a good little prog
  upon rpm -e

* Fri Apr 23 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Mandrake adptations.

* Tue Apr 13 1999 Arne Coucheron <arneco@online.no>
  [19990317-pl04-1]

* Tue Mar 30 1999 Arne Coucheron <arneco@online.no>
  [19990317-pl03-2]
- Castro, Castro, pay attention my friend. You're making it very hard
  maintaining the package if you don't follow the flow of the releases

* Thu Mar 25 1999 Arne Coucheron <arneco@online.no>
  [19990317-pl02-1]

* Tue Mar 23 1999 Arne Coucheron <arneco@online.no>
  [19990317-3]
- added bugfix patch01

* Sat Mar 20 1999 Arne Coucheron <arneco@online.no>
  [19990317-2]
- removed the mynetworks line in main.cf, let postfix figure it out
- striping of the files in /usr/sbin
- alias database moved to /etc/postfix and made a symlink to it in /etc
- enabled procmail support in main.cf and added it to Requires:
- check status on master instead of postfix in the init script
- obsoletes postfix-beta
- had to move some of my latest changelog entries up here since Edgard Castro
  didn't follow my releases

* Thu Mar 18 1999 Edgard Castro <castro@usmatrix.net>
  [19990317]

* Tue Mar 16 1999 Edgard Castro <castro@usmatrix.net>
  [alpha-19990315]

* Tue Mar  9 1999 Edgard Castro <castro@usmatrix.net>
  [19990122-pl01-2]
- shell and gecho information changed to complie with Red Hat stardand
- changed the name of the rpm package to postfix, instead of postfix-beta

* Tue Feb 16 1999 Edgard Castro <castro@usmatrix.net>
  [19990122-pl01-1]

* Sun Jan 24 1999 Arne Coucheron <arneco@online.no>
  [19990122-1]
- shell for postfix user changed to /bin/true to avoid logins to the account
- files in /usr/libexec/postfix moved to /usr/lib/postfix since this complies
  more with the Red Hat standard

* Wed Jan 06 1999 Arne Coucheron <arneco@online.no>
  [19981230-2]
- added URL for the source
- added a cron job for daily check of errors
- sample config files moved from /etc/postfix/sample to the docdir
- dropped making of symlinks in /usr/sbin and instead installing the real
  files there
- because of the previous they're not needed anymore in /usr/libexec/postfix,
  so they are removed from that place

* Fri Jan 01 1999 Arne Coucheron <arneco@online.no>
  [19981230-1]

* Tue Dec 29 1998 Arne Coucheron <arneco@online.no>
  [19981222-1]
- first build of rpm version