Setup Mailgun For Outbound Mail - Email Tracing State Shows 'Unknown'

larryinfl

New member
Joined
Sep 20, 2025
Messages
1
I had my DA server setup to send email for the server using sendgrid. I have a need to forward emails to a zendesk ticket system and I learned that sendgrid does not allow email forwarding.

I was able to use a cpanel server to test sending wtih mailgun and it allowed me to forward the emails to my zendesk account. (when sendgrid did not on the exact same server)

I now am trying to switch my DA server from sendgrid to mailgun.

I am using the following page to setup smarthost: https://docs.directadmin.com/other-hosting-services/exim/smarthost.html

When I send emails from the server they do not get delivered. When I check email trace the status for the mssage says 'unknown' and gives no reason for the issue.

Any ideas? Any help appreicated.
 
Question. Do you require a mail account for the whole server r only a domain/user?
If it's only the user/domain, then it's way easier to just check your MX page and then deselect the option "Use this server to handle my e-mails."

Once you've done that, you can just create the appropriate MX and mail/smtp records for mailgun in the Directadmin DNS.

Be aware that you might need a small change in de firewall too. You have to either set SMTP_BLOCK=0 and change options.conf to prevent DA to change it back to 1 again.
Or leave it at 1 and then set an allowuser to bypass this setting. You can read about it in this thread (click).

No need for Exim customisations. This is way easier and this way you can do it per domain because the doc you pointed to is for the whole server if I've read it correctly.

Edit: sorry, needed to fix some typo's and odd sentence I typed.
 
I was able to use a cpanel server to test sending wtih mailgun and it allowed me to forward the emails to my zendesk account. (when sendgrid did not on the exact same server)

For forwarding emails to a helpdesk you can use either:

1. POP method, when your helpdesk fetches emails from an email account
2. pipe method, when an email content is delivered to a helpdesk through a pipe. A pipe can be created in DirectAdmin: E-mail Manager -> Forwarders. See https://docs.directadmin.com/changelog/version-1.34.0.html#pipe-and-email-in-forwarder for more details.
 
Back
Top