[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
forward files not in $HOME
Hi,
in order to avoid mounting each an every homedirectory (they are widely
distributed in our environment) on every mail delivery, we have forward
files in /var/spool/mail/forward/username, not in ~/.forward. To make it
a bit easier to configure this, I've made a patch for aliases.cf. This
does correct some other errors, too.
The patch is attached, hope you find it useful.
Greetings, Swen
diff -ubr zmailer-2.99.49p8.orig/proto/cf/aliases.cf zmailer-2.99.49p8/proto/cf/aliases.cf
--- zmailer-2.99.49p8.orig/proto/cf/aliases.cf Sat Aug 2 22:03:10 1997
+++ zmailer-2.99.49p8/proto/cf/aliases.cf Thu Oct 30 11:52:52 1997
@@ -9,7 +9,7 @@
# $MAILVAR/lists directory entry (mapping to a list of addresses)
# -request or -owner suffix (mapping to owner of mailing list file)
# $PUNTHOST (mapping to user@$PUNTHOST)
-# $HOME/.forward file entry (mapping to a list of addresses)
+# $FORWARD file entry (mapping to a list of addresses)
#
# If we get all the way through, we give up. Note that if PUNTHOST is
# defined, then the mboxmap mechanism should be used to ensure local delivery
@@ -184,7 +184,7 @@
# Listed in 'expired accounts' database ?
[ -z "$PUNTHOST" ] && [ -z "$didexpand" ] &&
a=$(expired "$user") &&
- db add expansions "$key" exired &&
+ db add expansions "$key" expired &&
return (((error acctexpired "$user" $attr)))
pobox="$(mboxmap "$user")" &&
@@ -285,7 +285,10 @@
# only allow .forward file reading if privs allow it
+ forward="/var/spool/mail/forward/$lcuser"
homedir="$(homedirectory "$user")" || [ -z "$didexpand" ] &&
+# forward="$homedir/.forward"
+# forward="/forwardfiles/$user"
ssift "$user" in # No 'homedir' for this user ? Has a '+' in it ?
(.+)\+.+
# Try expanding 'user+', and then plain 'user'
@@ -337,15 +340,15 @@
;;
tfiss
case "$(get $attr type)" in
- expandsender) a="$homedir/.forward"
+ expandsender) a="$forward" &&
[ -f "$a" ] && return (($quad))
;;
esac
priv=$(get $attr privilege)
- a="$homedir/.forward"
- [ -z "$PUNTHOST" ] && [ -z "$didexpand" ] && [ -n "$homedir" ] &&
+ a="$forward"
+ [ -z "$PUNTHOST" ] && [ -z "$didexpand" ] &&
[ -f "$a" ] &&
db add expansions "$key" user &&
priv=$(getpriv "644" $priv "$a" .forward) &&
@@ -371,7 +374,8 @@
db add expansions "$key" other ;;
*) # the address just disappears... we've got it already
#log expansion "$(expansions "$key"):"
- return () ;;
+ #return () ;;
+ return (((bitbucket - - -))) ;;
esac
fi