News for hackers. Stuff that matters.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by kowdermeister on Tuesday August 01, 2017 @05:09AM (#14898910)
I've looked at setting up sendmail as a "LAMP guy" and I said nope nope nope, just use mailgun.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by laumars on Tuesday August 01, 2017 @05:21AM (#14898963)
You 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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by kowdermeister on Tuesday August 01, 2017 @05:36AM (#14899024)
Thanks, 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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by vram22 on Tuesday August 01, 2017 @08:11AM (#14899819)
Yes, 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

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

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

And that Java Cookbook by Ian Darwin is pretty good too - I have it.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by vram22 on Tuesday August 01, 2017 @11:58AM (#14902101)
>it's name was

Sorry, "its name was" :)

Still forget that rule sometimes.

http://data.grammarbook.com/blog/pronouns/1-grammar-error/

Re:Mailit: A Tiny Drop-In REST API to Send Emails by kennydude on Tuesday August 01, 2017 @06:12AM (#14899202)
Mailgun 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-sendi...

Re:Mailit: A Tiny Drop-In REST API to Send Emails by pmlnr on Tuesday August 01, 2017 @05:14AM (#14898932)
Sendmail 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/

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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by beaconstudios on Tuesday August 01, 2017 @05:53AM (#14899113)
nowadays you have the option of using postfix+dovecot, which for me at least seems to be a lot easier.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by kowdermeister on Tuesday August 01, 2017 @05:22AM (#14898968)
Sending 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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by bjpbakker on Tuesday August 01, 2017 @05:29AM (#14899004)
> 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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by pmlnr on Tuesday August 01, 2017 @05:26AM (#14898984)
> I wouldn't call it massive overkill.

You're running a web server to emulate telnet. It's a massive overkill.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by fundabulousrIII on Tuesday August 01, 2017 @09:20AM (#14900320)
Nobody 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.