Skip to content

Email Server Settings

Solved Configure
25 4 4.4k 1
  • @phenomlab right now I have an MX record that has mydomainname.com which is also the host name on the server.

    @Madchatthew you should keep that. Mail records are old hat these days and you’d need a wildcard to match that hostname. At least using the domain name itself, you won’t have cert issues.

    I recall us doing the same last time when we built your virtualmin server.

    If it ain’t broke, don’t fix it 👍

  • @Madchatthew you should keep that. Mail records are old hat these days and you’d need a wildcard to match that hostname. At least using the domain name itself, you won’t have cert issues.

    I recall us doing the same last time when we built your virtualmin server.

    If it ain’t broke, don’t fix it 👍

    @phenomlab Sounds good! Thanks for your help, I appreciate it!

  • So, I guess I need a walkthrough on how to change the outgoing smtp port to 587 with postfix. I have tried good searching and such. I know we went through this in the past, but I am unable to find that post. I think it was on the previous website/domain before Sudonix.

    Thank you for your help.

  • So, I guess I need a walkthrough on how to change the outgoing smtp port to 587 with postfix. I have tried good searching and such. I know we went through this in the past, but I am unable to find that post. I think it was on the previous website/domain before Sudonix.

    Thank you for your help.

    @Madchatthew you’ll need to relay mail though another service if you want to use Postfix, using relay. For example, in the main.cf file

    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = static:USERNAME:PASSWORD
    smtp_sasl_security_options = noanonymous 
    smtp_tls_security_level = encrypt
    relayhost = [198.51.100.10]:587
    

    Depending on your use case, it might make sense to use a third party service at the application level (like WordPress) to send mail until you are able to do so via port 25 at Hetzner.

    Some freemium providers are here
    https://www.emailvendorselection.com/free-smtp-servers/

    You can also use Gmail, or even office365 if you’d prefer via a WordPress plugin such as WP Mail SMTP

    https://wordpress.org/plugins/wp-mail-smtp/

  • @Madchatthew you’ll need to relay mail though another service if you want to use Postfix, using relay. For example, in the main.cf file

    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = static:USERNAME:PASSWORD
    smtp_sasl_security_options = noanonymous 
    smtp_tls_security_level = encrypt
    relayhost = [198.51.100.10]:587
    

    Depending on your use case, it might make sense to use a third party service at the application level (like WordPress) to send mail until you are able to do so via port 25 at Hetzner.

    Some freemium providers are here
    https://www.emailvendorselection.com/free-smtp-servers/

    You can also use Gmail, or even office365 if you’d prefer via a WordPress plugin such as WP Mail SMTP

    https://wordpress.org/plugins/wp-mail-smtp/

    @phenomlab so you aren’t able to have a form filled out and have it sent by the outgoing port of Postfix?

    I was under the impression that you could use the Postfix server to just send emails from website forms and such but not actually use the Postfix server for incoming mail.

    Am I understanding that wrong?

  • @phenomlab so you aren’t able to have a form filled out and have it sent by the outgoing port of Postfix?

    I was under the impression that you could use the Postfix server to just send emails from website forms and such but not actually use the Postfix server for incoming mail.

    Am I understanding that wrong?

    @Madchatthew no, you have that right. However, the MTA for postfix uses port 25 - and given that this is blocked for a month, this will mean you’ll need to relay the mail to another server or send it at the application layer to bypass it altogether.

    This is a temporary measure until Hetzner open the port - and you’ll need to request that once you’ve paid the first month invoice. Postfix handles all SMTP based mail, so it’s the sending and receiving service. Dovecot is the receiver of POP, IMAP, etc so works differently, but handles mail sent to it downstream via Postfix.

    All things considered, third party relay services will have a much better reputation than the IP address of your mail server so will be more reliable.

  • @Madchatthew no, you have that right. However, the MTA for postfix uses port 25 - and given that this is blocked for a month, this will mean you’ll need to relay the mail to another server or send it at the application layer to bypass it altogether.

    This is a temporary measure until Hetzner open the port - and you’ll need to request that once you’ve paid the first month invoice. Postfix handles all SMTP based mail, so it’s the sending and receiving service. Dovecot is the receiver of POP, IMAP, etc so works differently, but handles mail sent to it downstream via Postfix.

    All things considered, third party relay services will have a much better reputation than the IP address of your mail server so will be more reliable.

    @phenomlab That sounds good. Thanks for the explanation. I appreciate it. So would it just be better to use a third party mailer rather than postfix?

  • @phenomlab That sounds good. Thanks for the explanation. I appreciate it. So would it just be better to use a third party mailer rather than postfix?

    @Madchatthew for the time being at least, yes. This makes the most sense and means the WordPress site can send email.

    Setting up postfix to be a relay isn’t difficult, but seems pointless given that once you pay the first invoice to Hetzner you can turn make full use of it. As you are running virtualmin, it’ll work right out of the gate.

  • @Madchatthew for the time being at least, yes. This makes the most sense and means the WordPress site can send email.

    Setting up postfix to be a relay isn’t difficult, but seems pointless given that once you pay the first invoice to Hetzner you can turn make full use of it. As you are running virtualmin, it’ll work right out of the gate.

    @phenomlab Sounds good. Thank you again very much!

  • @phenomlab Sounds good. Thank you again very much!

    So I have gone with gmail with my wifes website to deliver mail and it is working great. With the other website, I think I am going to go with one of the other ones due to them not having a gmail email.

    Which one of those top do you recommend? I was thinking of using the first one or Mailgun since I have used them before. If one of the other ones is better, please let me know. Or if there is one listed that you like better, let me know too.

    Thanks again!

  • So I have gone with gmail with my wifes website to deliver mail and it is working great. With the other website, I think I am going to go with one of the other ones due to them not having a gmail email.

    Which one of those top do you recommend? I was thinking of using the first one or Mailgun since I have used them before. If one of the other ones is better, please let me know. Or if there is one listed that you like better, let me know too.

    Thanks again!

    @Madchatthew mailgun would be my recommendation here. I think they also have a free plan if I’m not mistaken.

  • phenomlabundefined phenomlab has marked this topic as solved on
  • "I’ve been following this thread — super helpful explanations about MX, relay hosts and port restrictions. Many self-hosted mail setups eventually hit the same deliverability issues, especially when using fresh IPs.

    When I was researching SMTP relays and self-hosted mail reliability, I started keeping a comparison list of tools and services in one place: https://bestaitables.com/
    – not about hosting specifically, but includes several SMTP/ESP providers that can help avoid Postfix deliverability headaches while ports / IP reputation settle.

    If anyone has long-term experience with self-hosted SMTP + DNS set-ups that remain stable, would be great to hear which configurations worked best."

  • "I’ve been following this thread — super helpful explanations about MX, relay hosts and port restrictions. Many self-hosted mail setups eventually hit the same deliverability issues, especially when using fresh IPs.

    When I was researching SMTP relays and self-hosted mail reliability, I started keeping a comparison list of tools and services in one place: https://bestaitables.com/
    – not about hosting specifically, but includes several SMTP/ESP providers that can help avoid Postfix deliverability headaches while ports / IP reputation settle.

    If anyone has long-term experience with self-hosted SMTP + DNS set-ups that remain stable, would be great to hear which configurations worked best."

    @Onix said in Email Server Settings:

    If anyone has long-term experience with self-hosted SMTP + DNS set-ups that remain stable, would be great to hear which configurations worked best.

    I can help with this 🙂


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics