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) 13CFLAGS = $(DEBUG) $(OPT) $(DEFS) -DLEGACY_DBMS_SUPPORT 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 19TEST_TMP= main.cf master.cf test*.tmp 20DUMMIES = makes_dummy # for "make -j" 21PROG = postconf 22SAMPLES = ../../conf/main.cf.default 23INC_DIR = ../../include 24LIBS = ../../lib/libxsasl.a ../../lib/libglobal.a ../../lib/libutil.a 25 26.c.o:; $(CC) $(CFLAGS) -c $*.c 27 28$(PROG): $(OBJS) $(LIBS) 29 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) 30 31../../conf/main.cf.default: $(PROG) Makefile 32 rm -f $@ 33 (echo "# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE"; \ 34 echo "# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX."; \ 35 echo "#"; ./$(PROG) -d -c ../../conf) | \ 36 egrep -v '^(myhostname|mydomain|mynetworks|process_name|process_id) ' >$@ 37 38$(OBJS): ../../conf/makedefs.out 39 40Makefile: Makefile.in 41 cat ../../conf/makedefs.out $? >$@ 42 43test: $(TESTPROG) 44 45tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \ 46 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 \ 47 test22 test23 test24 test25 test26 test27 test28 test29 test30 test4b \ 48 test31 test32 test33 test34 test35 test36 test37 test39 test40 test41 \ 49 test42 test43 test44 test45 test46 test47 test48 test49 test50 test51 \ 50 test52 test53 test54 test55 test56 51 52root_tests: 53 54update: ../../bin/$(PROG) $(SAMPLES) 55 56../../bin/$(PROG): $(PROG) 57 cp $(PROG) ../../bin 58 59$(MAKES): makes_dummy 60 61makes_dummy: $(INC_DIR)/mail_params.h ../global/mail_params.c extract.awk Makefile.in 62 $(AWK) -f extract.awk ../*/*.c | $(SHELL) 63 touch makes_dummy 64 65 66# Define two parameters with smtpd_restriction_classes. One will be ignored. 67 68test1: $(PROG) test1.ref 69 rm -f main.cf master.cf 70 touch main.cf master.cf 71 echo smtpd_restriction_classes = foo bar >> main.cf 72 echo foo = yes >> main.cf 73 ./$(PROG) -nc . >test1.tmp 2>&1 74 diff test1.ref test1.tmp 75 rm -f main.cf master.cf test1.tmp 76 77# Define two unused parameters. Expect two warnings. 78 79test2: $(PROG) test2.ref 80 rm -f main.cf master.cf 81 touch main.cf master.cf 82 echo restriction_classes = foo bar >> main.cf 83 echo foo = yes >> main.cf 84 ./$(PROG) -nc . >test2.tmp 2>&1 85 diff test2.ref test2.tmp 86 rm -f main.cf master.cf test2.tmp 87 88# Define one parameter in main.cf, validate it with main.cf. 89 90test3: $(PROG) test3.ref 91 rm -f main.cf master.cf 92 touch main.cf master.cf 93 echo foo = yes >> main.cf 94 echo 'bar = $$foo' >> main.cf 95 echo 'always_bcc = $$bar' >> main.cf 96 ./$(PROG) -nc . >test3.tmp 2>&1 97 diff test3.ref test3.tmp 98 rm -f main.cf master.cf test3.tmp 99 100# Define one parameter in main.cf, validate it with master.cf. 101 102test4: $(PROG) test4.ref 103 rm -f main.cf master.cf 104 touch main.cf master.cf 105 echo foo = yes >> main.cf 106 echo 'bar = $$foo' >> main.cf 107 echo smtpd unix - n n - 0 smtpd >> master.cf 108 echo ' -o always_bcc=$$bar' >> master.cf 109 ./$(PROG) -nc . >test4.tmp 2>&1 110 diff test4.ref test4.tmp 111 rm -f main.cf master.cf test4.tmp 112 113# Define one parameter in master.cf, validate it with main.cf. 114 115test4b: $(PROG) test4b.ref 116 rm -f main.cf master.cf 117 touch main.cf master.cf 118 echo 'always_bcc = $$foo' >> main.cf 119 echo 'biff = $$bar' >> main.cf 120 echo 'bar = aaa' >> main.cf 121 echo smtpd1 unix - n n - 0 smtpd >> master.cf 122 echo ' -o foo=xxx -o bar=yyy -o baz=zzz' >> master.cf 123 echo '#smtpd2 unix - n n - 0 smtpd' >> master.cf 124 ./$(PROG) -nc . >test4b.tmp 2>&1 125 diff test4b.ref test4b.tmp 126 rm -f main.cf master.cf test4b.tmp 127 128# Define one user-defined parameter with name=value in master.cf, 129# validate it with known_parameter=$$name in master.cf. 130 131test5: $(PROG) test5.ref 132 rm -f main.cf master.cf 133 touch main.cf master.cf 134 echo smtpd unix - n n - 0 smtpd >> master.cf 135 echo ' -o bar=yes -o always_bcc=$$bar -o' >> master.cf 136 ./$(PROG) -nc . >test5.tmp 2>&1 137 diff test5.ref test5.tmp 138 rm -f main.cf master.cf test5.tmp 139 140# Basic functionality test: service parameters for delivery agents. 141 142test6: $(PROG) test6.ref 143 rm -f main.cf master.cf 144 touch main.cf master.cf 145 echo whatevershebrings unix - n n - 0 pipe >> master.cf 146 ./$(PROG) -c . 2>&1 | grep whatevershebrings >test6.tmp 147 diff test6.ref test6.tmp 148 rm -f main.cf master.cf test6.tmp 149 150# Basic functionality test: service parameters for spawn programs. 151 152test7: $(PROG) test7.ref 153 rm -f main.cf master.cf 154 touch main.cf master.cf 155 echo whatevershebrings unix - n n - 0 spawn >> master.cf 156 ./$(PROG) -c . 2>&1 | grep whatevershebrings >test7.tmp 157 diff test7.ref test7.tmp 158 rm -f main.cf master.cf test7.tmp 159 160test8: $(PROG) test8.ref 161 rm -f main.cf master.cf 162 touch main.cf master.cf 163 echo whatevershebrings inet - n n - 0 spawn >> master.cf 164 echo whatevershebrings_time_limit=1 >> main.cf 165 ./$(PROG) -c . 2>&1 | grep whatevershebrings >test8.tmp 166 diff test8.ref test8.tmp 167 rm -f main.cf master.cf test8.tmp 168 169test9: $(PROG) test9.ref 170 rm -f main.cf master.cf 171 touch main.cf master.cf 172 echo foo inet - n n - 0 spawn >> master.cf 173 echo bar unix - n n - 0 spawn >> master.cf 174 ./$(PROG) -c . -M '*'/inet >test9.tmp 2>&1 175 diff test9.ref test9.tmp 176 rm -f main.cf master.cf test9.tmp 177 178test10: $(PROG) test10.ref 179 rm -f main.cf master.cf 180 touch main.cf master.cf 181 echo foo inet - n n - 0 spawn >> master.cf 182 echo bar unix - n n - 0 spawn >> master.cf 183 ./$(PROG) -c . -M bar/inet foo/unix >test10.tmp 2>&1 184 diff test10.ref test10.tmp 185 rm -f main.cf master.cf test10.tmp 186 187test11: $(PROG) test11.ref 188 rm -f main.cf master.cf 189 touch main.cf master.cf 190 echo foo inet - n n - 0 spawn >> master.cf 191 echo bar unix - n n - 0 spawn >> master.cf 192 ./$(PROG) -c . -M >test11.tmp 2>&1 193 diff test11.ref test11.tmp 194 rm -f main.cf master.cf test11.tmp 195 196# Duplicate service entry. 197 198test12: $(PROG) test12.ref 199 rm -f main.cf master.cf 200 touch main.cf master.cf 201 echo bar=yes >> main.cf 202 echo foo inet - n n - 0 spawn >> master.cf 203 echo ' -o always_bcc=$$bar -o' >> master.cf 204 echo foo inet - n n - 0 spawn >> master.cf 205 echo ' -o always_bcc=$$bar -o' >> master.cf 206 ./$(PROG) -c . -M >test12.tmp 2>&1 207 diff test12.ref test12.tmp 208 rm -f main.cf master.cf test12.tmp 209 210# Define parameter with restriction_classes in master.cf, validate in main.cf. 211 212test13: $(PROG) test13.ref 213 rm -f main.cf master.cf 214 touch main.cf master.cf 215 echo bar=yes >> main.cf 216 echo baz=xx >> main.cf 217 echo foo inet - n n - 0 spawn >> master.cf 218 echo ' -o smtpd_restriction_classes=bar' >> master.cf 219 ./$(PROG) -nc . >test13.tmp 2>&1 220 diff test13.ref test13.tmp 221 rm -f main.cf master.cf test13.tmp 222 223# Define parameter with restriction_classes in main.cf, validate in master.cf. 224 225test14: $(PROG) test14.ref 226 rm -f main.cf master.cf 227 touch main.cf master.cf 228 echo smtpd_restriction_classes=bar >> main.cf 229 echo foo inet - n n - 0 spawn >> master.cf 230 echo ' -o bar=yes -o baz=xx' >> master.cf 231 ./$(PROG) -nc . >test14.tmp 2>&1 232 diff test14.ref test14.tmp 233 rm -f main.cf master.cf test14.tmp 234 235# Define two parameters, one is hidden by master.cf. 236 237test15: $(PROG) test15.ref 238 rm -f main.cf master.cf 239 touch main.cf master.cf 240 echo bar=xx >> main.cf 241 echo baz=yy >> main.cf 242 echo foo inet - n n - 0 spawn >> master.cf 243 echo ' -o bar=yes -o always_bcc=$$bar$$baz' >> master.cf 244 ./$(PROG) -nc . >test15.tmp 2>&1 245 diff test15.ref test15.tmp 246 rm -f main.cf master.cf test15.tmp 247 248# Test graceful degradation if master.cf is unavailable. 249 250test16: $(PROG) test16.ref 251 rm -f main.cf master.cf 252 touch main.cf 253 ./$(PROG) -nc . >test16.tmp 2>&1 254 diff test16.ref test16.tmp 255 rm -f main.cf master.cf test16.tmp 256 257test17: $(PROG) test17.ref 258 rm -f main.cf master.cf 259 touch main.cf 260 -./$(PROG) -Mc . >test17.tmp 2>&1; exit 0 261 diff test17.ref test17.tmp 262 rm -f main.cf master.cf test17.tmp 263 264# Test legacy $name in built-in defaults. 265 266test18: $(PROG) test18.ref 267 rm -f main.cf master.cf 268 touch main.cf master.cf 269 echo virtual_maps=xxx >> main.cf 270 echo smtpd_client_connection_limit_exceptions=yyy >> main.cf 271 ./$(PROG) -nc . >test18.tmp 2>&1 272 diff test18.ref test18.tmp 273 rm -f main.cf master.cf test18.tmp 274 275# Test $name in "raw" parameters. 276 277test19: $(PROG) test19.ref 278 rm -f main.cf master.cf 279 touch main.cf master.cf 280 echo forward_path='$$'aaaa >> main.cf 281 echo default_rbl_reply='$$'bbbb >> main.cf 282 ./$(PROG) -nc . >test19.tmp 2>&1 283 diff test19.ref test19.tmp 284 rm -f main.cf master.cf test19.tmp 285 286# Test master.cf line folding. 287 288test20: $(PROG) test20.ref 289 rm -f main.cf master.cf 290 touch main.cf master.cf 291 echo foo inet - n n - 0 spawn >> master.cf 292 echo ' -o always_bcc=$$bar$$baz' >> master.cf 293 ./$(PROG) -Mfc . >test20.tmp 2>&1 294 diff test20.ref test20.tmp 295 rm -f main.cf master.cf test20.tmp 296 297# Test main.cf line folding. 298 299test21: $(PROG) test21.ref 300 rm -f main.cf master.cf 301 touch main.cf master.cf 302 echo forward_path = xxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxx \ 303 xxxxxxxxxxxxx xxxxxxxxxxxxxx >> main.cf 304 ./$(PROG) -nfc . >test21.tmp 2>&1 305 diff test21.ref test21.tmp 306 rm -f main.cf master.cf test21.tmp 307 308# Like test6, but using a delivery agent that has no _time_limit magic. 309 310test22: $(PROG) test22.ref 311 rm -f main.cf master.cf 312 touch main.cf master.cf 313 echo whatevershebrings unix - n n - 0 smtp >> master.cf 314 ./$(PROG) -c . 2>&1 | grep whatevershebrings >test22.tmp 315 diff test22.ref test22.tmp 316 rm -f main.cf master.cf test22.tmp 317 318# Test the -C flag for each category. 319 320test23: $(PROG) test23.ref 321 rm -f main.cf master.cf 322 touch main.cf master.cf 323 echo always_bcc = yes >> main.cf 324 echo name = value >> main.cf 325 echo whatevershebrings unix - n n - 0 smtp >> master.cf 326 echo ' -o always_bcc=$$name' >> master.cf 327 ./$(PROG) -c . -nC builtin >test23.tmp 2>&1 328 diff test23.ref test23.tmp 329 rm -f main.cf master.cf test23.tmp 330 331test24: $(PROG) test24.ref 332 rm -f main.cf master.cf 333 touch main.cf master.cf 334 echo always_bcc = yes >> main.cf 335 echo name = value >> main.cf 336 echo whatevershebrings unix - n n - 0 smtp >> master.cf 337 echo ' -o always_bcc=$$name' >> master.cf 338 ./$(PROG) -c . -nC user >test24.tmp 2>&1 339 diff test24.ref test24.tmp 340 rm -f main.cf master.cf test24.tmp 341 342test25: $(PROG) test25.ref 343 rm -f main.cf master.cf 344 touch main.cf master.cf 345 echo always_bcc = yes >> main.cf 346 echo name = value >> main.cf 347 echo whatevershebrings unix - n n - 0 smtp >> master.cf 348 echo ' -o always_bcc=$$name' >> master.cf 349 ./$(PROG) -c . -C service 2>&1 | grep whatevershebrings >test25.tmp 350 diff test25.ref test25.tmp 351 rm -f main.cf master.cf test25.tmp 352 353# Test completeness of "-C all". 354 355test26: $(PROG) test26.ref 356 rm -f main.cf master.cf 357 touch main.cf master.cf 358 echo always_bcc = yes >> main.cf 359 echo name = value >> main.cf 360 echo whatevershebrings unix - n n - 0 smtp >> master.cf 361 echo ' -o always_bcc=$$name' >> master.cf 362 ./$(PROG) -nc . -C all >test26.tmp 2>&1 363 diff test26.ref test26.tmp 364 rm -f main.cf master.cf test26.tmp 365 366test27: $(PROG) test27.ref 367 rm -f main.cf master.cf 368 touch main.cf master.cf 369 echo always_bcc = yes >> main.cf 370 echo name = value >> main.cf 371 echo whatevershebrings unix - n n - 0 smtp >> master.cf 372 echo ' -o always_bcc=$$name' >> master.cf 373 ./$(PROG) -c . -C all 2>&1 | grep whatevershebrings >test27.tmp 374 diff test27.ref test27.tmp 375 rm -f main.cf master.cf test27.tmp 376 377# Test macro expansion, type:table parsing and scoping. 378 379test28: $(PROG) test28.ref 380 rm -f main.cf master.cf 381 touch main.cf master.cf 382 echo 'xx = proxy:ldap:foo' >> main.cf 383 echo 'foo_domain = bar' >> main.cf 384 echo 'header_checks = ldap:hh' >> main.cf 385 echo 'hh_domain = whatever' >> main.cf 386 echo 'zz = $$yy' >> main.cf 387 echo 'yy = aap' >> main.cf 388 echo 'db = memcache' >> main.cf 389 echo whatevershebrings unix - n n - 0 other >> master.cf 390 echo ' -o body_checks=$$db:zz' >> master.cf 391 echo 'zz_domain = whatever' >> main.cf 392 echo 'aa_domain = whatever' >> main.cf 393 ./$(PROG) -nc . >test28.tmp 2>&1 394 diff test28.ref test28.tmp 395 rm -f main.cf master.cf test28.tmp 396 397# Test the handling of known and unknown database-defined suffixes. 398 399test29: $(PROG) test29.ref 400 rm -f main.cf master.cf 401 touch main.cf master.cf 402 echo 'ldapxx = proxy:ldap:ldapfoo' >> main.cf 403 echo 'ldapfoo_domain = bar' >> main.cf 404 echo 'ldapfoo_domainx = bar' >> main.cf 405 echo 'mysqlxx = proxy:mysql:mysqlfoo' >> main.cf 406 echo 'mysqlfoo_domain = bar' >> main.cf 407 echo 'mysqlfoo_domainx = bar' >> main.cf 408 echo 'pgsqlxx = proxy:pgsql:pgsqlfoo' >> main.cf 409 echo 'pgsqlfoo_domain = bar' >> main.cf 410 echo 'pgsqlfoo_domainx = bar' >> main.cf 411 echo 'sqlitexx = proxy:sqlite:sqlitefoo' >> main.cf 412 echo 'sqlitefoo_domain = bar' >> main.cf 413 echo 'sqlitefoo_domainx = bar' >> main.cf 414 echo 'memcachexx = proxy:memcache:memcachefoo' >> main.cf 415 echo 'memcachefoo_domain = bar' >> main.cf 416 echo 'memcachefoo_domainx = bar' >> main.cf 417 ./$(PROG) -nc . >test29.tmp 2>&1 418 diff test29.ref test29.tmp 419 rm -f main.cf master.cf test29.tmp 420 421test30: $(PROG) test30.ref 422 rm -f main.cf master.cf 423 touch main.cf master.cf 424 echo p1=xx >> main.cf 425 echo p2=xx >> main.cf 426 echo p3=xx >> main.cf 427 echo p4=xx >> main.cf 428 echo whatevershebrings unix - n n - 0 other >> master.cf 429 echo ' -o body_checks=$$p1' >> master.cf 430 echo ' -o bodyx_checks=$$p2' >> master.cf 431 echo ' -oheader_checks=$$p3' >> master.cf 432 echo ' -oheaderx_checks=$$p4' >> master.cf 433 ./$(PROG) -nc . >test30.tmp 2>&1 434 diff test30.ref test30.tmp 435 rm -f main.cf master.cf test30.tmp 436 437# Does a non-default setting propagate to a non-default value? 438 439test31: $(PROG) test31.ref 440 rm -f main.cf master.cf 441 touch main.cf master.cf 442 echo 'smtpd_helo_restrictions=whatever' >> main.cf 443 echo 'smtpd_sender_restrictions=$$smtpd_helo_restrictions' >> main.cf 444 ./$(PROG) -nxc . >test31.tmp 2>&1 445 diff test31.ref test31.tmp 446 rm -f main.cf master.cf test31.tmp 447 448# Does a non-default setting propagate to a default value? 449 450test32: $(PROG) test32.ref 451 rm -f main.cf master.cf 452 touch main.cf master.cf 453 echo 'relay_domains=whatever' >> main.cf 454 ./$(PROG) -xc . fast_flush_domains >test32.tmp 2>&1 455 diff test32.ref test32.tmp 456 rm -f main.cf master.cf test32.tmp 457 458# Does a default setting propagate to a non-default value? 459 460test33: $(PROG) test33.ref 461 rm -f main.cf master.cf 462 touch main.cf master.cf 463 echo 'mydestination=whatever' >> main.cf 464 echo 'always_bcc=$$relay_domains' >> main.cf 465 ./$(PROG) -xc . always_bcc >test33.tmp 2>&1 466 diff test33.ref test33.tmp 467 rm -f main.cf master.cf test33.tmp 468 469test34: $(PROG) test34.ref 470 rm -f main.cf master.cf 471 touch main.cf master.cf 472 echo 'mydestination=whatever' >> main.cf 473 echo 'process_name=xxx' >> main.cf 474 echo 'process_id=yyy' >> main.cf 475 ./$(PROG) -xc . mydestination process_name >test34.tmp 2>&1 476 diff test34.ref test34.tmp 477 rm -f main.cf master.cf test34.tmp 478 479test35: $(PROG) test35.ref 480 rm -f main.cf master.cf 481 touch main.cf master.cf 482 echo whatevershebrings unix - n n - 0 other >> master.cf 483 echo ' -o body_checks=whatever' >> master.cf 484 echo ' -o process_name=aaa' >> master.cf 485 echo ' -o process_id=bbb' >> master.cf 486 ./$(PROG) -xc . process_name >test35.tmp 2>&1 487 diff test35.ref test35.tmp 488 rm -f main.cf master.cf test35.tmp 489 490test36: $(PROG) test36.ref 491 rm -f main.cf master.cf 492 touch main.cf master.cf 493 echo 'mydestination=$$virtual_mapx' >> main.cf 494 echo 'virtual_alias_maps=$$virtual_maps' >> main.cf 495 ./$(PROG) -nxc . >test36.tmp 2>&1 496 diff test36.ref test36.tmp 497 rm -f main.cf master.cf test36.tmp 498 499test37: $(PROG) test37.ref 500 rm -f main.cf master.cf 501 touch main.cf master.cf 502 echo 'xxx=yyy' >> main.cf 503 echo 'aaa=bbb' >> main.cf 504 echo whatever unix - n n - 0 other >> master.cf 505 echo ' -o mydestination=$$xxx' >> master.cf 506 echo ' -o always_bcc=$$aaa' >> master.cf 507 echo ' -o aaa=ccc' >> master.cf 508 ./$(PROG) -Mfxc . >test37.tmp 2>&1 509 diff test37.ref test37.tmp 510 rm -f main.cf master.cf test37.tmp 511 512test39: $(PROG) test39.ref 513 rm -f main.cf master.cf 514 touch main.cf master.cf 515 echo foo unix - n n - 0 other >> master.cf 516 echo bar inet - n n - 0 other >> master.cf 517 echo baz unix - n n - 0 other >> master.cf 518 ./$(PROG) -Mfc . '*'/unix >test39.tmp 2>&1 519 diff test39.ref test39.tmp 520 rm -f main.cf master.cf test39.tmp 521 522test40: $(PROG) test40.ref 523 rm -f main.cf master.cf 524 touch main.cf master.cf 525 echo foo unix - n n - 0 other >> master.cf 526 echo ' -voaaa=bbb' >> master.cf 527 echo ' -vo ccc=$$aaa' >> master.cf 528 echo ' -v -oddd=$$ccc' >> master.cf 529 ./$(PROG) -Mfxc . '*'/unix >test40.tmp 2>&1 530 diff test40.ref test40.tmp 531 rm -f main.cf master.cf test40.tmp 532 533test41: $(PROG) test41.ref 534 rm -f main.cf master.cf 535 touch main.cf master.cf 536 echo foo unix - n n - 0 other >> master.cf 537 echo bar unix - n n - 0 other >> master.cf 538 echo baz unix - n n - 0 other >> master.cf 539 ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test41.tmp 2>&1 540 ./$(PROG) -Mfc. >>test41.tmp 2>&1 541 ./$(PROG) -Pc . bar/unix/xxx=YYY bar/unix/aaa=BBB >>test41.tmp 2>&1 542 ./$(PROG) -Mfc. >>test41.tmp 2>&1 543 ./$(PROG) -Pc . >>test41.tmp 2>&1 544 diff test41.ref test41.tmp 545 rm -f main.cf master.cf test41.tmp 546 547test42: $(PROG) test42.ref 548 rm -f main.cf master.cf 549 touch main.cf master.cf 550 echo foo unix - n n - 0 other >> master.cf 551 echo bar unix - n n - 0 other >> master.cf 552 echo baz unix - n n - 0 other >> master.cf 553 ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test42.tmp 2>&1 554 ./$(PROG) -Mfc. >>test42.tmp 2>&1 555 ./$(PROG) -Pc . >>test42.tmp 2>&1 556 ./$(PROG) -PXc. bar/unix/xxx bar/unix/aaa >>test42.tmp 2>&1 557 ./$(PROG) -Mfc. >>test42.tmp 2>&1 558 diff test42.ref test42.tmp 559 rm -f main.cf master.cf test42.tmp 560 561test43: $(PROG) test43.ref 562 rm -f main.cf master.cf 563 touch main.cf master.cf 564 echo foo unix - n n - 0 other >> master.cf 565 echo bar unix - n n - 0 other >> master.cf 566 echo baz unix - n n - 0 other >> master.cf 567 ./$(PROG) -Fc . bar/unix/chroot=y bar/unix/command='aa -stuffobb=cc dd' >test43.tmp 2>&1 568 ./$(PROG) -Mfc. >>test43.tmp 2>&1 569 diff test43.ref test43.tmp 570 rm -f main.cf master.cf test43.tmp 571 572test44: $(PROG) test44.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 unix - n n - 0 other >> master.cf 577 echo baz unix - n n - 0 other >> master.cf 578 ./$(PROG) -Mc . bar/unix='xx inet - n n - 0 aa -stuffobb=cc dd' >test44.tmp 2>&1 579 ./$(PROG) -Mfc. >>test44.tmp 2>&1 580 diff test44.ref test44.tmp 581 rm -f main.cf master.cf test44.tmp 582 583test45: $(PROG) test45.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 bar xxxx - n n - 0 other >> master.cf 588 echo baz unix - n n - 0 other >> master.cf 589 ./$(PROG) -Mfc. >test45.tmp 2>&1 || true 590 diff test45.ref test45.tmp 591 rm -f main.cf master.cf test45.tmp 592 593test46: $(PROG) test46.ref 594 rm -f main.cf master.cf 595 touch main.cf master.cf 596 echo foo unix - n n - 0 other >> master.cf 597 echo bar inet X n n - 0 other >> master.cf 598 echo baz unix - n n - 0 other >> master.cf 599 ./$(PROG) -Mfc. >test46.tmp 2>&1 || true 600 diff test46.ref test46.tmp 601 rm -f main.cf master.cf test46.tmp 602 603test47: $(PROG) test47.ref 604 rm -f main.cf master.cf 605 touch main.cf master.cf 606 echo foo unix - n n - 0 other >> master.cf 607 echo bar inet - X n - 0 other >> master.cf 608 echo baz unix - n n - 0 other >> master.cf 609 ./$(PROG) -Mfc. >test47.tmp 2>&1 || true 610 diff test47.ref test47.tmp 611 rm -f main.cf master.cf test47.tmp 612 613test48: $(PROG) test48.ref 614 rm -f main.cf master.cf 615 touch main.cf master.cf 616 echo foo unix - n n - 0 other >> master.cf 617 echo bar inet - n X - 0 other >> master.cf 618 echo baz unix - n n - 0 other >> master.cf 619 ./$(PROG) -Mfc. >test48.tmp 2>&1 || true 620 diff test48.ref test48.tmp 621 rm -f main.cf master.cf test48.tmp 622 623test49: $(PROG) test49.ref 624 rm -f main.cf master.cf 625 touch main.cf master.cf 626 echo foo unix - n n - 0 other >> master.cf 627 echo bar inet - n n X 0 other >> master.cf 628 echo baz unix - n n - 0 other >> master.cf 629 ./$(PROG) -Mfc. >test49.tmp 2>&1 || true 630 diff test49.ref test49.tmp 631 rm -f main.cf master.cf test49.tmp 632 633test50: $(PROG) test50.ref 634 rm -f main.cf master.cf 635 touch main.cf master.cf 636 echo foo unix - n n - 0 other >> master.cf 637 echo bar inet - n n - X other >> master.cf 638 echo baz unix - n n - 0 other >> master.cf 639 ./$(PROG) -Mfc. >test50.tmp 2>&1 || true 640 diff test50.ref test50.tmp 641 rm -f main.cf master.cf test50.tmp 642 643test51: $(PROG) test51.ref 644 rm -f main.cf master.cf 645 touch main.cf master.cf 646 echo foo unix - n n -? 0 other >> master.cf 647 echo bar inet - n n X? 0 other >> master.cf 648 echo baz unix - n n 0? 0 other >> master.cf 649 ./$(PROG) -Mfc. >test51.tmp 2>&1 || true 650 diff test51.ref test51.tmp 651 rm -f main.cf master.cf test51.tmp 652 653test52: $(PROG) test52.ref 654 rm -f main.cf master.cf 655 touch main.cf master.cf 656 echo foo unix - n n - 0 other >> master.cf 657 echo bar inet - n n 0 0 other >> master.cf 658 echo baz unix - n n 0 0 other >> master.cf 659 ./$(PROG) -MXc. bar/inet foo/unix xxx/yyy 660 ./$(PROG) -Mfc. >test52.tmp 2>&1 || true 661 diff test52.ref test52.tmp 662 rm -f main.cf master.cf test52.tmp 663 664test53: $(PROG) test53.ref 665 rm -f main.cf master.cf 666 touch main.cf master.cf 667 echo foo unix - n n - 0 other >> master.cf 668 echo bar inet - n n 0 0 other >> master.cf 669 echo baz unix - n n 0 0 other >> master.cf 670 ./$(PROG) -M#c. bar/inet xxx/yyy 671 diff test53.ref master.cf 672 rm -f main.cf master.cf test53.tmp 673 674test54: $(PROG) test54.ref 675 rm -f main.cf master.cf 676 touch main.cf master.cf 677 echo foo unix - n n - 0 other >> master.cf 678 echo bar inet - n n 0 0 other >> master.cf 679 echo baz unix - n n 0 0 other >> master.cf 680 ./$(PROG) -M#c. bar/inet foo/unix 681 diff test54.ref master.cf 682 rm -f main.cf master.cf test54.tmp 683 684test55: $(PROG) test55.ref 685 rm -f main.cf master.cf 686 touch main.cf master.cf 687 echo foo unix - n n - 0 other >> master.cf 688 echo bar inet - n n 0 0 other >> master.cf 689 echo baz unix - n n 0 0 other >> master.cf 690 ./$(PROG) -M#c. bar/inet baz/unix 691 diff test55.ref master.cf 692 rm -f main.cf master.cf test55.tmp 693 694test56: $(PROG) test56.ref 695 rm -f main.cf master.cf 696 touch main.cf master.cf 697 echo foo unix - n n - 0 other >> master.cf 698 echo bar inet - n n 0 0 other >> master.cf 699 echo " -o first" >> master.cf 700 echo " -o second" >> master.cf 701 echo baz unix - n n 0 0 other >> master.cf 702 ./$(PROG) -M#c. bar/inet xxx/yyy 703 diff test56.ref master.cf 704 rm -f main.cf master.cf test56.tmp 705 706printfck: $(OBJS) $(PROG) 707 rm -rf printfck 708 mkdir printfck 709 cp *.h printfck 710 sed '1,/^# do not edit/!d' Makefile >printfck/Makefile 711 set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done 712 cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o` 713 714lint: 715 lint $(DEFS) $(SRCS) $(LINTFIX) 716 717clean: 718 rm -f *.o *core $(PROG) $(TESTPROG) junk $(MAKES) $(AUTOS) $(DUMMIES) \ 719 $(TEST_TMP) 720 rm -rf printfck 721 722tidy: clean 723 724depend: $(MAKES) 725 (sed '1,/^# do not edit/!d' Makefile.in; \ 726 set -e; for i in [a-z][a-z0-9]*.c; do \ 727 $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \ 728 -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \ 729 -e 's/o: \.\//o: /' -e p -e '}' ; \ 730 done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in 731 @$(EXPORT) make -f Makefile.in Makefile 1>&2 732 733# do not edit below this line - it is generated by 'make depend' 734postconf.o: ../../include/argv.h 735postconf.o: ../../include/dict.h 736postconf.o: ../../include/htable.h 737postconf.o: ../../include/mail_conf.h 738postconf.o: ../../include/mail_dict.h 739postconf.o: ../../include/mail_params.h 740postconf.o: ../../include/mail_run.h 741postconf.o: ../../include/mail_version.h 742postconf.o: ../../include/msg.h 743postconf.o: ../../include/msg_vstream.h 744postconf.o: ../../include/myflock.h 745postconf.o: ../../include/mymalloc.h 746postconf.o: ../../include/name_code.h 747postconf.o: ../../include/name_mask.h 748postconf.o: ../../include/stringops.h 749postconf.o: ../../include/sys_defs.h 750postconf.o: ../../include/vbuf.h 751postconf.o: ../../include/vstream.h 752postconf.o: ../../include/vstring.h 753postconf.o: ../../include/warn_stat.h 754postconf.o: postconf.c 755postconf.o: postconf.h 756postconf_builtin.o: ../../include/argv.h 757postconf_builtin.o: ../../include/attr.h 758postconf_builtin.o: ../../include/dict.h 759postconf_builtin.o: ../../include/get_hostname.h 760postconf_builtin.o: ../../include/htable.h 761postconf_builtin.o: ../../include/inet_proto.h 762postconf_builtin.o: ../../include/iostuff.h 763postconf_builtin.o: ../../include/mail_addr.h 764postconf_builtin.o: ../../include/mail_conf.h 765postconf_builtin.o: ../../include/mail_params.h 766postconf_builtin.o: ../../include/mail_proto.h 767postconf_builtin.o: ../../include/mail_version.h 768postconf_builtin.o: ../../include/msg.h 769postconf_builtin.o: ../../include/myflock.h 770postconf_builtin.o: ../../include/mymalloc.h 771postconf_builtin.o: ../../include/mynetworks.h 772postconf_builtin.o: ../../include/name_code.h 773postconf_builtin.o: ../../include/server_acl.h 774postconf_builtin.o: ../../include/stringops.h 775postconf_builtin.o: ../../include/sys_defs.h 776postconf_builtin.o: ../../include/vbuf.h 777postconf_builtin.o: ../../include/vstream.h 778postconf_builtin.o: ../../include/vstring.h 779postconf_builtin.o: bool_table.h 780postconf_builtin.o: bool_vars.h 781postconf_builtin.o: install_table.h 782postconf_builtin.o: install_vars.h 783postconf_builtin.o: int_table.h 784postconf_builtin.o: int_vars.h 785postconf_builtin.o: long_table.h 786postconf_builtin.o: long_vars.h 787postconf_builtin.o: nbool_table.h 788postconf_builtin.o: nbool_vars.h 789postconf_builtin.o: nint_table.h 790postconf_builtin.o: nint_vars.h 791postconf_builtin.o: postconf.h 792postconf_builtin.o: postconf_builtin.c 793postconf_builtin.o: raw_table.h 794postconf_builtin.o: raw_vars.h 795postconf_builtin.o: str_fn_table.h 796postconf_builtin.o: str_fn_vars.h 797postconf_builtin.o: str_table.h 798postconf_builtin.o: str_vars.h 799postconf_builtin.o: time_table.h 800postconf_builtin.o: time_vars.h 801postconf_dbms.o: ../../include/argv.h 802postconf_dbms.o: ../../include/dict.h 803postconf_dbms.o: ../../include/dict_ldap.h 804postconf_dbms.o: ../../include/dict_memcache.h 805postconf_dbms.o: ../../include/dict_mysql.h 806postconf_dbms.o: ../../include/dict_pgsql.h 807postconf_dbms.o: ../../include/dict_proxy.h 808postconf_dbms.o: ../../include/dict_sqlite.h 809postconf_dbms.o: ../../include/htable.h 810postconf_dbms.o: ../../include/mac_expand.h 811postconf_dbms.o: ../../include/mac_parse.h 812postconf_dbms.o: ../../include/mail_conf.h 813postconf_dbms.o: ../../include/myflock.h 814postconf_dbms.o: ../../include/name_code.h 815postconf_dbms.o: ../../include/split_at.h 816postconf_dbms.o: ../../include/stringops.h 817postconf_dbms.o: ../../include/sys_defs.h 818postconf_dbms.o: ../../include/vbuf.h 819postconf_dbms.o: ../../include/vstream.h 820postconf_dbms.o: ../../include/vstring.h 821postconf_dbms.o: postconf.h 822postconf_dbms.o: postconf_dbms.c 823postconf_edit.o: ../../include/argv.h 824postconf_edit.o: ../../include/dict.h 825postconf_edit.o: ../../include/edit_file.h 826postconf_edit.o: ../../include/htable.h 827postconf_edit.o: ../../include/mail_params.h 828postconf_edit.o: ../../include/msg.h 829postconf_edit.o: ../../include/myflock.h 830postconf_edit.o: ../../include/mymalloc.h 831postconf_edit.o: ../../include/name_code.h 832postconf_edit.o: ../../include/readlline.h 833postconf_edit.o: ../../include/split_at.h 834postconf_edit.o: ../../include/stringops.h 835postconf_edit.o: ../../include/sys_defs.h 836postconf_edit.o: ../../include/vbuf.h 837postconf_edit.o: ../../include/vstream.h 838postconf_edit.o: ../../include/vstring.h 839postconf_edit.o: ../../include/vstring_vstream.h 840postconf_edit.o: postconf.h 841postconf_edit.o: postconf_edit.c 842postconf_lookup.o: ../../include/argv.h 843postconf_lookup.o: ../../include/dict.h 844postconf_lookup.o: ../../include/htable.h 845postconf_lookup.o: ../../include/mac_expand.h 846postconf_lookup.o: ../../include/mac_parse.h 847postconf_lookup.o: ../../include/mail_conf.h 848postconf_lookup.o: ../../include/msg.h 849postconf_lookup.o: ../../include/myflock.h 850postconf_lookup.o: ../../include/mymalloc.h 851postconf_lookup.o: ../../include/name_code.h 852postconf_lookup.o: ../../include/stringops.h 853postconf_lookup.o: ../../include/sys_defs.h 854postconf_lookup.o: ../../include/vbuf.h 855postconf_lookup.o: ../../include/vstream.h 856postconf_lookup.o: ../../include/vstring.h 857postconf_lookup.o: postconf.h 858postconf_lookup.o: postconf_lookup.c 859postconf_main.o: ../../include/argv.h 860postconf_main.o: ../../include/dict.h 861postconf_main.o: ../../include/htable.h 862postconf_main.o: ../../include/mac_expand.h 863postconf_main.o: ../../include/mac_parse.h 864postconf_main.o: ../../include/mail_conf.h 865postconf_main.o: ../../include/mail_params.h 866postconf_main.o: ../../include/msg.h 867postconf_main.o: ../../include/myflock.h 868postconf_main.o: ../../include/mymalloc.h 869postconf_main.o: ../../include/name_code.h 870postconf_main.o: ../../include/readlline.h 871postconf_main.o: ../../include/stringops.h 872postconf_main.o: ../../include/sys_defs.h 873postconf_main.o: ../../include/vbuf.h 874postconf_main.o: ../../include/vstream.h 875postconf_main.o: ../../include/vstring.h 876postconf_main.o: postconf.h 877postconf_main.o: postconf_main.c 878postconf_master.o: ../../include/argv.h 879postconf_master.o: ../../include/dict.h 880postconf_master.o: ../../include/htable.h 881postconf_master.o: ../../include/mail_params.h 882postconf_master.o: ../../include/master_proto.h 883postconf_master.o: ../../include/msg.h 884postconf_master.o: ../../include/myflock.h 885postconf_master.o: ../../include/mymalloc.h 886postconf_master.o: ../../include/name_code.h 887postconf_master.o: ../../include/readlline.h 888postconf_master.o: ../../include/split_at.h 889postconf_master.o: ../../include/stringops.h 890postconf_master.o: ../../include/sys_defs.h 891postconf_master.o: ../../include/vbuf.h 892postconf_master.o: ../../include/vstream.h 893postconf_master.o: ../../include/vstring.h 894postconf_master.o: postconf.h 895postconf_master.o: postconf_master.c 896postconf_match.o: ../../include/argv.h 897postconf_match.o: ../../include/dict.h 898postconf_match.o: ../../include/htable.h 899postconf_match.o: ../../include/msg.h 900postconf_match.o: ../../include/myflock.h 901postconf_match.o: ../../include/mymalloc.h 902postconf_match.o: ../../include/name_code.h 903postconf_match.o: ../../include/split_at.h 904postconf_match.o: ../../include/sys_defs.h 905postconf_match.o: ../../include/vbuf.h 906postconf_match.o: ../../include/vstream.h 907postconf_match.o: ../../include/vstring.h 908postconf_match.o: postconf.h 909postconf_match.o: postconf_match.c 910postconf_misc.o: ../../include/argv.h 911postconf_misc.o: ../../include/dict.h 912postconf_misc.o: ../../include/htable.h 913postconf_misc.o: ../../include/mail_conf.h 914postconf_misc.o: ../../include/mail_params.h 915postconf_misc.o: ../../include/myflock.h 916postconf_misc.o: ../../include/mymalloc.h 917postconf_misc.o: ../../include/name_code.h 918postconf_misc.o: ../../include/safe.h 919postconf_misc.o: ../../include/sys_defs.h 920postconf_misc.o: ../../include/vbuf.h 921postconf_misc.o: ../../include/vstream.h 922postconf_misc.o: ../../include/vstring.h 923postconf_misc.o: postconf.h 924postconf_misc.o: postconf_misc.c 925postconf_node.o: ../../include/argv.h 926postconf_node.o: ../../include/dict.h 927postconf_node.o: ../../include/htable.h 928postconf_node.o: ../../include/msg.h 929postconf_node.o: ../../include/myflock.h 930postconf_node.o: ../../include/mymalloc.h 931postconf_node.o: ../../include/name_code.h 932postconf_node.o: ../../include/sys_defs.h 933postconf_node.o: ../../include/vbuf.h 934postconf_node.o: ../../include/vstream.h 935postconf_node.o: ../../include/vstring.h 936postconf_node.o: postconf.h 937postconf_node.o: postconf_node.c 938postconf_other.o: ../../include/argv.h 939postconf_other.o: ../../include/dict.h 940postconf_other.o: ../../include/htable.h 941postconf_other.o: ../../include/mbox_conf.h 942postconf_other.o: ../../include/myflock.h 943postconf_other.o: ../../include/name_code.h 944postconf_other.o: ../../include/sys_defs.h 945postconf_other.o: ../../include/vbuf.h 946postconf_other.o: ../../include/vstream.h 947postconf_other.o: ../../include/vstring.h 948postconf_other.o: ../../include/xsasl.h 949postconf_other.o: postconf.h 950postconf_other.o: postconf_other.c 951postconf_print.o: ../../include/argv.h 952postconf_print.o: ../../include/dict.h 953postconf_print.o: ../../include/htable.h 954postconf_print.o: ../../include/msg.h 955postconf_print.o: ../../include/myflock.h 956postconf_print.o: ../../include/name_code.h 957postconf_print.o: ../../include/sys_defs.h 958postconf_print.o: ../../include/vbuf.h 959postconf_print.o: ../../include/vstream.h 960postconf_print.o: ../../include/vstring.h 961postconf_print.o: postconf.h 962postconf_print.o: postconf_print.c 963postconf_service.o: ../../include/argv.h 964postconf_service.o: ../../include/dict.h 965postconf_service.o: ../../include/htable.h 966postconf_service.o: ../../include/mail_params.h 967postconf_service.o: ../../include/msg.h 968postconf_service.o: ../../include/myflock.h 969postconf_service.o: ../../include/mymalloc.h 970postconf_service.o: ../../include/name_code.h 971postconf_service.o: ../../include/stringops.h 972postconf_service.o: ../../include/sys_defs.h 973postconf_service.o: ../../include/vbuf.h 974postconf_service.o: ../../include/vstream.h 975postconf_service.o: ../../include/vstring.h 976postconf_service.o: postconf.h 977postconf_service.o: postconf_service.c 978postconf_unused.o: ../../include/argv.h 979postconf_unused.o: ../../include/dict.h 980postconf_unused.o: ../../include/htable.h 981postconf_unused.o: ../../include/mail_conf.h 982postconf_unused.o: ../../include/mail_params.h 983postconf_unused.o: ../../include/msg.h 984postconf_unused.o: ../../include/myflock.h 985postconf_unused.o: ../../include/name_code.h 986postconf_unused.o: ../../include/sys_defs.h 987postconf_unused.o: ../../include/vbuf.h 988postconf_unused.o: ../../include/vstream.h 989postconf_unused.o: ../../include/vstring.h 990postconf_unused.o: postconf.h 991postconf_unused.o: postconf_unused.c 992postconf_user.o: ../../include/argv.h 993postconf_user.o: ../../include/dict.h 994postconf_user.o: ../../include/htable.h 995postconf_user.o: ../../include/mac_expand.h 996postconf_user.o: ../../include/mac_parse.h 997postconf_user.o: ../../include/mail_conf.h 998postconf_user.o: ../../include/mail_params.h 999postconf_user.o: ../../include/msg.h 1000postconf_user.o: ../../include/myflock.h 1001postconf_user.o: ../../include/mymalloc.h 1002postconf_user.o: ../../include/name_code.h 1003postconf_user.o: ../../include/stringops.h 1004postconf_user.o: ../../include/sys_defs.h 1005postconf_user.o: ../../include/vbuf.h 1006postconf_user.o: ../../include/vstream.h 1007postconf_user.o: ../../include/vstring.h 1008postconf_user.o: postconf.h 1009postconf_user.o: postconf_user.c 1010