How to use Email Notification¶
Enabling email notifications¶
Email formatting configuration.¶
Notification emails will consist of three parts, a header, a message and a footer. The message is created by the agent when it finishes running while the header and footer are created by the administrator of the FOSSology install by making changes to two text files found in the FOSSology configuration directory. The text files are specified in fossology.conf and the email will be constructed by concatenating the contents of the header file, the message and the footer file.
fossology.conf email section.¶
if fossology.conf there should be an EMAILNOTIFY group that will be used for configuring the email generation. The header will look in the same directory as fossology.conf for the header and footer files, so they must be located in a child of that directory. The subject field will be the subject of all email notifications sent. The client section will be the mail client that is used to send the emails. For the scheduler to correctly use the mail client it must work identically to the mailx utility that can be installed on most linux distros.
example EMAILNOTIFY group in fossology.conf:
[EMAILNOTIFY] header = sampleheader.txt footer = samplefooter.txt subject = FOSSology scan complete client = /usr/bin/mailx
header and footer file format¶
The header and footer file will be copied directly into the email with the exception of some variables. This variables are identified by the '$' before them and should be followed by white space.
$BROWSELINK :: browse link to upload $JOBQUEUELINK :: link to job queue details (showjob) $JOBRESULT :: is "completed successfully" or "failed" $SCHEDULERLOG :: link to scheduler log $UPLOADFOLDERNAME :: name of upload folder $DB.tablename.columnname :: this only applies to certain tables (upload, user, job tables)
When found in the header and footer files, these variables will be replaced with the corresponding links and information. An example header and footer file are provided with FOSSology and should be edited to cause the email to be correctly formatted.