forwarding system-logs to a specified email adress

ogg

Registered
now, another question (thanks for all help):

i want to set up my mac to automatically send system-logs to my email-adress. now, i have heard about the .forward file in the root-directory. so i have replaced the /dev/null/ by typing my email adress sample@domain.com. i have tested the configuration by typing mail root in the terminal. but i get no mail on sample@domain.com
the .forward file has my mail-adress inside, thats ok.
have i do some other (different?) arguments in the .forward file?
or should i choose another way?
 
thanks. but when i type
sudo /System/Library/StartupItems/Sendmail/Sendmail start

i get the following error:
451 4.0.0 /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory

what can i do?
 
Replace sendmail!

(I don't run sendmail; instead, I use Qmail on one machine and postfix on the other. You'll have to check the link at O'Reilly's MacDevCenter and figure it out from there.)
 
thanks, now it runs. finally i have downloaded the file "keep sendmail happy", searched via versiontracker.com.
now, every time on a startup the mac fixes the permissions, also when i get an update...

thanks a lot for all help!
 
Of just add the following line to the sendmail.cf file: O DontBlameSendmail=GroupWritableDirPathSafe


Stick this towards the top of the file, it might already have this line in place but commented out.

Brian
 
and now, which syntax i have to use for an automated mail?

sample:
mail -s Test mail@mail.com

i want to send a body text automatically. how can i do this?
 
Code:
echo "hi there" | mail -s "Heya" [email]foo@bar.com[/email]

Or, you can stick the text of the message in a file, and do:
Code:
mail -s "Heya" [email]foo@bar.com[/email] < /your/file/here
or
cat /your/file/here | mail -s "Heya" [email]foo@bar.com[/email]

or, ofcourse, your using a perl script, youc an use the Net::SMTP stuff :)

Brian
 
Back
Top