Vincent Lee wrote:

I see. This is bad. In that case, do you have any solution or idea to take care this problem?

Right now, I share a master copy of etc/courier on an nfs mounted directory. This copy does not have any .dat files. Periodically, I rsync that dir to /etc/courier, and run 'makealiases' on each host, if necessary.


Another possibility would be to use etc/courier on an NFS mounted directory, and symlink each .dat file to /var/local/etc/courier/ (create the dir yourself). Modify each make* script to keep the dat files in that location. The attached patch would modify makealiases to do exactly that. Similar changes would be needed in makesmtpaccess and makeacceptmailfor.
--- /usr/lib/courier/sbin/makealiases   Wed Oct 29 13:32:19 2003
+++ makealiases Wed Nov 12 13:55:32 2003
@@ -39,6 +39,7 @@
 prefix="/usr/lib/courier"
 exec_prefix="/usr/lib/courier"
 sysconfdir="/etc/courier"
+localsysconfdir="/var/local/etc/courier"
 libexecdir="/usr/lib/courier/libexec"
 localstatedir="/var/spool/courier"
 
@@ -116,7 +117,7 @@
 
        if test "$aliastmp" = ""
        then
-               aliastmp="-tmp=${sysconfdir}/aliases-$protocol.tmp"
+               aliastmp="-tmp=${localsysconfdir}/aliases-$protocol.tmp"
        fi
 
        if test "$aliassrc" = ""
@@ -126,7 +127,7 @@
 
        if test "$aliasdump$aliasalias" = ""
        then
-               aliasalias="-alias=${sysconfdir}/aliases-$protocol.dat"
+               aliasalias="-alias=${localsysconfdir}/aliases-$protocol.dat"
        fi
 
        if test "$xaliasdir" = ""
@@ -148,7 +149,7 @@
 
 if test "$aliastmp" = ""
 then
-       aliastmp="-tmp=${sysconfdir}/aliases.tmp"
+       aliastmp="-tmp=${localsysconfdir}/aliases.tmp"
 fi
 
 if test "$aliassrc" = ""
@@ -158,7 +159,7 @@
 
 if test "$aliasdump$aliasalias" = ""
 then
-       aliasalias="-alias=${sysconfdir}/aliases.dat"
+       aliasalias="-alias=${localsysconfdir}/aliases.dat"
 fi
 
 if test "$xaliasdir" = ""

Reply via email to