# Copyright 2003 Data Helper, Inc. # This program is realeased under the # GNU GENERAL PUBLIC LICENSE Version 2. # See COPYING.GPL for information. # Mark Willcox #################################################################### # Configuration variables: # DD_DIR is where the files go. Make sure there's a "/" on the end! DB_DIR = /var/postpop/db/ # POPUSER is the user (and optional group) of the user who owns the mail # directories. If your real users own their mail, supply some unprivileged, # un-shelled user. POPUSER = nfsnobody:nfsnobody # DIR_DEPTH is the number of nodes of the IP address that will be prepended # to the file name as directories. You should usually leave this as zero # unless you have a LOT of POP boxes that are accessed from a LOT of different # IP addresses. DIR_DEPTH = 0 # AUTH_LIFE is the number of minutes the SMTP door stays open after a POP # authorization. AUTH_LIFE = 15 # BIN_DIR is where the programs go. BIN_DIR = /bin #################################################################### CFLAGS = -O2 DEST_POP = postpop SRC_POP = postpop.c DEST_PLOP = properplop SRC_PLOP = properplop.c RM = rm -f STRIP = strip CP = cp CAT = cat ECHO = echo CHMOD = chmod CHOWN = chown PERMS = 755 MKDIR = mkdir -p all: $(DEST_POP) $(DEST_PLOP) install: all -$(STRIP) $(DEST_POP) $(CP) $(DEST_POP) $(BIN_DIR) -$(CHMOD) $(PERMS) $(BIN_DIR)/$(DEST_POP) -$(CHOWN) $(POPUSER) $(BIN_DIR)/$(DEST_POP) -$(STRIP) $(DEST_PLOP) $(CP) $(DEST_PLOP) $(BIN_DIR) -$(CHMOD) $(PERMS) $(BIN_DIR)/$(DEST_PLOP) -$(CHOWN) $(POPUSER) $(BIN_DIR)/$(DEST_PLOP) -$(MKDIR) $(DB_DIR) -$(CHMOD) $(PERMS) $(DB_DIR) -$(CHOWN) $(POPUSER) $(DB_DIR) @$(ECHO) Installed. postpop.h: postpop.h.in sed sx__PATH__x$(DB_DIR)x postpop.h.in | \ sed sx__DEPTH__x$(DIR_DEPTH)x | \ sed sx__LIFE__x$(AUTH_LIFE)x > postpop.h $(DEST_POP): $(SRC_POP) postpop.h -@$(CC) $(CFLAGS) $(SRC_POP) -o $(DEST_POP) $(LDFLAGS) || $(CC) $(CFLAGS) $(SRC_POP) -o $(DEST_POP) $(LDFLAGS) @$(ECHO) $(SRC_POP) compiled. $(DEST_PLOP): $(SRC_PLOP) postpop.h -@$(CC) $(CFLAGS) $(SRC_PLOP) -o $(DEST_PLOP) $(LDFLAGS) || $(CC) $(CFLAGS) $(SRC_PLOP) -o $(DEST_PLOP) $(LDFLAGS) @$(ECHO) $(SRC_PLOP) compiled. clean: $(RM) $(DEST_POP) $(DEST_PLOP) postpop.h