1SHELL = /bin/sh 2SRCS = postconf.c postconf_builtin.c postconf_edit.c postconf_main.c \ 3 postconf_master.c postconf_misc.c postconf_node.c postconf_other.c \ 4 postconf_service.c postconf_unused.c postconf_user.c postconf_dbms.c \ 5 postconf_lookup.c postconf_match.c postconf_print.c 6OBJS = postconf.o postconf_builtin.o postconf_edit.o postconf_main.o \ 7 postconf_master.o postconf_misc.o postconf_node.o postconf_other.o \ 8 postconf_service.o postconf_unused.o postconf_user.o postconf_dbms.o \ 9 postconf_lookup.o postconf_match.o postconf_print.o 10HDRS = postconf.h 11TESTSRC = 12DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) -DLEGACY_DBMS_SUPPORT 13CFLAGS = $(DEBUG) $(OPT) $(DEFS) 14TESTPROG= 15MAKES = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \ 16 str_vars.h time_table.h time_vars.h raw_table.h raw_vars.h \ 17 nint_table.h nint_vars.h nbool_table.h nbool_vars.h long_table.h \ 18 long_vars.h str_fn_table.h str_fn_vars.h 19DB_MAKES= pcf_ldap_suffixes.h pcf_memcache_suffixes.h pcf_mysql_suffixes.h \ 20 pcf_pgsql_suffixes.h pcf_sqlite_suffixes.h 21TEST_TMP= main.cf master.cf test*.tmp 22DUMMIES = makes_dummy # for "make -j" 23PROG = postconf 24SAMPLES = ../../conf/main.cf.default 25INC_DIR = ../../include 26LIBS = ../../lib/libxsasl.a \ 27 ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \ 28 ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \ 29 ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \ 30 ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX) 31HTABLE_FIX = NORANDOMIZE=1 32 33.c.o:; $(CC) $(CFLAGS) -c $*.c 34 35$(PROG): $(OBJS) $(LIBS) 36 $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) 37 38../../conf/main.cf.default: $(PROG) Makefile 39 rm -f $@ 40 (echo "# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE"; \ 41 echo "# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX."; \ 42 echo "#"; $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -d -c ../../conf) | \ 43 grep -E -v '^(myhostname|mydomain|mynetworks|process_name|process_id) ' >$@ 44 45$(OBJS): ../../conf/makedefs.out 46 47Makefile: Makefile.in 48 cat ../../conf/makedefs.out $? >$@ 49 50test: $(TESTPROG) 51 52tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \ 53 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 \ 54 test22 test23 test24 test25 test26 test27 test28 test29 test30 test4b \ 55 test31 test32 test33 test34 test35 test36 test37 test39 test40 test41 \ 56 test42 test43 test44 test45 test46 test47 test48 test49 test50 test51 \ 57 test52 test53 test54 test55 test56 test57 test58 test59 test60 test61 \ 58 test62 test63 test64 test65 test66 test67 test68 test69 test70 test71 59 60root_tests: 61 62update: ../../bin/$(PROG) $(SAMPLES) 63 64../../bin/$(PROG): $(PROG) 65 cp $(PROG) ../../bin 66 67$(MAKES): makes_dummy 68 69makes_dummy: $(INC_DIR)/mail_params.h ../global/mail_params.c extract.awk Makefile.in 70 $(AWK) -f extract.awk ../*/*.c | $(SHELL) 71 touch makes_dummy 72 73$(DB_MAKES): extract_cfg.sh Makefile.in 74 75pcf_ldap_suffixes.h: ../global/dict_ldap.c 76 sh extract_cfg.sh -d ../global/dict_ldap.c > $@ 77 78pcf_memcache_suffixes.h: ../global/dict_memcache.c 79 sh extract_cfg.sh -d ../global/dict_memcache.c > $@ 80 81pcf_mysql_suffixes.h: ../global/dict_mysql.c 82 sh extract_cfg.sh -d -s ../global/dict_mysql.c > $@ 83 84pcf_pgsql_suffixes.h: ../global/dict_pgsql.c 85 sh extract_cfg.sh -d -s ../global/dict_pgsql.c > $@ 86 87pcf_sqlite_suffixes.h: ../global/dict_sqlite.c 88 sh extract_cfg.sh -d -s ../global/dict_sqlite.c > $@ 89 90# Define two parameters with smtpd_restriction_classes. One will be ignored. 91 92test1: $(PROG) test1.ref 93 rm -f main.cf master.cf 94 touch main.cf master.cf 95 echo smtpd_restriction_classes = foo bar >> main.cf 96 echo foo = yes >> main.cf 97 touch -t 197101010000 main.cf 98 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test1.tmp 2>&1 99 diff test1.ref test1.tmp 100 rm -f main.cf master.cf test1.tmp 101 102# Define two unused parameters. Expect two warnings. 103 104test2: $(PROG) test2.ref 105 rm -f main.cf master.cf 106 touch main.cf master.cf 107 echo restriction_classes = foo bar >> main.cf 108 echo foo = yes >> main.cf 109 touch -t 197101010000 main.cf 110 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test2.tmp 2>&1 111 diff test2.ref test2.tmp 112 rm -f main.cf master.cf test2.tmp 113 114# Define one parameter in main.cf, validate it with main.cf. 115 116test3: $(PROG) test3.ref 117 rm -f main.cf master.cf 118 touch main.cf master.cf 119 echo foo = yes >> main.cf 120 echo 'bar = $$foo' >> main.cf 121 echo 'always_bcc = $$bar' >> main.cf 122 touch -t 197101010000 main.cf 123 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test3.tmp 2>&1 124 diff test3.ref test3.tmp 125 rm -f main.cf master.cf test3.tmp 126 127# Define one parameter in main.cf, validate it with master.cf. 128 129test4: $(PROG) test4.ref 130 rm -f main.cf master.cf 131 touch main.cf master.cf 132 echo foo = yes >> main.cf 133 echo 'bar = $$foo' >> main.cf 134 echo smtpd unix - n n - 0 smtpd >> master.cf 135 echo ' -o always_bcc=$$bar' >> master.cf 136 touch -t 197101010000 main.cf 137 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test4.tmp 2>&1 138 diff test4.ref test4.tmp 139 rm -f main.cf master.cf test4.tmp 140 141# Define one parameter in master.cf, validate it with main.cf. 142 143test4b: $(PROG) test4b.ref 144 rm -f main.cf master.cf 145 touch main.cf master.cf 146 echo 'always_bcc = $$foo' >> main.cf 147 echo 'biff = $$bar' >> main.cf 148 echo 'bar = aaa' >> main.cf 149 echo smtpd1 unix - n n - 0 smtpd >> master.cf 150 echo ' -o foo=xxx -o bar=yyy -o baz=zzz' >> master.cf 151 echo '#smtpd2 unix - n n - 0 smtpd' >> master.cf 152 touch -t 197101010000 main.cf 153 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test4b.tmp 2>&1 154 diff test4b.ref test4b.tmp 155 rm -f main.cf master.cf test4b.tmp 156 157# Define one user-defined parameter with name=value in master.cf, 158# validate it with known_parameter=$$name in master.cf. 159 160test5: $(PROG) test5.ref 161 rm -f main.cf master.cf 162 touch main.cf master.cf 163 echo smtpd unix - n n - 0 smtpd >> master.cf 164 echo ' -o bar=yes -o always_bcc=$$bar -o' >> master.cf 165 touch -t 197101010000 main.cf 166 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test5.tmp 2>&1 167 diff test5.ref test5.tmp 168 rm -f main.cf master.cf test5.tmp 169 170# Basic functionality test: service parameters for delivery agents. 171 172test6: $(PROG) test6.ref 173 rm -f main.cf master.cf 174 touch main.cf master.cf 175 echo whatevershebrings unix - n n - 0 pipe >> master.cf 176 touch -t 197101010000 main.cf 177 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test6.tmp 178 diff test6.ref test6.tmp 179 rm -f main.cf master.cf test6.tmp 180 181# Basic functionality test: service parameters for spawn programs. 182 183test7: $(PROG) test7.ref 184 rm -f main.cf master.cf 185 touch main.cf master.cf 186 echo whatevershebrings unix - n n - 0 spawn >> master.cf 187 touch -t 197101010000 main.cf 188 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test7.tmp 189 diff test7.ref test7.tmp 190 rm -f main.cf master.cf test7.tmp 191 192test8: $(PROG) test8.ref 193 rm -f main.cf master.cf 194 touch main.cf master.cf 195 echo whatevershebrings inet - n n - 0 spawn >> master.cf 196 echo whatevershebrings_time_limit=1 >> main.cf 197 touch -t 197101010000 main.cf 198 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test8.tmp 199 diff test8.ref test8.tmp 200 rm -f main.cf master.cf test8.tmp 201 202test9: $(PROG) test9.ref 203 rm -f main.cf master.cf 204 touch main.cf master.cf 205 echo foo inet - n n - 0 spawn >> master.cf 206 echo bar unix - n n - 0 spawn >> master.cf 207 touch -t 197101010000 main.cf 208 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M '*'/inet >test9.tmp 2>&1 209 diff test9.ref test9.tmp 210 rm -f main.cf master.cf test9.tmp 211 212test10: $(PROG) test10.ref 213 rm -f main.cf master.cf 214 touch main.cf master.cf 215 echo foo inet - n n - 0 spawn >> master.cf 216 echo bar unix - n n - 0 spawn >> master.cf 217 touch -t 197101010000 main.cf 218 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M bar/inet foo/unix >test10.tmp 2>&1 219 diff test10.ref test10.tmp 220 rm -f main.cf master.cf test10.tmp 221 222test11: $(PROG) test11.ref 223 rm -f main.cf master.cf 224 touch main.cf master.cf 225 echo foo inet - n n - 0 spawn >> master.cf 226 echo bar unix - n n - 0 spawn >> master.cf 227 touch -t 197101010000 main.cf 228 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M >test11.tmp 2>&1 229 diff test11.ref test11.tmp 230 rm -f main.cf master.cf test11.tmp 231 232# Duplicate service entry. 233 234test12: $(PROG) test12.ref 235 rm -f main.cf master.cf 236 touch main.cf master.cf 237 echo bar=yes >> main.cf 238 echo foo inet - n n - 0 spawn >> master.cf 239 echo ' -o always_bcc=$$bar -o' >> master.cf 240 echo foo inet - n n - 0 spawn >> master.cf 241 echo ' -o always_bcc=$$bar -o' >> master.cf 242 touch -t 197101010000 main.cf 243 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M >test12.tmp 2>&1 244 diff test12.ref test12.tmp 245 rm -f main.cf master.cf test12.tmp 246 247# Define parameter with restriction_classes in master.cf, validate in main.cf. 248 249test13: $(PROG) test13.ref 250 rm -f main.cf master.cf 251 touch main.cf master.cf 252 echo bar=yes >> main.cf 253 echo baz=xx >> main.cf 254 echo foo inet - n n - 0 spawn >> master.cf 255 echo ' -o smtpd_restriction_classes=bar' >> master.cf 256 touch -t 197101010000 main.cf 257 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test13.tmp 2>&1 258 diff test13.ref test13.tmp 259 rm -f main.cf master.cf test13.tmp 260 261# Define parameter with restriction_classes in main.cf, validate in master.cf. 262 263test14: $(PROG) test14.ref 264 rm -f main.cf master.cf 265 touch main.cf master.cf 266 echo smtpd_restriction_classes=bar >> main.cf 267 echo foo inet - n n - 0 spawn >> master.cf 268 echo ' -o bar=yes -o baz=xx' >> master.cf 269 touch -t 197101010000 main.cf 270 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test14.tmp 2>&1 271 diff test14.ref test14.tmp 272 rm -f main.cf master.cf test14.tmp 273 274# Define two parameters, one is hidden by master.cf. 275 276test15: $(PROG) test15.ref 277 rm -f main.cf master.cf 278 touch main.cf master.cf 279 echo bar=xx >> main.cf 280 echo baz=yy >> main.cf 281 echo foo inet - n n - 0 spawn >> master.cf 282 echo ' -o bar=yes -o always_bcc=$$bar$$baz' >> master.cf 283 touch -t 197101010000 main.cf 284 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test15.tmp 2>&1 285 diff test15.ref test15.tmp 286 rm -f main.cf master.cf test15.tmp 287 288# Test graceful degradation if master.cf is unavailable. 289 290test16: $(PROG) test16.ref 291 rm -f main.cf master.cf 292 touch -t 197101010000 main.cf 293 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test16.tmp 2>&1 294 diff test16.ref test16.tmp 295 rm -f main.cf master.cf test16.tmp 296 297test17: $(PROG) test17.ref 298 rm -f main.cf master.cf 299 touch -t 197101010000 main.cf 300 -$(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mc . >test17.tmp 2>&1; exit 0 301 diff test17.ref test17.tmp 302 rm -f main.cf master.cf test17.tmp 303 304# Test legacy $name in built-in defaults. 305 306test18: $(PROG) test18.ref 307 rm -f main.cf master.cf 308 touch main.cf master.cf 309 echo virtual_maps=xxx >> main.cf 310 echo smtpd_client_connection_limit_exceptions=yyy >> main.cf 311 touch -t 197101010000 main.cf 312 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test18.tmp 2>&1 313 diff test18.ref test18.tmp 314 rm -f main.cf master.cf test18.tmp 315 316# Test $name in "raw" parameters. 317 318test19: $(PROG) test19.ref 319 rm -f main.cf master.cf 320 touch main.cf master.cf 321 echo forward_path='$$'aaaa >> main.cf 322 echo default_rbl_reply='$$'bbbb >> main.cf 323 touch -t 197101010000 main.cf 324 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test19.tmp 2>&1 325 diff test19.ref test19.tmp 326 rm -f main.cf master.cf test19.tmp 327 328# Test master.cf line folding. 329 330test20: $(PROG) test20.ref 331 rm -f main.cf master.cf 332 touch main.cf master.cf 333 echo foo inet - n n - 0 spawn >> master.cf 334 echo ' -o always_bcc=$$bar$$baz' >> master.cf 335 touch -t 197101010000 main.cf 336 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc . >test20.tmp 2>&1 337 diff test20.ref test20.tmp 338 rm -f main.cf master.cf test20.tmp 339 340# Test main.cf line folding. 341 342test21: $(PROG) test21.ref 343 rm -f main.cf master.cf 344 touch main.cf master.cf 345 echo forward_path = xxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxx \ 346 xxxxxxxxxxxxx xxxxxxxxxxxxxx >> main.cf 347 touch -t 197101010000 main.cf 348 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nfc . >test21.tmp 2>&1 349 diff test21.ref test21.tmp 350 rm -f main.cf master.cf test21.tmp 351 352# Like test6, but using a delivery agent that has no _time_limit magic. 353 354test22: $(PROG) test22.ref 355 rm -f main.cf master.cf 356 touch main.cf master.cf 357 echo whatevershebrings unix - n n - 0 smtp >> master.cf 358 touch -t 197101010000 main.cf 359 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test22.tmp 360 diff test22.ref test22.tmp 361 rm -f main.cf master.cf test22.tmp 362 363# Test the -C flag for each category. 364 365test23: $(PROG) test23.ref 366 rm -f main.cf master.cf 367 touch main.cf master.cf 368 echo always_bcc = yes >> main.cf 369 echo name = value >> main.cf 370 echo whatevershebrings unix - n n - 0 smtp >> master.cf 371 echo ' -o always_bcc=$$name' >> master.cf 372 touch -t 197101010000 main.cf 373 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -nC builtin >test23.tmp 2>&1 374 diff test23.ref test23.tmp 375 rm -f main.cf master.cf test23.tmp 376 377test24: $(PROG) test24.ref 378 rm -f main.cf master.cf 379 touch main.cf master.cf 380 echo always_bcc = yes >> main.cf 381 echo name = value >> main.cf 382 echo whatevershebrings unix - n n - 0 smtp >> master.cf 383 echo ' -o always_bcc=$$name' >> master.cf 384 touch -t 197101010000 main.cf 385 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -nC user >test24.tmp 2>&1 386 diff test24.ref test24.tmp 387 rm -f main.cf master.cf test24.tmp 388 389test25: $(PROG) test25.ref 390 rm -f main.cf master.cf 391 touch main.cf master.cf 392 echo always_bcc = yes >> main.cf 393 echo name = value >> main.cf 394 echo whatevershebrings unix - n n - 0 smtp >> master.cf 395 echo ' -o always_bcc=$$name' >> master.cf 396 touch -t 197101010000 main.cf 397 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -C service 2>&1 | grep whatevershebrings >test25.tmp 398 diff test25.ref test25.tmp 399 rm -f main.cf master.cf test25.tmp 400 401# Test completeness of "-C all". 402 403test26: $(PROG) test26.ref 404 rm -f main.cf master.cf 405 touch main.cf master.cf 406 echo always_bcc = yes >> main.cf 407 echo name = value >> main.cf 408 echo whatevershebrings unix - n n - 0 smtp >> master.cf 409 echo ' -o always_bcc=$$name' >> master.cf 410 touch -t 197101010000 main.cf 411 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . -C all >test26.tmp 2>&1 412 diff test26.ref test26.tmp 413 rm -f main.cf master.cf test26.tmp 414 415test27: $(PROG) test27.ref 416 rm -f main.cf master.cf 417 touch main.cf master.cf 418 echo always_bcc = yes >> main.cf 419 echo name = value >> main.cf 420 echo whatevershebrings unix - n n - 0 smtp >> master.cf 421 echo ' -o always_bcc=$$name' >> master.cf 422 touch -t 197101010000 main.cf 423 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -C all 2>&1 | grep whatevershebrings >test27.tmp 424 diff test27.ref test27.tmp 425 rm -f main.cf master.cf test27.tmp 426 427# Test macro expansion, type:table parsing and scoping. 428 429test28: $(PROG) test28.ref 430 rm -f main.cf master.cf 431 touch main.cf master.cf 432 echo 'xx = proxy:ldap:foo' >> main.cf 433 echo 'foo_domain = bar' >> main.cf 434 echo 'header_checks = ldap:hh' >> main.cf 435 echo 'hh_domain = whatever' >> main.cf 436 echo 'zz = $$yy' >> main.cf 437 echo 'yy = aap' >> main.cf 438 echo 'db = memcache' >> main.cf 439 echo whatevershebrings unix - n n - 0 other >> master.cf 440 echo ' -o body_checks=$$db:$$zz' >> master.cf 441 echo 'aap_domain = whatever' >> main.cf 442 echo 'aa_domain = whatever' >> main.cf 443 touch -t 197101010000 main.cf 444 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test28.tmp 2>&1 445 diff test28.ref test28.tmp 446 rm -f main.cf master.cf test28.tmp 447 448# Test the handling of known and unknown database-defined suffixes. 449 450test29: $(PROG) test29.ref 451 rm -f main.cf master.cf 452 touch main.cf master.cf 453 echo 'ldapxx = proxy:ldap:ldapfoo' >> main.cf 454 echo 'ldapfoo_domain = bar' >> main.cf 455 echo 'ldapfoo_domainx = bar' >> main.cf 456 echo 'mysqlxx = proxy:mysql:mysqlfoo' >> main.cf 457 echo 'mysqlfoo_domain = bar' >> main.cf 458 echo 'mysqlfoo_domainx = bar' >> main.cf 459 echo 'pgsqlxx = proxy:pgsql:pgsqlfoo' >> main.cf 460 echo 'pgsqlfoo_domain = bar' >> main.cf 461 echo 'pgsqlfoo_domainx = bar' >> main.cf 462 echo 'sqlitexx = proxy:sqlite:sqlitefoo' >> main.cf 463 echo 'sqlitefoo_domain = bar' >> main.cf 464 echo 'sqlitefoo_domainx = bar' >> main.cf 465 echo 'memcachexx = proxy:memcache:memcachefoo' >> main.cf 466 echo 'memcachefoo_domain = bar' >> main.cf 467 echo 'memcachefoo_domainx = bar' >> main.cf 468 touch -t 197101010000 main.cf 469 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test29.tmp 2>&1 470 diff test29.ref test29.tmp 471 rm -f main.cf master.cf test29.tmp 472 473test30: $(PROG) test30.ref 474 rm -f main.cf master.cf 475 touch main.cf master.cf 476 echo p1=xx >> main.cf 477 echo p2=xx >> main.cf 478 echo p3=xx >> main.cf 479 echo p4=xx >> main.cf 480 echo whatevershebrings unix - n n - 0 other >> master.cf 481 echo ' -o body_checks=$$p1' >> master.cf 482 echo ' -o bodyx_checks=$$p2' >> master.cf 483 echo ' -oheader_checks=$$p3' >> master.cf 484 echo ' -oheaderx_checks=$$p4' >> master.cf 485 touch -t 197101010000 main.cf 486 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test30.tmp 2>&1 487 diff test30.ref test30.tmp 488 rm -f main.cf master.cf test30.tmp 489 490# Does a non-default setting propagate to a non-default value? 491 492test31: $(PROG) test31.ref 493 rm -f main.cf master.cf 494 touch main.cf master.cf 495 echo 'smtpd_helo_restrictions=whatever' >> main.cf 496 echo 'smtpd_sender_restrictions=$$smtpd_helo_restrictions' >> main.cf 497 touch -t 197101010000 main.cf 498 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc . >test31.tmp 2>&1 499 diff test31.ref test31.tmp 500 rm -f main.cf master.cf test31.tmp 501 502# Does a non-default setting propagate to a default value? 503 504test32: $(PROG) test32.ref 505 rm -f main.cf master.cf 506 touch main.cf master.cf 507 echo 'relay_domains=whatever' >> main.cf 508 touch -t 197101010000 main.cf 509 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . fast_flush_domains >test32.tmp 2>&1 510 diff test32.ref test32.tmp 511 rm -f main.cf master.cf test32.tmp 512 513# Does a default setting propagate to a non-default value? 514 515test33: $(PROG) test33.ref 516 rm -f main.cf master.cf 517 touch main.cf master.cf 518 echo 'mydestination=whatever' >> main.cf 519 echo 'always_bcc=$$relay_domains' >> main.cf 520 touch -t 197101010000 main.cf 521 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . always_bcc >test33.tmp 2>&1 522 diff test33.ref test33.tmp 523 rm -f main.cf master.cf test33.tmp 524 525test34: $(PROG) test34.ref 526 rm -f main.cf master.cf 527 touch main.cf master.cf 528 echo 'mydestination=whatever' >> main.cf 529 echo 'process_name=xxx' >> main.cf 530 echo 'process_id=yyy' >> main.cf 531 touch -t 197101010000 main.cf 532 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . mydestination process_name >test34.tmp 2>&1 533 diff test34.ref test34.tmp 534 rm -f main.cf master.cf test34.tmp 535 536test35: $(PROG) test35.ref 537 rm -f main.cf master.cf 538 touch main.cf master.cf 539 echo whatevershebrings unix - n n - 0 other >> master.cf 540 echo ' -o body_checks=whatever' >> master.cf 541 echo ' -o process_name=aaa' >> master.cf 542 echo ' -o process_id=bbb' >> master.cf 543 touch -t 197101010000 main.cf 544 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . process_name >test35.tmp 2>&1 545 diff test35.ref test35.tmp 546 rm -f main.cf master.cf test35.tmp 547 548test36: $(PROG) test36.ref 549 rm -f main.cf master.cf 550 touch main.cf master.cf 551 echo 'mydestination=$$virtual_mapx' >> main.cf 552 echo 'virtual_alias_maps=$$virtual_maps' >> main.cf 553 touch -t 197101010000 main.cf 554 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc . >test36.tmp 2>&1 555 diff test36.ref test36.tmp 556 rm -f main.cf master.cf test36.tmp 557 558test37: $(PROG) test37.ref 559 rm -f main.cf master.cf 560 touch main.cf master.cf 561 echo 'xxx=yyy' >> main.cf 562 echo 'aaa=bbb' >> main.cf 563 echo whatever unix - n n - 0 other >> master.cf 564 echo ' -o mydestination=$$xxx' >> master.cf 565 echo ' -o always_bcc=$$aaa' >> master.cf 566 echo ' -o aaa=ccc' >> master.cf 567 touch -t 197101010000 main.cf 568 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfxc . >test37.tmp 2>&1 569 diff test37.ref test37.tmp 570 rm -f main.cf master.cf test37.tmp 571 572test39: $(PROG) test39.ref 573 rm -f main.cf master.cf 574 touch main.cf master.cf 575 echo foo unix - n n - 0 other >> master.cf 576 echo bar inet - n n - 0 other >> master.cf 577 echo baz unix - n n - 0 other >> master.cf 578 touch -t 197101010000 main.cf 579 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc . '*'/unix >test39.tmp 2>&1 580 diff test39.ref test39.tmp 581 rm -f main.cf master.cf test39.tmp 582 583test40: $(PROG) test40.ref 584 rm -f main.cf master.cf 585 touch main.cf master.cf 586 echo foo unix - n n - 0 other >> master.cf 587 echo ' -voaaa=bbb' >> master.cf 588 echo ' -vo ccc=$$aaa' >> master.cf 589 echo ' -v -oddd=$$ccc' >> master.cf 590 touch -t 197101010000 main.cf 591 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfxc . '*'/unix >test40.tmp 2>&1 592 diff test40.ref test40.tmp 593 rm -f main.cf master.cf test40.tmp 594 595test41: $(PROG) test41.ref 596 rm -f main.cf master.cf 597 touch main.cf master.cf 598 echo foo unix - n n - 0 other >> master.cf 599 echo bar unix - n n - 0 other >> master.cf 600 echo baz unix - n n - 0 other >> master.cf 601 touch -t 197101010000 main.cf 602 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test41.tmp 2>&1 603 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test41.tmp 2>&1 604 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=YYY bar/unix/aaa=BBB >>test41.tmp 2>&1 605 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test41.tmp 2>&1 606 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . >>test41.tmp 2>&1 607 diff test41.ref test41.tmp 608 rm -f main.cf master.cf test41.tmp 609 610test42: $(PROG) test42.ref 611 rm -f main.cf master.cf 612 touch main.cf master.cf 613 echo foo unix - n n - 0 other >> master.cf 614 echo bar unix - n n - 0 other >> master.cf 615 echo baz unix - n n - 0 other >> master.cf 616 touch -t 197101010000 main.cf 617 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test42.tmp 2>&1 618 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test42.tmp 2>&1 619 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . >>test42.tmp 2>&1 620 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -PXc. bar/unix/xxx bar/unix/aaa >>test42.tmp 2>&1 621 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test42.tmp 2>&1 622 diff test42.ref test42.tmp 623 rm -f main.cf master.cf test42.tmp 624 625test43: $(PROG) test43.ref 626 rm -f main.cf master.cf 627 touch main.cf master.cf 628 echo foo unix - n n - 0 other >> master.cf 629 echo bar unix - n n - 0 other >> master.cf 630 echo baz unix - n n - 0 other >> master.cf 631 touch -t 197101010000 main.cf 632 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Fc . bar/unix/chroot=y bar/unix/command='aa -stuffobb=cc dd' >test43.tmp 2>&1 633 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test43.tmp 2>&1 634 diff test43.ref test43.tmp 635 rm -f main.cf master.cf test43.tmp 636 637test44: $(PROG) test44.ref 638 rm -f main.cf master.cf 639 touch main.cf master.cf 640 echo foo unix - n n - 0 other >> master.cf 641 echo bar unix - n n - 0 other >> master.cf 642 echo baz unix - n n - 0 other >> master.cf 643 touch -t 197101010000 main.cf 644 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mc . bar/unix='xx inet - n n - 0 aa -stuffobb=cc dd' >test44.tmp 2>&1 645 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test44.tmp 2>&1 646 diff test44.ref test44.tmp 647 rm -f main.cf master.cf test44.tmp 648 649test45: $(PROG) test45.ref 650 rm -f main.cf master.cf 651 touch main.cf master.cf 652 echo foo unix - n n - 0 other >> master.cf 653 echo bar xxxx - n n - 0 other >> master.cf 654 echo baz unix - n n - 0 other >> master.cf 655 touch -t 197101010000 main.cf 656 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test45.tmp 2>&1 || true 657 diff test45.ref test45.tmp 658 rm -f main.cf master.cf test45.tmp 659 660test46: $(PROG) test46.ref 661 rm -f main.cf master.cf 662 touch main.cf master.cf 663 echo foo unix - n n - 0 other >> master.cf 664 echo bar inet X n n - 0 other >> master.cf 665 echo baz unix - n n - 0 other >> master.cf 666 touch -t 197101010000 main.cf 667 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test46.tmp 2>&1 || true 668 diff test46.ref test46.tmp 669 rm -f main.cf master.cf test46.tmp 670 671test47: $(PROG) test47.ref 672 rm -f main.cf master.cf 673 touch main.cf master.cf 674 echo foo unix - n n - 0 other >> master.cf 675 echo bar inet - X n - 0 other >> master.cf 676 echo baz unix - n n - 0 other >> master.cf 677 touch -t 197101010000 main.cf 678 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test47.tmp 2>&1 || true 679 diff test47.ref test47.tmp 680 rm -f main.cf master.cf test47.tmp 681 682test48: $(PROG) test48.ref 683 rm -f main.cf master.cf 684 touch main.cf master.cf 685 echo foo unix - n n - 0 other >> master.cf 686 echo bar inet - n X - 0 other >> master.cf 687 echo baz unix - n n - 0 other >> master.cf 688 touch -t 197101010000 main.cf 689 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test48.tmp 2>&1 || true 690 diff test48.ref test48.tmp 691 rm -f main.cf master.cf test48.tmp 692 693test49: $(PROG) test49.ref 694 rm -f main.cf master.cf 695 touch main.cf master.cf 696 echo foo unix - n n - 0 other >> master.cf 697 echo bar inet - n n X 0 other >> master.cf 698 echo baz unix - n n - 0 other >> master.cf 699 touch -t 197101010000 main.cf 700 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test49.tmp 2>&1 || true 701 diff test49.ref test49.tmp 702 rm -f main.cf master.cf test49.tmp 703 704test50: $(PROG) test50.ref 705 rm -f main.cf master.cf 706 touch main.cf master.cf 707 echo foo unix - n n - 0 other >> master.cf 708 echo bar inet - n n - X other >> master.cf 709 echo baz unix - n n - 0 other >> master.cf 710 touch -t 197101010000 main.cf 711 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test50.tmp 2>&1 || true 712 diff test50.ref test50.tmp 713 rm -f main.cf master.cf test50.tmp 714 715test51: $(PROG) test51.ref 716 rm -f main.cf master.cf 717 touch main.cf master.cf 718 echo foo unix - n n -? 0 other >> master.cf 719 echo bar inet - n n X? 0 other >> master.cf 720 echo baz unix - n n 0? 0 other >> master.cf 721 touch -t 197101010000 main.cf 722 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test51.tmp 2>&1 || true 723 diff test51.ref test51.tmp 724 rm -f main.cf master.cf test51.tmp 725 726test52: $(PROG) test52.ref 727 rm -f main.cf master.cf 728 touch main.cf master.cf 729 echo foo unix - n n - 0 other >> master.cf 730 echo bar inet - n n 0 0 other >> master.cf 731 echo baz unix - n n 0 0 other >> master.cf 732 touch -t 197101010000 main.cf 733 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -MXc. bar/inet foo/unix xxx/yyy 734 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test52.tmp 2>&1 || true 735 diff test52.ref test52.tmp 736 rm -f main.cf master.cf test52.tmp 737 738test53: $(PROG) test53.ref 739 rm -f main.cf master.cf 740 touch main.cf master.cf 741 echo foo unix - n n - 0 other >> master.cf 742 echo bar inet - n n 0 0 other >> master.cf 743 echo baz unix - n n 0 0 other >> master.cf 744 touch -t 197101010000 main.cf 745 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet xxx/yyy 746 diff test53.ref master.cf 747 rm -f main.cf master.cf test53.tmp 748 749test54: $(PROG) test54.ref 750 rm -f main.cf master.cf 751 touch main.cf master.cf 752 echo foo unix - n n - 0 other >> master.cf 753 echo bar inet - n n 0 0 other >> master.cf 754 echo baz unix - n n 0 0 other >> master.cf 755 touch -t 197101010000 main.cf 756 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet foo/unix 757 diff test54.ref master.cf 758 rm -f main.cf master.cf test54.tmp 759 760test55: $(PROG) test55.ref 761 rm -f main.cf master.cf 762 touch main.cf master.cf 763 echo foo unix - n n - 0 other >> master.cf 764 echo bar inet - n n 0 0 other >> master.cf 765 echo baz unix - n n 0 0 other >> master.cf 766 touch -t 197101010000 main.cf 767 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet baz/unix 768 diff test55.ref master.cf 769 rm -f main.cf master.cf test55.tmp 770 771test56: $(PROG) test56.ref 772 rm -f main.cf master.cf 773 touch main.cf master.cf 774 echo foo unix - n n - 0 other >> master.cf 775 echo bar inet - n n 0 0 other >> master.cf 776 echo " -o first" >> master.cf 777 echo " -o second" >> master.cf 778 echo baz unix - n n 0 0 other >> master.cf 779 touch -t 197101010000 main.cf 780 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet xxx/yyy 781 diff test56.ref master.cf 782 rm -f main.cf master.cf test56.tmp 783 784# Many more tests in util/mac_expand.in. 785 786test57: $(PROG) test57.ref 787 rm -f main.cf master.cf 788 touch main.cf master.cf 789 echo 'x = $${{1} == {2}?{error}:x-value}' >> main.cf 790 echo 'y = y-value' >> main.cf 791 echo 'bar = $${x?{$$y}:$$z}' >> main.cf 792 echo 'baz = $${x?{$$z}:$$y}' >> main.cf 793 echo 'foo = $$bar$$baz' >> main.cf 794 echo 't1 = Postfix 2.11 $${{$${x?bug:x}} == {bug}?in}compatible' >> main.cf 795 echo 't2 = $$t1' >> main.cf 796 touch -t 197101010000 main.cf 797 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc. >test57.tmp 2>&1 798 diff test57.ref test57.tmp 799 rm -f main.cf master.cf test57.tmp 800 801test58: $(PROG) test58.ref 802 rm -f main.cf master.cf 803 touch main.cf master.cf 804 echo 'mydestination = foo bar pipemap:{ldap:xxx, memcache:yy}x randmap:{xx' >> main.cf 805 echo 'xxx_domain = foo' >> main.cf 806 echo 'xxx_bogus = foo' >> main.cf 807 echo 'yy_backup = bbb' >> main.cf 808 echo 'yy_bogus = bbb' >> main.cf 809 touch -t 197101010000 main.cf 810 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./postconf -nc. >test58.tmp 2>&1 || true 811 diff test58.ref test58.tmp 812 rm -f main.cf master.cf test58.tmp 813 814test59: $(PROG) test59.ref 815 rm -f main.cf master.cf 816 touch main.cf master.cf 817 echo foo unix - n n - 0 other >> master.cf 818 echo bar inet - n n 0 0 other >> master.cf 819 echo " -o name1=value1" >> master.cf 820 echo " -o { name2 = value2a value2b }" >> master.cf 821 echo " { arg1a arg1b }" >> master.cf 822 echo " { arg2a arg2b }x" >> master.cf 823 echo " { arg3a arg3b " >> master.cf 824 echo baz unix - n n 0 0 other >> master.cf 825 touch -t 197101010000 main.cf 826 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test59.tmp 2>&1 || true 827 diff test59.ref test59.tmp 828 rm -f main.cf master.cf test59.tmp 829 830test60: $(PROG) test60.ref 831 rm -f main.cf master.cf 832 touch main.cf master.cf 833 echo foo unix - n n - 0 other >> master.cf 834 echo ' -o always_bcc=bar' >> master.cf 835 touch -t 197101010000 main.cf 836 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Fhc. >test60.tmp 2>&1 || true 837 diff test60.ref test60.tmp 838 rm -f main.cf master.cf test60.tmp 839 840test61: $(PROG) test61.ref 841 rm -f main.cf master.cf 842 touch main.cf master.cf 843 echo foo unix - n n - 0 other >> master.cf 844 echo ' -o always_bcc=bar' >> master.cf 845 touch -t 197101010000 main.cf 846 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Phc. >test61.tmp 2>&1 || true 847 diff test61.ref test61.tmp 848 rm -f main.cf master.cf test61.tmp 849 850test62: $(PROG) test62.ref 851 rm -f main.cf master.cf 852 touch main.cf master.cf 853 echo foo unix - n n - 0 other >> master.cf 854 echo ' -o always_bcc=bar' >> master.cf 855 touch -t 197101010000 main.cf 856 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -FHc. >test62.tmp 2>&1 || true 857 diff test62.ref test62.tmp 858 rm -f main.cf master.cf test62.tmp 859 860test63: $(PROG) test63.ref 861 rm -f main.cf master.cf 862 touch main.cf master.cf 863 echo foo unix - n n - 0 other >> master.cf 864 echo ' -o always_bcc=bar' >> master.cf 865 touch -t 197101010000 main.cf 866 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -PHc. >test63.tmp 2>&1 || true 867 diff test63.ref test63.tmp 868 rm -f main.cf master.cf test63.tmp 869 870# main.cf overrides built-in default. 871 872test64: $(PROG) test64.ref 873 rm -f main.cf master.cf 874 touch main.cf master.cf 875 echo 'relayhost = relay-from-main.cf' >> main.cf 876 touch -t 197101010000 main.cf 877 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. relayhost >test64.tmp 2>&1 878 diff test64.ref test64.tmp 879 rm -f main.cf master.cf test64.tmp 880 881# '-o name=value' overrides main.cf. 882 883test65: $(PROG) test65.ref 884 rm -f main.cf master.cf 885 touch main.cf master.cf 886 echo 'relayhost = relay-from-main.cf' >> main.cf 887 touch -t 197101010000 main.cf 888 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. -o relayhost=relay-from-cmd-line relayhost >test65.tmp 2>&1 889 diff test65.ref test65.tmp 890 rm -f main.cf master.cf test65.tmp 891 892# unknown parameters in database configuration file (absolute pathname). 893 894test66: $(PROG) test66.ref 895 rm -f main.cf master.cf 896 touch master.cf 897 echo alias_maps = ldap:`pwd`/test66.cf >> main.cf 898 echo " " mysql:`pwd`/test66.cf >> main.cf 899 echo " " pgsql:`pwd`/test66.cf >> main.cf 900 echo " " sqlite:`pwd`/test66.cf >> main.cf 901 echo " " memcache:`pwd`/test66.cf >> main.cf 902 echo junk = junk >> test66.cf 903 touch -t 197101010000 main.cf 904 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. 2>test66.tmp >/dev/null 905 sed "s;PWD;`pwd`;" test66.ref | diff - test66.tmp 906 rm -f main.cf master.cf test66.tmp test66.cf 907 908# expand process name and service name in master.cf. 909 910test67: $(PROG) test67.ref 911 rm -f main.cf master.cf 912 touch master.cf 913 echo 'smtp inet n - n - - smtpd' >>master.cf 914 echo ' -o test1_process_name=$$process_name' >> master.cf 915 echo ' -o test1_service_name=$$service_name' >> master.cf 916 echo 'smtp unix n - n - - smtp' >>master.cf 917 echo ' -o test2_process_name=$$process_name' >> master.cf 918 echo ' -o test2_service_name=$$service_name' >> master.cf 919 touch -t 197101010000 main.cf 920 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xMfc. >test67.tmp 2>&1 921 diff test67.ref test67.tmp 922 rm -f main.cf master.cf test67.tmp 923 924test68: $(PROG) test68.ref 925 rm -f main.cf master.cf 926 touch master.cf 927 echo foo = ldap:`pwd` >> main.cf 928 echo 'alias_maps = $$foo/test68.cf' >> main.cf 929 echo " " mysql:`pwd`/test68.cf >> main.cf 930 echo " " pgsql:`pwd`/test68.cf >> main.cf 931 echo " " sqlite:`pwd`/test68.cf >> main.cf 932 echo " " memcache:`pwd`/test68.cf >> main.cf 933 echo junk = junk >> test68.cf 934 touch -t 197101010000 main.cf 935 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. 2>test68.tmp >/dev/null 936 sed "s;PWD;`pwd`;" test68.ref | diff - test68.tmp 937 rm -f main.cf master.cf test68.tmp test68.cf 938 939# See also test28 for user-defined parameters defined in main.cf. 940 941test69: $(PROG) test69.ref 942 rm -f main.cf master.cf 943 touch main.cf master.cf 944 echo whatevershebrings unix - n n - 0 other >> master.cf 945 echo " -o ldap=ldap:`pwd`" >> master.cf 946 echo ' -o body_checks=$$ldap/test69.cf' >> master.cf 947 echo junk = junk >> test69.cf 948 touch -t 197101010000 main.cf 949 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test69.tmp 2>&1 950 sed "s;PWD;`pwd`;" test69.ref | diff - test69.tmp 951 rm -f main.cf master.cf test69.tmp test69.cf 952 953# Nasty nesting. Prove that the ldap table is detected. If support for 954# legacy table syntax is dropped, replace ldap:xyz with ldap:`pwd`/xyz 955# and update the good/bad parameter name tests. 956 957test70: $(PROG) test70.ref 958 rm -f main.cf master.cf 959 touch main.cf master.cf 960 echo "smtpd_client_restrictions = check_sender_access {" >>main.cf 961 echo " pipemap:{ldap:used} { search_order = foo, bar } }" >>main.cf 962 echo "used_server_host = 127.0.0.1" >>main.cf 963 echo "unused_server_host = 127.0.0.1" >>main.cf 964 touch -t 197101010000 main.cf 965 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test70.tmp 2>&1 966 diff test70.ref test70.tmp 967 rm -f main.cf master.cf test70.tmp 968 969test71: $(PROG) test71.ref 970 rm -f main.cf master.cf 971 touch main.cf master.cf 972 echo "smtpd_client_restrictions = inline:{" >>main.cf 973 echo " {" >>main.cf 974 echo " aaa0 = #aaa1" >>main.cf 975 echo " } #aaa2" >>main.cf 976 echo " }" >>main.cf 977 echo "smtpd_helo_restrictions = pcre:{" >>main.cf 978 echo " {" >>main.cf 979 echo " /bbb0 #bbb1/" >>main.cf 980 echo " } #bbb2" >>main.cf 981 echo " }" >>main.cf 982 echo "smtpd_sender_restrictions = regexp:{" >>main.cf 983 echo " {" >>main.cf 984 echo " /ccc0 #ccc1/" >>main.cf 985 echo " } #ccc2" >>main.cf 986 echo " }" >>main.cf 987 touch -t 197101010000 main.cf 988 $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test71.tmp 2>&1 989 diff test71.ref test71.tmp 990 rm -f main.cf master.cf test71.tmp 991 992printfck: $(OBJS) $(PROG) 993 rm -rf printfck 994 mkdir printfck 995 cp *.h printfck 996 sed '1,/^# do not edit/!d' Makefile >printfck/Makefile 997 set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done 998 cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o` 999 1000lint: 1001 lint $(DEFS) $(SRCS) $(LINTFIX) 1002 1003clean: 1004 rm -f *.o *core $(PROG) $(TESTPROG) junk $(MAKES) $(AUTOS) $(DUMMIES) \ 1005 $(TEST_TMP) $(DB_MAKES) 1006 rm -rf printfck 1007 1008tidy: clean 1009 1010depend: $(MAKES) 1011 (sed '1,/^# do not edit/!d' Makefile.in; \ 1012 set -e; for i in [a-z][a-z0-9]*.c; do \ 1013 $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \ 1014 -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \ 1015 -e 's/o: \.\//o: /' -e p -e '}' ; \ 1016 done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in 1017 @$(EXPORT) make -f Makefile.in Makefile 1>&2 1018 1019# do not edit below this line - it is generated by 'make depend' 1020postconf.o: ../../include/argv.h 1021postconf.o: ../../include/check_arg.h 1022postconf.o: ../../include/compat_level.h 1023postconf.o: ../../include/dict.h 1024postconf.o: ../../include/htable.h 1025postconf.o: ../../include/mail_conf.h 1026postconf.o: ../../include/mail_dict.h 1027postconf.o: ../../include/mail_params.h 1028postconf.o: ../../include/mail_run.h 1029postconf.o: ../../include/mail_version.h 1030postconf.o: ../../include/msg.h 1031postconf.o: ../../include/msg_vstream.h 1032postconf.o: ../../include/myflock.h 1033postconf.o: ../../include/mymalloc.h 1034postconf.o: ../../include/name_code.h 1035postconf.o: ../../include/name_mask.h 1036postconf.o: ../../include/stringops.h 1037postconf.o: ../../include/sys_defs.h 1038postconf.o: ../../include/vbuf.h 1039postconf.o: ../../include/vstream.h 1040postconf.o: ../../include/vstring.h 1041postconf.o: ../../include/warn_stat.h 1042postconf.o: postconf.c 1043postconf.o: postconf.h 1044postconf_builtin.o: ../../include/argv.h 1045postconf_builtin.o: ../../include/attr.h 1046postconf_builtin.o: ../../include/check_arg.h 1047postconf_builtin.o: ../../include/dict.h 1048postconf_builtin.o: ../../include/get_hostname.h 1049postconf_builtin.o: ../../include/htable.h 1050postconf_builtin.o: ../../include/inet_proto.h 1051postconf_builtin.o: ../../include/iostuff.h 1052postconf_builtin.o: ../../include/mail_addr.h 1053postconf_builtin.o: ../../include/mail_conf.h 1054postconf_builtin.o: ../../include/mail_params.h 1055postconf_builtin.o: ../../include/mail_proto.h 1056postconf_builtin.o: ../../include/mail_version.h 1057postconf_builtin.o: ../../include/msg.h 1058postconf_builtin.o: ../../include/myflock.h 1059postconf_builtin.o: ../../include/mymalloc.h 1060postconf_builtin.o: ../../include/mynetworks.h 1061postconf_builtin.o: ../../include/name_code.h 1062postconf_builtin.o: ../../include/nvtable.h 1063postconf_builtin.o: ../../include/server_acl.h 1064postconf_builtin.o: ../../include/stringops.h 1065postconf_builtin.o: ../../include/sys_defs.h 1066postconf_builtin.o: ../../include/vbuf.h 1067postconf_builtin.o: ../../include/vstream.h 1068postconf_builtin.o: ../../include/vstring.h 1069postconf_builtin.o: bool_table.h 1070postconf_builtin.o: bool_vars.h 1071postconf_builtin.o: install_table.h 1072postconf_builtin.o: install_vars.h 1073postconf_builtin.o: int_table.h 1074postconf_builtin.o: int_vars.h 1075postconf_builtin.o: long_table.h 1076postconf_builtin.o: long_vars.h 1077postconf_builtin.o: nbool_table.h 1078postconf_builtin.o: nbool_vars.h 1079postconf_builtin.o: nint_table.h 1080postconf_builtin.o: nint_vars.h 1081postconf_builtin.o: postconf.h 1082postconf_builtin.o: postconf_builtin.c 1083postconf_builtin.o: raw_table.h 1084postconf_builtin.o: raw_vars.h 1085postconf_builtin.o: str_fn_table.h 1086postconf_builtin.o: str_fn_vars.h 1087postconf_builtin.o: str_table.h 1088postconf_builtin.o: str_vars.h 1089postconf_builtin.o: time_table.h 1090postconf_builtin.o: time_vars.h 1091postconf_dbms.o: ../../include/argv.h 1092postconf_dbms.o: ../../include/check_arg.h 1093postconf_dbms.o: ../../include/dict.h 1094postconf_dbms.o: ../../include/dict_ht.h 1095postconf_dbms.o: ../../include/dict_ldap.h 1096postconf_dbms.o: ../../include/dict_memcache.h 1097postconf_dbms.o: ../../include/dict_mysql.h 1098postconf_dbms.o: ../../include/dict_pcre.h 1099postconf_dbms.o: ../../include/dict_pgsql.h 1100postconf_dbms.o: ../../include/dict_proxy.h 1101postconf_dbms.o: ../../include/dict_regexp.h 1102postconf_dbms.o: ../../include/dict_sqlite.h 1103postconf_dbms.o: ../../include/htable.h 1104postconf_dbms.o: ../../include/mac_expand.h 1105postconf_dbms.o: ../../include/mac_parse.h 1106postconf_dbms.o: ../../include/mail_conf.h 1107postconf_dbms.o: ../../include/mail_params.h 1108postconf_dbms.o: ../../include/mkmap.h 1109postconf_dbms.o: ../../include/msg.h 1110postconf_dbms.o: ../../include/myflock.h 1111postconf_dbms.o: ../../include/mymalloc.h 1112postconf_dbms.o: ../../include/name_code.h 1113postconf_dbms.o: ../../include/split_at.h 1114postconf_dbms.o: ../../include/stringops.h 1115postconf_dbms.o: ../../include/sys_defs.h 1116postconf_dbms.o: ../../include/vbuf.h 1117postconf_dbms.o: ../../include/vstream.h 1118postconf_dbms.o: ../../include/vstring.h 1119postconf_dbms.o: pcf_ldap_suffixes.h 1120postconf_dbms.o: pcf_memcache_suffixes.h 1121postconf_dbms.o: pcf_mysql_suffixes.h 1122postconf_dbms.o: pcf_pgsql_suffixes.h 1123postconf_dbms.o: pcf_sqlite_suffixes.h 1124postconf_dbms.o: postconf.h 1125postconf_dbms.o: postconf_dbms.c 1126postconf_edit.o: ../../include/argv.h 1127postconf_edit.o: ../../include/check_arg.h 1128postconf_edit.o: ../../include/dict.h 1129postconf_edit.o: ../../include/edit_file.h 1130postconf_edit.o: ../../include/htable.h 1131postconf_edit.o: ../../include/mail_params.h 1132postconf_edit.o: ../../include/msg.h 1133postconf_edit.o: ../../include/myflock.h 1134postconf_edit.o: ../../include/mymalloc.h 1135postconf_edit.o: ../../include/name_code.h 1136postconf_edit.o: ../../include/readlline.h 1137postconf_edit.o: ../../include/split_at.h 1138postconf_edit.o: ../../include/stringops.h 1139postconf_edit.o: ../../include/sys_defs.h 1140postconf_edit.o: ../../include/vbuf.h 1141postconf_edit.o: ../../include/vstream.h 1142postconf_edit.o: ../../include/vstring.h 1143postconf_edit.o: ../../include/vstring_vstream.h 1144postconf_edit.o: postconf.h 1145postconf_edit.o: postconf_edit.c 1146postconf_lookup.o: ../../include/argv.h 1147postconf_lookup.o: ../../include/check_arg.h 1148postconf_lookup.o: ../../include/dict.h 1149postconf_lookup.o: ../../include/htable.h 1150postconf_lookup.o: ../../include/mac_expand.h 1151postconf_lookup.o: ../../include/mac_parse.h 1152postconf_lookup.o: ../../include/mail_conf.h 1153postconf_lookup.o: ../../include/msg.h 1154postconf_lookup.o: ../../include/myflock.h 1155postconf_lookup.o: ../../include/mymalloc.h 1156postconf_lookup.o: ../../include/name_code.h 1157postconf_lookup.o: ../../include/stringops.h 1158postconf_lookup.o: ../../include/sys_defs.h 1159postconf_lookup.o: ../../include/vbuf.h 1160postconf_lookup.o: ../../include/vstream.h 1161postconf_lookup.o: ../../include/vstring.h 1162postconf_lookup.o: postconf.h 1163postconf_lookup.o: postconf_lookup.c 1164postconf_main.o: ../../include/argv.h 1165postconf_main.o: ../../include/check_arg.h 1166postconf_main.o: ../../include/dict.h 1167postconf_main.o: ../../include/htable.h 1168postconf_main.o: ../../include/mac_expand.h 1169postconf_main.o: ../../include/mac_parse.h 1170postconf_main.o: ../../include/mail_conf.h 1171postconf_main.o: ../../include/mail_params.h 1172postconf_main.o: ../../include/msg.h 1173postconf_main.o: ../../include/myflock.h 1174postconf_main.o: ../../include/mymalloc.h 1175postconf_main.o: ../../include/name_code.h 1176postconf_main.o: ../../include/readlline.h 1177postconf_main.o: ../../include/stringops.h 1178postconf_main.o: ../../include/sys_defs.h 1179postconf_main.o: ../../include/vbuf.h 1180postconf_main.o: ../../include/vstream.h 1181postconf_main.o: ../../include/vstring.h 1182postconf_main.o: postconf.h 1183postconf_main.o: postconf_main.c 1184postconf_master.o: ../../include/argv.h 1185postconf_master.o: ../../include/check_arg.h 1186postconf_master.o: ../../include/dict.h 1187postconf_master.o: ../../include/htable.h 1188postconf_master.o: ../../include/mail_params.h 1189postconf_master.o: ../../include/master_proto.h 1190postconf_master.o: ../../include/msg.h 1191postconf_master.o: ../../include/myflock.h 1192postconf_master.o: ../../include/mymalloc.h 1193postconf_master.o: ../../include/name_code.h 1194postconf_master.o: ../../include/readlline.h 1195postconf_master.o: ../../include/split_at.h 1196postconf_master.o: ../../include/stringops.h 1197postconf_master.o: ../../include/sys_defs.h 1198postconf_master.o: ../../include/vbuf.h 1199postconf_master.o: ../../include/vstream.h 1200postconf_master.o: ../../include/vstring.h 1201postconf_master.o: postconf.h 1202postconf_master.o: postconf_master.c 1203postconf_match.o: ../../include/argv.h 1204postconf_match.o: ../../include/check_arg.h 1205postconf_match.o: ../../include/dict.h 1206postconf_match.o: ../../include/htable.h 1207postconf_match.o: ../../include/msg.h 1208postconf_match.o: ../../include/myflock.h 1209postconf_match.o: ../../include/mymalloc.h 1210postconf_match.o: ../../include/name_code.h 1211postconf_match.o: ../../include/split_at.h 1212postconf_match.o: ../../include/sys_defs.h 1213postconf_match.o: ../../include/vbuf.h 1214postconf_match.o: ../../include/vstream.h 1215postconf_match.o: ../../include/vstring.h 1216postconf_match.o: postconf.h 1217postconf_match.o: postconf_match.c 1218postconf_misc.o: ../../include/argv.h 1219postconf_misc.o: ../../include/check_arg.h 1220postconf_misc.o: ../../include/dict.h 1221postconf_misc.o: ../../include/htable.h 1222postconf_misc.o: ../../include/mail_conf.h 1223postconf_misc.o: ../../include/mail_params.h 1224postconf_misc.o: ../../include/myflock.h 1225postconf_misc.o: ../../include/mymalloc.h 1226postconf_misc.o: ../../include/name_code.h 1227postconf_misc.o: ../../include/safe.h 1228postconf_misc.o: ../../include/stringops.h 1229postconf_misc.o: ../../include/sys_defs.h 1230postconf_misc.o: ../../include/vbuf.h 1231postconf_misc.o: ../../include/vstream.h 1232postconf_misc.o: ../../include/vstring.h 1233postconf_misc.o: postconf.h 1234postconf_misc.o: postconf_misc.c 1235postconf_node.o: ../../include/argv.h 1236postconf_node.o: ../../include/check_arg.h 1237postconf_node.o: ../../include/dict.h 1238postconf_node.o: ../../include/htable.h 1239postconf_node.o: ../../include/msg.h 1240postconf_node.o: ../../include/myflock.h 1241postconf_node.o: ../../include/mymalloc.h 1242postconf_node.o: ../../include/name_code.h 1243postconf_node.o: ../../include/sys_defs.h 1244postconf_node.o: ../../include/vbuf.h 1245postconf_node.o: ../../include/vstream.h 1246postconf_node.o: ../../include/vstring.h 1247postconf_node.o: postconf.h 1248postconf_node.o: postconf_node.c 1249postconf_other.o: ../../include/argv.h 1250postconf_other.o: ../../include/check_arg.h 1251postconf_other.o: ../../include/dict.h 1252postconf_other.o: ../../include/dns.h 1253postconf_other.o: ../../include/htable.h 1254postconf_other.o: ../../include/mbox_conf.h 1255postconf_other.o: ../../include/msg.h 1256postconf_other.o: ../../include/myaddrinfo.h 1257postconf_other.o: ../../include/myflock.h 1258postconf_other.o: ../../include/name_code.h 1259postconf_other.o: ../../include/name_mask.h 1260postconf_other.o: ../../include/sock_addr.h 1261postconf_other.o: ../../include/sys_defs.h 1262postconf_other.o: ../../include/tls.h 1263postconf_other.o: ../../include/vbuf.h 1264postconf_other.o: ../../include/vstream.h 1265postconf_other.o: ../../include/vstring.h 1266postconf_other.o: ../../include/xsasl.h 1267postconf_other.o: postconf.h 1268postconf_other.o: postconf_other.c 1269postconf_print.o: ../../include/argv.h 1270postconf_print.o: ../../include/check_arg.h 1271postconf_print.o: ../../include/dict.h 1272postconf_print.o: ../../include/htable.h 1273postconf_print.o: ../../include/msg.h 1274postconf_print.o: ../../include/myflock.h 1275postconf_print.o: ../../include/name_code.h 1276postconf_print.o: ../../include/sys_defs.h 1277postconf_print.o: ../../include/vbuf.h 1278postconf_print.o: ../../include/vstream.h 1279postconf_print.o: ../../include/vstring.h 1280postconf_print.o: postconf.h 1281postconf_print.o: postconf_print.c 1282postconf_service.o: ../../include/argv.h 1283postconf_service.o: ../../include/check_arg.h 1284postconf_service.o: ../../include/dict.h 1285postconf_service.o: ../../include/htable.h 1286postconf_service.o: ../../include/mail_params.h 1287postconf_service.o: ../../include/msg.h 1288postconf_service.o: ../../include/myflock.h 1289postconf_service.o: ../../include/mymalloc.h 1290postconf_service.o: ../../include/name_code.h 1291postconf_service.o: ../../include/stringops.h 1292postconf_service.o: ../../include/sys_defs.h 1293postconf_service.o: ../../include/vbuf.h 1294postconf_service.o: ../../include/vstream.h 1295postconf_service.o: ../../include/vstring.h 1296postconf_service.o: postconf.h 1297postconf_service.o: postconf_service.c 1298postconf_unused.o: ../../include/argv.h 1299postconf_unused.o: ../../include/check_arg.h 1300postconf_unused.o: ../../include/dict.h 1301postconf_unused.o: ../../include/htable.h 1302postconf_unused.o: ../../include/mail_conf.h 1303postconf_unused.o: ../../include/mail_params.h 1304postconf_unused.o: ../../include/msg.h 1305postconf_unused.o: ../../include/myflock.h 1306postconf_unused.o: ../../include/name_code.h 1307postconf_unused.o: ../../include/sys_defs.h 1308postconf_unused.o: ../../include/vbuf.h 1309postconf_unused.o: ../../include/vstream.h 1310postconf_unused.o: ../../include/vstring.h 1311postconf_unused.o: postconf.h 1312postconf_unused.o: postconf_unused.c 1313postconf_user.o: ../../include/argv.h 1314postconf_user.o: ../../include/check_arg.h 1315postconf_user.o: ../../include/dict.h 1316postconf_user.o: ../../include/htable.h 1317postconf_user.o: ../../include/mac_expand.h 1318postconf_user.o: ../../include/mac_parse.h 1319postconf_user.o: ../../include/mail_conf.h 1320postconf_user.o: ../../include/mail_params.h 1321postconf_user.o: ../../include/msg.h 1322postconf_user.o: ../../include/myflock.h 1323postconf_user.o: ../../include/mymalloc.h 1324postconf_user.o: ../../include/name_code.h 1325postconf_user.o: ../../include/stringops.h 1326postconf_user.o: ../../include/sys_defs.h 1327postconf_user.o: ../../include/vbuf.h 1328postconf_user.o: ../../include/vstream.h 1329postconf_user.o: ../../include/vstring.h 1330postconf_user.o: postconf.h 1331postconf_user.o: postconf_user.c 1332