Hi Jesse,

> First off, I didn't write the text you just replied to. That was written by the 
> other gentleman.

You're absolutely right; my further posting should have been started
with "Hi Benjamin". :-)

> -- begin --
> 4. How do I allow roaming users to use our smtp server without opening
>    the machine up to everyone on the internet?
> 
>    Your startup script for the qmail smtp server must use the
>    tcpserver -x file command similar to this startup line.
> 
>     env - PATH="/var/qmail/bin:/usr/local/bin" \
>     tcpserver -H -R -x /path/to/vpopmail/etc/tcp.smtp.cdb \
>         -c20 -u504 -g503 0 smtp \
>     /var/qmail/bin/qmail-smtpd 2>&1 > /dev/null &
> -- end --
> 
> 
> This clearly implies that the tcp.smtp.cdb file is to be created by
> vpopmail (or clearopensmtp) in the /path/to/vpopmail/etc/ directory.

I agree that it can be understood that way. However, most users (at
least the users that used "Life with qmail" to install qmail) have the
tcp.smtp.cdb in /etc, and the line you quoted simply is confusing and
should have included "/path/to/whereever/you/have/tcp.smtp.cdb".

The trick is within the configure script. It reads:

--- begin ---
[...]
tcpserver_file=""
for f in "$vpopmaildir"/etc/tcp.smtp /etc/tcp.smtp /etc/tcprules.d/qmail-smtpd
do
    if test -f $f
    then
        tcpserver_file=$f
                break
    fi
done
[...]
--- end ---

So it looks (in exactly in that order) for:

1) "$vpopmaildir"/etc/tcp.smtp
2) /etc/tcp.smtp
3) /etc/tcprules.d/qmail-smtpd

Remember, we're at _compile_ time.

When doing a fresh install, there isn't a tcp.smtp file in 1) in nearly
all cases, but in 2). That's why vpopmail then adapts itself to use
/etc/tcp.smtp and writes to /etc/tcp.smtp.cdb and not to
~vpopmail/etc/tcp.smtp.cdb.

If you already have a vpopmail installation and a tcp.smtp in
~vpopmail/etc/, and then do a new ./configure (after "make clean"),
vpopmail will find the file in location 1), where it has write access
without hassles.

> vpopmail clearly has write access. Yet a .cdb file was not created.

vpopmail tried to create/update the .cdb file in /etc, which couldn't
work without a permission change.

> I even copied my /etc/tcp.smtp file here and ran clearopensmtp.
> No .cdb file.

As the location of the file is set at _compile_ time, moving files
around at _run_ time doesn't affect anything.

> So, I ask again: Does vpopmail now neglect to build a .cdb file when
> --enable-roaming-users=y and --with-mysql are specified at
> configure time?

No.

> Or is the FAQ incorrect, and vpopmail now tries to build the .cdb in
> my /etc directory?

It does. The FAQ suggests a path corresponding to location 1), while on
most systems location 2) has been automatically chosen. That's in fact
confusing and should be updated to make it clearer that the location
depends on the compile time setting.

However, ./configure is kind enough to tell you which location it uses:

# ./configure --enable-roaming-users
[...]
           vpopmail 5.2.1           
            Current settings
---------------------------------------

vpopmail directory = /home/vpopmail
               uid = 89
               gid = 89
          ip alias = OFF --enable-ip-alias-domains=n (default)
address extentions = OFF --enable-qmail-ext=n (default)
     roaming users = ON  --enable-roaming-users=y
    tcpserver file = /etc/tcp.smtp                         <<< LOOK HERE
    open_smtp file = /home/vpopmail/etc/open-smtp
        user quota = OFF --enable-defaultquota=NOQUOTA default
table optimization = many domains --enable-many-domains=y default
       auth module = cdb default
  system passwords = OFF --enable-passwd=n default
      file locking = ON  --enable-file-locking=y default
         file sync = OFF --enable-file-sync=n default disable
vdelivermail fsync
      auth logging = ON  --enable-auth-logging=y default
     mysql logging = OFF --enable-mysql-logging=n default
      clear passwd = ON  --enable-clear-passwd=y (default)
 valias processing = OFF --enable-valias=n
        pop syslog = show only failure attempts
                     --enable-logging=e default
    default domain =  --enable-default-domain=
          auth inc = -Icdb
          auth lib = 

The "default" setting is still ~vpopmail/etc/tcp.smtp, but it's obvious
that vpopmail cannot use that file if it doesn't exist (yet) - which is
the reason it chose the second location (/etc/) as the alternative.

Jonas


Reply via email to