Noel J. Bergman schrieb: > Norman Maurer wrote: > >> Noel J. Bergman schrieb: >> >>>> + except KeyError: >>>> + from_addr = "root@" + socket.getfqdn() >>>> >>> Why are we defaulting to root? >>> >> I just use root because it was the first which come in my mind. I don't >> think this is bad. But maybe 'anonymous' is better. >> > > So far I can't think of a good "stock" address. Catching the exception is > fine and good. We could abort the script and log a message telling the user > that they need correct the problem. > > For example, if you are running this from the shell it should work fine. But > if you are running from a crontab, the environment might not be setup. Our > nightly build crontab own entry has: > > PATH=... > USER=noel > > ... > > ensuring that the PATH is setup for the task, and that USER is set. > > --- Noel > >
The problem is that running it from webserver will probaly not set the USER correct. So we should try to do the best and set the user to something and deliver the message. Otherwise the sendmail wrapper will not work like asspected. bye Norman --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
