Samhain | ||
---|---|---|
<<< Previous | Configuration — Basic | Next >>> |
Configuration options should be in the Misc section of the configuration file, except for external facilities.
Items that must be configured are:
SetMailAddress=username@hostname
Up to eight addresses are possible, each one at most 63 characters long, each on a seperate line in the configuration file
![]() | TIP |
---|---|
it is recommended to use numerical IP addresses instead of host names (to avoid DNS lookups). |
SetMailRelay=mail.some_domain.com
You may need this option because some sites don't allow outbound e-mail connections from any arbitrary host. If the recipient is offsite, and your site uses a mail relay host to route outbound e-mails, you need to specify the relay host.
SetMailTime=86400
You may want to set a maximum interval between any two consecutive e-mails, to be sure that samhain is still 'alive'.
SetMailNum=10
Messages can be queued to send several messages in one e-mail. You may want to set the the maximum number of messages to queue. (Note: messages of highest priority (alert) are always sent immediately.
MailSingle=yes/no
If there are multiple recipients, whether to send a single mail with the recipient list, or send multiple mails. If all recipients are on same domain, a single mail may suffice, otherwise it depends on whether the mail server supports forwarding (for security, most don't).
MailSubject=string
Here, string may contain the placeholders %T, %H, %S, and/or %M that will get replaced by the time, hostname, message severity and message text, respectively. The default subject line is equivalent to "%T %H". This option may be useful if you want to send emails to an email-to-sms gateway.
Example:
[Misc] # # E-mail receipient (offsite in this case). Up to eight addresses, # each one at most 63 characters long. # SetMailAddress=username@host.some_domain.com # # Need a relay host for outgoing mail. # SetMailRelay=relay.mydomain.com # # Number of pending mails. # SetMailNum=10 # # Maximum time between e-mails. # Want a message every day, just to be sure that the # program still runs. # SetMailTime=86400 # # To all recipients in a single mail. MailSingle=yes |
TrustedUser=username
If some element in the path to the log file is writeable by someone else than root or the effective user of the process, you have to include that user in the list of trusted users (unless their UIDs are already compiled in).
UseSeparateLogs=yes/no
Only relevant on the server. Use a separate log file for (reports from) each client. The root name of these log files will be the same as the main log file, with the client name appended.
SetLogServer=my.server.address
You have to specify the server address, unless it is already compiled in. It is possible to specify a second server that will be used as backup.
![]() | NOTE |
---|---|
If you want to store the configuration file on the server, the server address must be compiled in. |
samhain can invoke external scripts/programs for logging (i.e. to implement support for pagers etc.). This is explained in detail in the chapter called Hooks for External Programs>.
<<< Previous | Home | Next >>> |
Configuration — Basic | Up | Details of logging facilities |