At 08:54 00/06/14 +0900, you wrote:
> 
> Has anyone installed any of the POP-before-SMTP
> packages available on the www.qmail.org page with qmail-ldap
> on Solaris 6 or 7 SUCCESSFULLY?
> 
> Please let me know.
> 
> Kristina
**************************************************

STEP-BY-STEP MINI-HOWTO FOR RELAY-CTRL-1.4

Well, here I am answering my own post!  Thanks to the owner of relay-ctrl-1.4,
Bruce, I was able to get over some of my troubles. I now have POP-before-SMTP
running on our qmail server serving ASP clients.  The following step-by-step
should get any newbie with POP-before-SMTP installed on Solaris 7. Works fine
on both qmail and qmail-ldap.


(1) decompress

% tar -xvf relay-ctrl-1.4.tar.gz?


(2) edit some files in the source

% cd relay-ctrl-1.4

a) EDIT THE defines.h FILE
% vi defines.h

#ifndef AGE_MINUTES
#define AGE_MINUTES 15 <- No of minutes user can SMTP after POP
#endif
#ifndef BUFSIZE
#define BUFSIZE 4096
#endif
#ifndef RULESDIR
#define RULESDIR "/etc/tcpcontrol" <-The path to your database
#endif
#ifndef SPOOLDIR
#define SPOOLDIR "/var/spool/relay-ctrl"
#endif
#ifndef AGE_CMD
#define AGE_CMD "/usr/sbin/relay-ctrl-age"
#endif
#ifndef TCPRULES
#define TCPRULES "/usr/local/bin/tcprules" <- change according to your system
#endif
#ifndef SMTPRULES
#define SMTPRULES "smtp.rules" <- name of the rules files
#endif
#ifndef SMTPCDB
#define SMTPCDB "tcp.smtp.cdb" <- name of your cdb file
#endif
#ifndef SMTPFIXUP?
#define SMTPFIXUP "smtp.fixup" 
#endif

b) EDIT THE relay-ctrl-allow.c file

% vi relay-ctrl-allow.c
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h> <- add this

c) EDIT THE Makefile file
% vi Makefile

prefix = /usr
sbindir = $(prefix)/sbin
mandir = $(prefix)/man
man8dir = $(mandir)/man8
install = /usr/sbin/install <- change according to your system
installdata = $(install) -m 644?
installbin = $(install) -m 755
installdir = $(install) -d

(3) COMPILE

% make

(4) INSTALL
% cp relay-ctrl-allow /usr/sbin
% cp relay-ctrl-age /usr/sbin
% cp relay-ctrl-age.8 /usr/man/man8/
% cp relay-ctrl-allow.8 /usr/man/man8/
% make install
% chmod u+s /usr/sbin/relay-ctrl-allow


(5) EDIT crontab

% setenv EDITOR vi
% crontab -e
0-59 * * * * /usr/sbin/relay-ctrl-age

% crontab -l


(6) CREATE A DIRECTORY AND CHANGE PERMISSIONS
% mkdir /var/spool/relay-ctrl
% chmod 766 /var/spool/relay-ctrl
% mkdir /etc/tcpcontrol
% chmod 777 /etc/tcpcontrol


(7) EDIT THE START-UP FILE FOR TCPSERVER

% vi /etc/rc2.d/S89tcpserver

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/sbin; export PATH

#SMTP for POP-before-SMTP
tcpserver -v -u xxxxx -g xxxxx -x /etc/tcpcontrol/tcp.smtp.cdb 0 smtp
qmail-smtpd 2>
&1 |splogger smtpd &

-u xxxxxx is the uid
-g xxxxxx is the gid
-x /etc/tcpcontrol/tcp.smtp.cdb  is the full path to your database which must
match
your entries for RULESDIR and SMTPCDB in defines.h

(8) RESTART THE TCPSERVER

***********************************************


Reply via email to