Okay, I decided to go with the qmail-users scheme anyway.

Maybe Dan should consider NFS automount functionality, although yeah it
does sound scary *thinks of the consequences*

Anyway, seeing as I have a fastforward database there are times when I
don't want users to receive mail locally i.e. when they're somewhere else,
permanently.  So, to stop the heartache of removing their homedir only to
recreate it when they come back, I usually added an entry into
/etc/aliases for user:  [EMAIL PROTECTED]

fastforward will not be used if the user exists.  Because this is in
~/alias/.qmail-default and qmail-local switches to the user when they
exist, only the alias user if they don't exist.

I realise I could simply put a .qmail (or a .forward seeing as I'm
using the dot-forward package) file in each user's home dir, but I
can't be bothered with that.

So, what I did was created a simple shell script which grabs the password
file entries and:

1.  Checks that their uid is not 0.
2.  checks if the homedir is /tmp or /dev/null (obviously not real accounts or active 
ones)
3.  checks if the username has a "username:  alias" entry in the fastforward database.

then it echoes lines to /var/qmail/users/assign
and echoes a . at the end of the file.

Finally it sends a mail of real users which will not receive local mail to
the nice sys admin people using qmail-inject :)

If anyone has any use for this script I can certainly send it to you.

Cya,

John.

Reply via email to