In an attempt to make the eggdrop logs searchable, I wrote a script (backuplogs.sh) which would send a copy of the logs by email so they could be searched from there.
I tried two methods, both of which had issues:
The issue are as follows:
Possible solutions:
Unfortunately I've not worked out how to do this.
Any ideas?
I tried two methods, both of which had issues:
(uuencode $filename $filename) | mail -s $subject $mailto
mail -s "$subject" $mailto < "$file"
The issue are as follows:
- Email clients are unable to search contents of attachments
- The log file will not render as body text as the mail command attempts to parse the file for headers.
Possible solutions:
- Encode the body (not as an attachment)
- Escape the body so the text will not be rendered by the mail command
Unfortunately I've not worked out how to do this.
Any ideas?