Prerequisites
- Root access to your server
- Postfix mail server installed and running
- JetEmail SMTP credentials from your dashboard
Configuration Steps
1
Generate SMTP Credentials
Create a smarthost (or use an existing one) in your JetEmail dashboard.
2
Configure SMTP Authentication
Create or edit Replace
/etc/postfix/sasl_passwd
to include your JetEmail credentials:your_username
and your_password
with your actual JetEmail SMTP credentials.Secure the file and create the hash database:3
Update Postfix Main Configuration
Add the following lines to
/etc/postfix/main.cf
:4
Configure Header Authentication
Create Replace
/etc/postfix/smtp_header_checks
to add authentication headers:your_username
with your actual JetEmail SMTP username.Create the hash database:5
Optional: Configure Sender Canonical Maps
If you need to rewrite sender addresses, create Add to Create the hash database:
/etc/postfix/sender_canonical
:/etc/postfix/main.cf
:6
Test Configuration and Restart Postfix
Test your configuration and restart Postfix:
Alternative Port Configuration
If port 25 is blocked, you can use port 587:Additional Configuration
SPF Records
Don’t forget to update your SPF records to include JetEmail’s servers:Domain Authentication
For enhanced security and deliverability:- Configure Domain Lockdown to prevent domain spoofing
- Set up DMARC for email authentication
- Ensure proper DKIM signing is configured
Testing Your Configuration
After configuration, test your setup:-
Send a test email to an external address:
-
Check the mail queue:
-
Monitor Postfix logs:
- Verify authentication in email headers
- Monitor delivery in your JetEmail dashboard
Troubleshooting
Authentication Failures
- Verify your SMTP credentials in
/etc/postfix/sasl_passwd
- Ensure the password database was created:
postmap /etc/postfix/sasl_passwd
- Check that your JetEmail account is active and in good standing
Connection Issues
- Verify ports 25 or 587 are open in your firewall:
- Check TLS configuration and certificate paths
- Ensure SASL authentication modules are installed:
Configuration Errors
- Check Postfix logs for detailed error messages:
- Test configuration syntax:
postfix check
- Verify file permissions on configuration files
Common Error Messages
“SASL authentication failed”- Check username/password in
/etc/postfix/sasl_passwd
- Verify the password database exists and is readable
- Ensure
smtp_use_tls = yes
is set - Check TLS certificate configuration
- Verify network connectivity to JetEmail servers
- Check firewall settings
Advanced Configuration
Multiple Domains with Different Credentials
If you need different SMTP credentials for different domains:-
Create
/etc/postfix/sender_dependent_relayhost_maps
: -
Create
/etc/postfix/sender_dependent_sasl_passwd_maps
: -
Add to
/etc/postfix/main.cf
: -
Create hash databases:
Security Considerations
- Keep your SMTP credentials secure with proper file permissions
- Regularly rotate your JetEmail SMTP passwords
- Monitor your email logs for suspicious activity
- Consider implementing rate limiting if needed