Files

2.8 KiB

hMailServer Configuration Reference

SMTP Relay Setup

Mailjet Relay Credentials

SMTP Server: smtp-relay.mailjet.com
Port: 587 (STARTTLS)
Connection Security: STARTTLS
Authentication: Required
Username: [Your API Key]
Password: [Your API Secret]

hMailServer Configuration Steps

  1. Open hMailServer Administrator
  2. Navigate to ServicesSMTP
  3. Click Relay tab
  4. Configure the following:
    • Enable relay
    • Relay server: smtp-relay.mailjet.com
    • Port: 587
    • Connection security: STARTTLS
    • Require authentication
    • Username: [API Key]
    • Password: [API Secret]
  5. Click Save

SMTP Routes Configuration

Why Routes Are Needed

Without routes configured, hMailServer sends ALL outbound SMTP traffic through the relay, including:

  • Emails addressed to local domains
  • This causes unnecessary relay usage
  • Can trigger relay service abuse detection

Route Configuration for Local Domain

  1. In hMailServer Administrator, go to Routes
  2. Click Add Route
  3. Fill in:
    Route Name: Local delivery for assettrackr.co
    Domains: assettrackr.co
    Deliver to: Local delivery
    
  4. Click OK

Route Configuration for Other Domains

If you have additional domains hosted on this server, add separate routes for each:

Domain: [your-domain.com]
Deliver to: Local delivery

Route for External/Relay Traffic

All other domains (not matching any route) will automatically use the SMTP relay configuration.

Verification Steps

1. Check Routes Are Active

hMailServer Administrator → Routes → Verify route list

Expected: assettrackr.co should appear with "Local delivery" destination

2. Test Local Delivery

Send an email to john@assettrackr.co from an external account (e.g., ProtonMail)

  • Email should appear in local mailbox
  • Check Mailjet account - sender address should NOT appear in outbound logs

3. Test Relay Functionality

Send an email FROM your hMailServer to an external address (e.g., Gmail)

  • Email should be delivered successfully
  • Check Mailjet account - should appear in outbound logs

Troubleshooting

Email Not Delivering Locally

  • Verify route is enabled
  • Check domain is correctly specified
  • Ensure hMailServer service is running

Relay Not Working

  • Verify SMTP credentials are correct
  • Check port 587 is not blocked by firewall
  • Verify STARTTLS is enabled in connection security
  • Check Mailjet account status

Relay Still Being Used for Local Emails

  • Double-check route configuration
  • Ensure no other routes are conflicting
  • Restart hMailServer SMTP service after route changes

Security Notes

  • Always use STARTTLS or SSL/TLS - never use "None"
  • Rotate API credentials periodically
  • Monitor Mailjet usage for unauthorized activity
  • Consider enabling IP restrictions on Mailjet relay if supported