Explain better, because by default every domain can send mail via mail.domain.com and not via the shared ip.
However, the hostname is always present in the headers, like server.maindomain.com
I don't really understand what you're looking for.
If you have dedicated ip for every domain you can add add_domain_to_domainips=1 in directadmin.conf ( https://www.directadmin.com/features.php?id=1692 ) but as Richard said server.maindomain.com is always present in headers.