4 ms·
I've looked at setting up sendmail as a "LAMP guy" and I said nope nope nope, just use mailgun.
by kowdermeister 9y ago
I've looked at setting up sendmail as a "LAMP guy" and I said nope nope nope, just use mailgun.
- pmlnr 9y agoSendmail is everything but simple. The question was SMTP in general, which indeed is an extremely simple protocol. Here, this is how you send a plain text* mail in python: https://petermolnar.net/not-mime-email-python-3/ https://petermolnar.net/not-mime-email-python-3/ Using an HTTP API for this is a massive overkill. * I'm aware using utf-8 like this may confuse older clients but I didn't have problem with anything relatively modern I tested the receiving on.
- kowdermeister 9y agoSending is not the tricky part, implementing it right is probably another story. I wouldn't call it massive overkill. REST is extremely simple as well. You have to make an request anyways so it's just a question of preference how you connect to that the email sending service.
- pmlnr 9y ago> I wouldn't call it massive overkill. You're running a web server to emulate telnet. It's a massive overkill.
- bjpbakker 9y ago> implementing it right is probably another story Do you implement your own HTTP communication every time you need it or do you use a library? Just as for HTTP there are many good libraries for SMTP communication that you can easily use. No need to roll your own.
- beaconstudios 9y agonowadays you have the option of using postfix+dovecot, which for me at least seems to be a lot easier.
- laumars 9y agoYou still need to set up the SMTP server with this solution. Creating the relay is the hard part of any mail service because even SMTP aside, you need to set DNS entries on your FROM domain to authorise your SMTP relay's IP (otherwise spam filters will just block your email). And if it's regular commercial mailshots then you'd need to register with one of the trusted services (which isn't free) and have all sorts of controls like rate limiting in place - again so you don't just get rejected as spam. Honestly, I would welcome a complete ground up re-implementation of email - SMTP, POP/IMAP and all. The "very simple protocol, that's matured for decades now" is really just a mess of different protocols - different authentication models, different encryption methods, etc and all operating without a standard format for error handling. Plus all of the additional bloat bolted on to handle the swell of abuse that the email "network" has had to endure. There's nothing simple about email any more. However going back to the topic: the unfortunate thing about this REST API is it seeks to solve the least complicated part of the whole SMTP stack.
- kowdermeister 9y agoThanks, I missed that part, I thought drop in means it handles most of the things :) I'd welcome that too, it's kinda sad nobody succeeded with "email 2.0", sure we have lots of attempts but I can't recall any major players. The best solutions to "fix email" were companies that advocated to not use email and use their closed platform. What I can think of would be cool is something XMPP based with email fallback.
- vram22 9y agoYes, good point about email being complex to implement - both the server and the clients that use it. Example: Some years back, I remember reading a book (I think from O'Reilly) about using programming email, by an author called David Wood [1]. Update: I just did this google search: java and email book david wood and looked at the results. The first hit is that book - it's name was actually Programming Internet Email - and it was by O'Reilly Media: http://shop.oreilly.com/product/9781565924796.do http://shop.oreilly.com/product/9781565924796.do It has info on both the fundamental concepts and protocols of email, as well as examples in both Perl and Java. Other results of that search show that there are multiple books about programming email (as can be expected), including a list of books about Internet email on an Oracle site: Books on the JavaMail API and Internet Mail: http://www.oracle.com/technetwork/java/javamail/index-139773.html http://www.oracle.com/technetwork/java/javamail/index-139773... Not all of those are exclusively about email, and some probably have overlapping content, but still, it shows (as Wood's book did too) that it is a big topic: JavaMail API, by Elliotte Rusty Harold. Internet Email, by David Wood. Programmer's Guide to Internet Mail, by John Rhoton. Internet Email Protocols: A Developer's Guide, by Kevin Johnson. Java Network Programming, 2nd Edition, by Elliotte Rusty Harold. Essential Email Standards: RFCs and Protocols Made Practical, by Pete Loshin. Internet Messaging: From the Desktop to the Enterprise, by Marshall T. Rose and David Strom. Internet E-Mail: Protocols, Standards, & Implementation, by Lawrence Hughes. Managing IMAP, by Dianna Mullet and Kevin Mullet. Professional Java Server Programming J2EE Edition. Java Cookbook: Solutions and Examples for Java Developers, by Ian F. Darwin. JavaServer Pages (JSP) Fast & Easy Web Development, by Aneesha Bakharia. [1] From what I read about David Wood, he seemed to have a lot of experience with email (and other stuff) and had for some time, a company providing products and/or services in that area. http://www.oreilly.com/pub/au/565 http://www.oreilly.com/pub/au/565 And that Java Cookbook by Ian Darwin is pretty good too - I have it.
- kennydude 9y agoMailgun works with SMTP [0]. Using SMTP means you're not locking yourself into one vendor, in case Mailgun does something like Mandrill where they dramatically increase the price [0] https://documentation.mailgun.com/en/latest/quickstart-sending.html#send-with-smtp-or-api https://documentation.mailgun.com/en/latest/quickstart-sendi...
- fundabulousrIII 9y agoNobody I know in the SA community uses sendmail much anymore. Maybe there are a few holdouts but if someone gave me the task of standing up an MTA it would be postfix.