Friday, November 8, 2013

Dovecot MTA

I've never really wanted to create my own MTA, because I like Postfix quite a lot. And I always thought it would require a horribly lot of time to be able to create something that was anywhere even close to having Postfix's features. (I would shudder to even think about recreating Dovecot from scratch nowadays.) But slowly over time I've also been thinking of ways how things could be done a bit better, and I think I have enough ideas to start thinking about Dovecot MTA more seriously in a few more months (after my current busy schedule calms down a bit). And (unlike Dovecot!) I'm not planning on taking over the world with the MTA (or at least not very quickly), but it would definitely be useful for many installations I know of.

My main design goals for the MTA are:
  • In normal load don't queue mails, just continue delivering the mail through different processes/services until it succeeds or fails, and only after that return ok/failure to the SMTP client. So there's no (forced) post-queue filtering, everything would normally happen pre-queue. This is required because in Germany (and EU in general?) you aren't allowed to just drop spams after SMTP server has responsed OK to the client, even if you’re 100% sure it’s a spam. So this would also mean that the SMTP DATA replies will come more slowly, which means that the SMTP server must be able to handle a lot more concurrent SMTP connections, which means that in large installations the smtpd process must be able to asynchronously handle multiple SMTP client connections.
  • In some cases you can't really avoid placing mails into a queue. This could be because of temporary failures or maybe because of an abnormal load spike. A mail queue in local disk isn't very nice though, because if the local disk dies, the queued mails are lost. Dovecot MTA will allow the queue to be in object storage and it will also likely support replication (similar to current dsync replication). In both of these cases if a server dies, another server can quickly take over its queue and continue handling it.
  • Dovecot MTA is a new product, which means we can add some requirements to how it's being used, especially related to securely sending emails between servers. It could do a bunch of checks at startup and fail to even start if everything isn't correct. Here are some things I had in mind - not sure if all of these are good ideas or not:
    • Require DKIM configuration. All outgoing mails will be DKIM signed.
    • Require the domain’s DNS to contain _submission._tcp SRV record (and actually might as well require _imap._tcp too)
    • Require SSL certificates to be configured and always allow remote to use STARTTLS
    • Require DANE TLSA record to exist and match the server's configured SSL cert
    • Have very good (and strict?) DNSSEC support. If we know a remote server is supposed to have valid DNSSEC entries, but doesn't, fail to deliver mail entirely?
    • Add a new DNS record that advertises this is a Dovecot MTA (or compatible). If such entry is found (especially when correctness is guaranteed by DNSSEC), the email sender can assume that certain features exist and work correctly. If they don't, it could indicate an attack and the mail sending should be retried later. This DNS record would of course be good to try to standardize.
  • Configuration: It would take years to implement all of the settings that Postfix has, but I think it's not going to be necessary. In fact I think the number of new settings to dovecot.conf that Dovecot MTA requires would be very minimal. Instead nearly all of the configuration could be done using Sieve scripts. We'd need to implement some new MTA-specific Sieve extensions and a few core features/configurations/databases that the scripts can use, but after that there wouldn't be really any limits to what could be done with them.
  • Try to implement as many existing interfaces as possible (e.g. Milter and various Postfix APIs like policy servers) so that it wouldn’t be necessary to reimplement all the tools and filters.
So perhaps something like this could be done in time for Dovecot v2.4. Any thoughts/ideas/suggestions?

31 comments:

  1. You have touched some pleasant factors here. Any way keep up writing. 바카라사이트

    ReplyDelete
    Replies
    1. I recently had the pleasure of experiencing the exceptional services provided by Kaya VIP Travel in Istanbul, and I must say, it was truly remarkable. From the moment I made my reservation until the end of my journey, their professionalism and dedication to customer satisfaction were evident.

      The comfort and luxury offered by their VIP class Mercedes Vito vehicles surpassed my expectations. The spacious interior, comfortable seats, and meticulous interior design truly made my travel experience a memorable one. I felt pampered and at ease throughout the journey.

      One aspect that truly stood out for me was the level of safety and security provided by Kaya VIP Travel. Their experienced drivers, coupled with their TURSAB registered agency, ensured a journey that was not only enjoyable but also reliable and secure. It was comforting to know that my well-being was their top priority.

      Furthermore, the flexibility and personalized service offered by Kaya VIP Travel were commendable. They tailored the journey according to my specific needs and requests, going above and beyond to ensure my satisfaction. Their attention to detail and commitment to providing a seamless experience were truly impressive.

      Overall, my experience with Kaya VIP Travel was exceptional. They set a high standard for VIP transfer services in Istanbul, and I would highly recommend them to anyone seeking a comfortable, luxurious, and reliable travel experience. Whether it's for business or leisure, Kaya VIP Travel will exceed your expectations and make your journey truly unforgettable.

      Delete
    2. Masa sandalye kiralama hizmeti, etkinliklerinizi veya organizasyonlarınızı daha konforlu ve pratik hale getirmenin ideal bir yoludur. Özel etkinlikler, düğünler, iş toplantıları veya seminerler gibi birçok farklı etkinlik için masa ve sandalye ihtiyacınızı karşılamak önemlidir.

      Delete
  2. Nice one! thank you so much! Thank you for sharing this post. Your blog posts are more interesting and impressive. 바카라사이트

    ReplyDelete
  3. Good post. I study one thing more difficult on totally different blogs everyday. It can all the time be stimulating to learn content from different writers and follow a bit one thing from their store.
    majortotosite
    racesite
    oncasinosite
    totopick

    ReplyDelete
  4. I would appreciate you that you pick up an important topic to write a thoroughly informative post on. I hope that you never stop and keep posting such valuable content 바카라사이트

    ReplyDelete
  5. MEGA GAME, try all slots for free credit. mega game

    The best online slots game PG SLOT direct website. https://pgslot-games.com/


    The best online slots game PG SLOT direct website. https://pgslot-games.co/

    ReplyDelete
  6. I would like to use the ability of saying thanks to you for this article here. I have usually enjoyed checking out this site. 온라인카지노

    ReplyDelete
  7. betflix Slots Auto Deposit-Withdrawal Financial System Safe, Accurate, Fast

    ReplyDelete
  8. It was very well authored and easy to understand. Thanks alot. ทางเข้าjoker

    ReplyDelete
  9. I don't usually comment, but I have to say thank you for this amazing post.

    토토
    안전놀이터
    우리카지노탑
    카지노사이트

    ReplyDelete
  10. Thanks For sharing such valuable information. 토토사이트

    ReplyDelete

  11. Thanks again for the post. Great blog. Cool.
    I like the helpful information you provide in your articles.
    스포츠토토365

    ReplyDelete
  12. I do agree with all of the ideas you’ve presented in your post.바카라사이트닷컴

    ReplyDelete
  13. Thank you for nice information. Please visit our web: click here

    ReplyDelete
  14. Thanks for Nice and Informative Post. This article is really contains lot more information about This Topic. 바카라사이트

    ReplyDelete
  15. vape modules from famous brands, they're all here.Long-term stable supply, holiday discounts, regular discount code issued.Augvape KitsArtery Nugget GT.
    vapeciga

    ReplyDelete
  16. 토토사이트
    Really a great addition. I have read this marvelous post.

    ReplyDelete
  17. Thanks for Nice and Informative Post. This article is really contains lot more information nice web info for you 토토사이트

    ReplyDelete
  18. The evolution of the peppered moth is an example of natural .토토사이트

    ReplyDelete
  19. I have read several articles on your webpage that have characteristics that I want to learn about, which is why I keep coming back. As a student who frequently uses assignment help edinburgh service and requires help with his assignments, I am thrilled to learn about those blogs.

    ReplyDelete
  20. thank you for sharing this post! you done great effort
    Abogado DUI Fredericksburg

    ReplyDelete
  21. This is to helpful, I have read here all post.

    ReplyDelete
  22. motorcycle accident lawyer near meThanks for sharing a very useful blog commenting website

    ReplyDelete
  23. Nice informative blog to read. Thanks for sharing this beautiful post. Keep sharing more interesting and informative blogs like this. Reckless Driving Rockbridge VA Lawyer

    ReplyDelete