SmAccessD

S*ndmail Access Database Update Daemon v1.0

Yet another solution for POP authenticated SMTP relaying

What it is

This daemon updates the access database of sendmail[TM] version 8.9.x or higher whenever a remote POP client logs in. This allows for "SMTP after POP" (or "POP before SMTP" or "POP authenticated relaying"). After a certain time, POP client addresses are removed from access_db. You need a POP daemon that writes client addresses into a named pipe, e.g. a patched qpopper of Qualcomm, Inc.

SmAccessD is suitable for small sites with SMTP daemon and POP3 daemon running on a single machine, serving a userbase of some hundreds of users. See "POP before SMTP for Sendmail", "Poprelay Home Page", "Dynamic Relay Authorization Control" for other SMTP-after-POP solutions.

What you need

How to install

  1. Get the files referenced above.
  2. Read smaccessd.h and edit it according to your needs. Note: This step is required. MAKEMAP_MAPTYPE must match sendmail's map type (mostly hash or dbm).
  3. Compile smaccessd:
        # gcc -Wall -O2 smaccessd.c
    or on HP-UX:
        # cc -Ae +ESlit +O4 smaccessd.c
  4. Install smaccessd:
        # strip a.out
        # chown root:mail a.out
        # chmod u=rx,g=rs,o=r a.out
        # mv a.out /any/where/smaccessd
    You must set the group id to the same qpopper runs under after a user logged in to POP. On all known systems, qpopper takes on the GID of the mail spool directory. (List /var/mail, /var/spool/mail or whatever and set the group part in the chown command above accordingly.)
  5. If there is no /etc/mail/access, create an empty one.
  6. Optionally configure an extra logfile for LOCAL0 in /etc/syslog.conf and kill -HUP syslogd afterwards.
  7. Start smaccessd and look for errors at console or in syslog (hopefully there are none).
  8. Get qpopper3.0.2.tar.gz from www.eudora.com.
  9. Untar qpopper3.0.2.tar.gz, patch qpopper:
        # cd qpopper3.0.2
        # patch -b -p0 <../popper302.diff
    You should have smaccessd.h and popper302.diff in parent directory relative to qpopper3.0.2.
  10. Configure, make and install qpopper as described in qpopper distribution.
  11. Activate FEATURE(`access_db') in sendmail configuration and restart sendmail.
  12. Write a nifty smaccessd boot script (rc script) or put it into sendmail's boot script.
    That's it.

History

v1.0, June 01 2000: first public release. some modifications for better portability
v0.9, May  18 2000: first productional release for HP-UX
Since then SmAccessD has been working here rock-stable until abandonment of the server.

Disclaimer

All the stuff here is in the public domain (except for portions of the diffs that fall under qpopper's licence).

-- 
created in June 2000
updated in Mar 2001, Feb 2004
Stefan Richter