Message System
How is the From address determined?
Whenever a new message or ticket is generated, you'll get a notification from the Message System. The recipient (To) of these notifications is set in the Message System itself. Click the link at the top right of your interface.
However, the From address set in these messages can be set a few ways, depending on from where the message was generated.
- System notifications, created internally.
- Backup/Restore notifications, updates, attacks, etc.
For these internally generated messages (System Notifications), the From header is determined by: a) find the creator=
value from the user.conf
of the given account. b) if creator=root
, assume creator=admin
c) From that creator's user.conf
, check the name=
value. If it's set to a value other than their DA username, use that name, else use the Message System value. d) From that same creator's user.conf
file, take the email=
to assemble: From: name <email>
- Tickets, Messages, and Replies (human generated)
- the
name=
andemail=
value from theuser.conf
of the sender are used.
- Fallback, in the event that any required variables are missing or blank:
- name is taken from the msg_sys variable
- email is created by using the DA username, @ the servername (hostname) set in the directadmin.conf.
How to empty the message system
Since DirectAdmin version 1.47 the ability to clear messages from the Message System based on the Subject and/or the Date of the message was added into the panel.
The options can be found on the bottom of the "Message System" as well as in the Brute Force Monitor (same table, different default selected value).
The interface modifies two directadmin.conf variables which equal zero by default:
delete_messages_days=0
delete_tickets_days=0
When finding the date of a ticket, DA will use the time of the last reply. So if you've got a ticket going on for 3 years, the time is based on the most recent message. Meaning, if you replied yesterday to the ticket that was opened 3 years ago and the delete_ticket_days=365
, then this ticket will not be deleted.
Note, if you delete the data from disk, and the ticket number is still in the tickets.list
file, that's fine. DA will now ignore missing tickets, and remove that bad entry from the tickets.list
when noticed.
How to send mail content
If you wish to see the message in the notification, the following token has been added:
|MESSAGE|
To use it, type:
cd /usr/local/directadmin/data/templates/custom
cp ../message_*.txt .
This will copy the message_user.txt
and message_tech.txt
to the custom templates folder. Edit these files and insert the |MESSAGE| token wherever you wish.
Note that this token is not sanitized for any characters. For plaintext emails, this should be fine.
If you have <html>
at the top of your message templates and are using html emails, this token isn't recommended. For one, the client could send you malicious emails. Another reason is that newlines wouldn't have <br>
line breaks, thus the message would be a bit messy.