Skip to content

Email Server Settings

Solved Configure
25 4 10.9k 1
  • 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.

    wrote on last edited by phenomlab
    #16

    @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/

    wrote on last edited by
    #17

    @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?

    wrote on last edited by phenomlab
    #18

    @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.

    wrote on last edited by
    #19

    @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?

    wrote on last edited by
    #20

    @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.

    wrote on last edited by
    #21

    @phenomlab Sounds good. Thank you again very much!

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

    wrote on last edited by
    #22

    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!

    wrote on last edited by
    #23

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

  • phenomlab phenomlab has marked this topic as solved on
  • wrote on last edited by
    #24

    "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."

    wrote on last edited by
    #25

    @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
  • Nodebb to Xenforo

    Solved Configure xenforo nodebb
    3
    0 Votes
    3 Posts
    1k Views
    phenomlab
    @cagatay as @downpw stated, there isn’t a native tool that will do this for you. You’d need to either develop your own or ask the nodebb team to assist which will be a paid exercise.
  • Opening links in nodebb widget

    Solved Configure nodebb
    6
    4 Votes
    6 Posts
    3k Views
    phenomlab
    A more efficient way of including this would be to not over complicate it and leverage a standard iframe (providing the CSP headers of the remote site permit this) like below <iframe src="https://www.classmarker.com/online-test/start/?quiz=gag66aea7922f0a5" width="700" height="800"></iframe> This works first time every time on your site as intended.
  • Pulling YouTube videos using RSS

    Configure rss youtube rsshub
    5
    7
    6 Votes
    5 Posts
    2k Views
    JAC
    The perfect solution and walkthrough Mark, appreciated as always!
  • How to deploy WordPress.org Developer theme

    Solved Configure wordpress theme github
    4
    1 Votes
    4 Posts
    3k Views
    phenomlab
    @Hari the real issue here is that I don’t think it can be used as a theme for WordPress because of the dependencies it clearly has, including its own Web server. My view here is that this is designed to be a complete development environment outside of the WordPress core.
  • mongodb backup problem

    Moved Configure mongodb
    3
    1
    1 Votes
    3 Posts
    1k Views
    phenomlab
    You might want to also review this post https://sudonix.org/topic/389/mongodb-backup-script
  • Email set up on OVH Cloud

    Solved Configure email
    21
    1 Votes
    21 Posts
    8k Views
    phenomlab
    @mventures that’s not an issue provided there is a password to go with the username
  • VirtualMin create virtual server

    Solved Configure
    4
    2 Votes
    4 Posts
    2k Views
    phenomlab
    @justoverclock correct. You only need to keep an eye on the resources of the droplet itself
  • Cloudflare now handling email routing, YAY 🚀

    Configure cloudflare
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied