userdirs problem

John Sutton john@scl.co.uk
Thu May 13 16:52:58 UTC 2004


On Wednesday 12 May 2004  1:55 pm, you wrote:
> > But the fact that logs are created in the main logdir *and* the userdir
> > (if it exists) makes the cron job approach a bit tricky!  I was rather
> > hoping that it would be an *or* rather than an *and* ;-(
>
> Why do you create the userdir/username/log directory if you do not want
> per-user log files?  Why not do as Spike said he does, and not create
> the per-user log directories when you do not want the per-user log files?

Sorry, I've probably not explained myself well.  I *do* want the per user 
logs, and I want them *always*, i.e., even when the per-user log directory 
does not yet exist because the user account is new.

I've now spotted that the logfile in the main logdir and the corresponding 
one(s) in the per-user log dir(s) have the same name.  Always I hope?  If so, 
then I think a cronjob something along these lines will do it:

for each logfile in main logdir

    for each env_To dir=

        if exists dir/logfile continue
        if !exists dir mkdir dir || fail
	"copy" logfile dir

    endfor

    # for efficiency's sake
    rm logfile
endfor

where "copy" is probably a sed script which needs to:

remove "foreign" Env_to lines;
remove mention of "foreign" whiteclnt files;
remove "foreign" greylist recipient and embargo checksums;

Is there anything else?  I'm not sure what the final 2 lines of the main log 
say when the disposition of the message is different for different 
recipients?  I've have to experiment...

-- 

***************************************************
John Sutton
SCL Internet
URL http://www.scl.co.uk/
Tel. +44 (0) 1239 711 888
***************************************************




More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.