Skip to content

Email Server Settings

Solved Configure
25 4 4.4k 1
  • @Madchatthew in theory, yes, but for mail to be received you’ll need an MX record for that domain. What’s there now?

    @phenomlab right now I have an MX record that has mydomainname.com which is also the host name on the server.

  • @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
  • Spam spam spam

    Solved Configure nodebb
    6
    2 Votes
    6 Posts
    854 Views
    @Panda said in Spam spam spam: ok, yes Ive seen the queue, it shows IP, but doesnt have a field for comments from registrant. It’s not designed for that. It merely serves as a gateway between posts appearing on your form or not. @Panda said in Spam spam spam: It would be better if nodebb had this plugin included in ACP list, as not only then do you know its approved and should work, but many people cant or dont want to use CLI on the server That’s a question for the NodeBB devs but in all honesty you can’t not use the CLI when installing nodebb so to be this isn’t a big deal.
  • Pulling YouTube videos using RSS

    Configure rss youtube rsshub
    5
    7
    6 Votes
    5 Posts
    1k Views
    The perfect solution and walkthrough Mark, appreciated as always!
  • MogoDB v6 to v7 upgrade

    Solved Configure nodebb
    5
    1 Votes
    5 Posts
    1k Views
    @Panda if you used the Ubuntu PPA, I think this only goes as far as 6.x if I recall correctly.
  • Getting Eror When Started NodeBB

    Solved Configure bug
    7
    1
    2 Votes
    7 Posts
    1k Views
    @phenomlab yes i did. i deleted one of plugin then it started to work normally.
  • mongodb replica set

    Configure mongodb docker ansible
    11
    2 Votes
    11 Posts
    2k Views
    @veronikya said in mongodb replica set: The host’s local dns resolution is not configured. The problem of the host’s hosts being unable to be resolved in docker has been solved. Surprisingly Solution: Edit the /etc/resovel.conf file Add 127.0.0.53 One immediate issue I can think of here is that editing resolv.conf directly is no longer supported and not recommended (because the changes do not survive a reboot) - unless you install the resolvconf package?
  • Email set up on OVH Cloud

    Solved Configure email
    21
    1 Votes
    21 Posts
    4k Views
    @mventures that’s not an issue provided there is a password to go with the username
  • Forum registration email goes to spam

    Moved Solved Configure
    6
    1 Votes
    6 Posts
    1k Views
    @phenomlab emails mate, although I seem to have used a different email on each browser to remain logged in for cough cough posts .
  • Cloudflare now handling email routing, YAY 🚀

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