Hello,

I want to deploy a simple mail server so that it can be used for users to register themselves or reset passwords, etc.

Is there an easy one to deploy (in docker if possible) ?

  • NX2
    link
    fedilink
    English
    2419 days ago

    I wrote a blog some time ago why selfhosting email sucks

    https://nx2.site/email-selfhosting

    If you just want the email server for only you and your friends, or for internal messages, selfhosting email can be fun, but your main email should probably not be selfhosted.

  • @Tetsuo@jlai.lu
    link
    fedilink
    English
    1519 days ago

    If you do self host I suggest reading carefully the Gmail guidelines for mails. They are the leaders in the field and they dictate the level of security required.

    DNS forward and reverse, DKIM, SPF, DMARC, ARC, DANE, bounce signature etc. Email is indeed a very complicated thing to host. I work on emails system all day and and I wouldn’t host my own mail.

    Even worse I’m hoping email disappear and another technology takes it place. Emails are unreliable and outdated, they need to go.

  • @darklamer@lemmy.dbzer0.com
    link
    fedilink
    English
    1419 days ago

    As already mentioned several times, selfhosting a mail server is not recommended unless you’re particularly interested in hosting a mail server, but with that said, you might find this project interesting:

    https://maddy.email/

    • Norgur
      link
      fedilink
      2
      edit-2
      19 days ago

      Dmarc/dkim/SPF/certs. Fun times!

      I got a mall server running, yet it’s almost more as an inbox.

  • kamenLady.
    link
    fedilink
    English
    1019 days ago

    I once came to the conclusion that there is no easy mail server

  • @pcouy@lemmy.pierre-couy.fr
    link
    fedilink
    English
    919 days ago

    Things have been going well for me, using docker-mailserver.

    I followed the setup guide, did everything in the DKIM, DMARC and SPF documentation page. The initial setup required more involvement from me than your standard docker-compose self-hosting deployment, but I got no issues at all (for now, fingers crossed) after the initial setup : I never missed any inbound e-mails, and my outbound e-mails have not been rejected by any spam filter yet.

    However, I agree with everyone else that you should not self-host an important contact address without proper redundancy/recovery mechanism in case anything goes wrong.

    You should also understand that self-hosting an email address means you should never let your domain expire to prevent someone from receiving emails sent to you by registering your expired domain. This means you should probably not use a self-hosted e-mail to register any account on services that may outlive your self-hosted setup because e-mail is frequently used to send password reset links.

  • @shrugal@lemm.ee
    link
    fedilink
    English
    8
    edit-2
    19 days ago

    I agree with everyone here that self-hosting email is never easy, but if you still decide to go down this route then here are two tips that I personally found very helpful, especially when you decide to host it at home:

    The first is to get an SMTP relay server. That’s just another mail server that yours can log into to actually send its mail, just like an email client would. That way you don’t have to worry about your IP’s sending reputation, because everyone will only see the relay’s reputable IP.

    Second is to configure a Backup MX. That’s an additional MX DNS entry with lower priority than the primary, and it points to a special mail server that accepts any mail for you and tries to deliver it to the primary server forever (or something like an entire week). So when your primary server is unreachable other sending servers will deliver mail to the backup, and it delivers the mail to the primary as soon as that’s back online.

    You can get these as separate services, but some DNS providers (like Strato for example) offer both with the base domain package. It makes self-hosting an email server much simpler and more reliable in my experience.

  • @retro@infosec.pub
    cake
    link
    fedilink
    English
    819 days ago

    If you need to throw in the towel on email self-hosting, don’t be ashamed. Mail servers are one of the more difficult projects to run. If you do end up outsourcing this, I recommend SendGrid, it’s reliable and free.

    • @ozzyrockin@lemmy.world
      link
      fedilink
      English
      112 days ago

      +1 to this worked for me, only issue was they block common free emails (like gmails etc) from making accounts but porkbun made it super easy to make a email forward that worked!