DirectAdmin Message System – Complete Guide to From Address Logic, Message Cleanup, and Custom Message Templates

The DirectAdmin Message System handles system notifications, tickets, and internal messages. This guide explains how the “From” address is determined, how system generated and user generated messages differ, how to automatically clean old messages, and how to customize message templates to include message content.

Address LogicMessage Cleanup

~3 min read • Updated Mar 1, 2026

1. How the “From” Address Is Determined


DirectAdmin sends notifications for system events, tickets, and internal messages. The recipient (To) is configured inside the Message System interface, but the From address depends on how the message was generated.

---

1.1 System Generated Notifications

These include:

  • Backup/Restore notifications
  • Update notices
  • Brute force attack alerts
  • Internal system warnings

For these messages, DirectAdmin determines the From address using the following logic:

  1. Find the creator= value in the user.conf of the affected account.
  2. If creator=root, DirectAdmin assumes creator=admin.
  3. From the creator’s user.conf:
    • If name= is set and not equal to the username, use that name.
    • Otherwise, use the Message System’s configured name.
  4. Use the creator’s email= value to assemble:
    
    From: name 
        
---

1.2 Human Generated Messages (Tickets, Replies, User Messages)

For messages written by users, DirectAdmin uses:

  • name= from user.conf
  • email= from user.conf
---

1.3 Fallback Behavior

If required fields are missing:

  • name → taken from msg_sys variable
  • email → constructed as:
    
    username@servername
        
---

2. How to Empty the Message System


Since DirectAdmin 1.47, you can automatically delete messages based on:

  • Message age (days)
  • Message subject

These options appear at the bottom of the Message System page and inside the Brute Force Monitor.

Two configuration variables control this behavior:


delete_messages_days=0
delete_tickets_days=0

Notes:

  • Ticket age is based on the last reply, not the original creation date.
  • If a ticket file is deleted manually but still listed in tickets.list, DirectAdmin will automatically remove the stale entry.
---

3. How to Include Message Content in Email Notifications


DirectAdmin supports a special token to embed the full message content inside notification emails:


|MESSAGE|

How to enable it:


cd /usr/local/directadmin/data/templates/custom
cp ../message_*.txt .

This copies:

  • message_user.txt
  • message_tech.txt

Edit these files and insert |MESSAGE| wherever you want the message body to appear.

---

Important Notes:

  • The token is not sanitized—plaintext emails are safe, but HTML emails may be risky.
  • If your template starts with <html>, avoid using |MESSAGE|:
    • HTML injection is possible
    • Newlines will not convert to <br>

Written & researched by Dr. Shahin Siami