Show HN: Easy-to-use curl command to send email notifications
curlmail.co
curlmail.co
For the improvements, I will try get all of them done by tomorrow; they've all been really good!
For those of you suggesting alternatives:
* If you're suggesting them as a sort of 'BTW you can do this as well', then awesome
* If you're questioning 'why did I re-invent the wheel', as I've said in other comments:
a) Sending mail directly from a machine can be troublesome (lack of ports open, lack of SPF record for sending domain (since it maybe a workstation) etc.)
b) I've struggled to find an alternative method (since my original use for this was few and fare between) that I could actually remember.. often looking up how to send mail through curl for example meant reading multiple websites each time and time spent to get it working wasn't worth it, whereas I've never had problems remembering 'curl curlmail.co/email' :)
Thanks for all the feedback so far and, as with any quick side-project hack, if a single person in a real situation ends up using it and finds it useful, then its served it's purpose in my opinion!
Thanks
Once the user has activated, then they can include content and customisable subject (which at the moment anyone can do).
That sounds really good and hopefully wouldn't take away from the original simplicity.
Thanks, that's an awesome suggestion!
curl "https://www.curlmail.co/unsubscribe/EMAIL"
This may or may not be considered as an attack vector. If I know that someone is using the service, I can “troll” them by unsubscribing their email and they will stop receiving the alerts. A solution to this would be to include a verification code in the “unsubscribe” link that you are sending with the alert. Unsubscribe only if the verification code exists and matches the one associated with the email.Rolled out, so should be fixed :)
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-e...
curl --mail-from "you@gmail.com" --mail-rcpt "you@gmail.com" --ssl-reqd --url smtp://aspmx3.googlemail.com -T <(echo -e 'From: you@gmail.com\nTo: you@gmail.com\nSubject: Curl Test\n\nHello');So this will need to be limited to just several addresses?
> rate limiting on... recipient domain
Including gmail.com and outlook.com?
I'd guess that the simplest option would be to require some sort of registration and requiring an "API token" with every request. Not as clean and easy-peasy, but far more practical for moderation purposes.
Alternatively, a self-hosted version of the same would solve these problems. But if you are planning on turning this into a $ service at some point, that's probably not going to work because of that.
> So this will need to be limited to just several addresses? If this is in reference to rate limiting, each address is limited seperately, so if you send a message to 4 addresses and one's over the limit, it will fail and the rest willt work.
If you mean is there a limit to the number fo addresses per request, then there actually isn't and that's a VERY good point, so thank you!
>> rate limiting on... recipient domain
> Including gmail.com and outlook.com?
Yeh, the limit per domain is pretty high (compared to per email address).
> I'd guess that the simplest option would be to require some sort of registration and requiring an "API token" with every request. Not as clean and easy-peasy, but far more practical for moderation purposes.
If you having to register, verify your account, get an API key etc, then it's getting on towards the complexity of other services, which is, both, exactly what I was trying to avoid and means this is a cut-down version of other services, which then makes it redundant :) It was mainly meant for sending a notification to yourself when a command completes to check email delivery and such, not high volumes of traffic.
* It would be wise to stick an `https://` in the example URLs.
* Starttls is not used when sending, which ought to be fixed.
* For anti-abuse purposes, you ought to include the caller's IP address in the headers somehow.
All really good suggestions and will get cracking on them tomorrow :)
Thanks!
WRT putting sensitive info through it... I completely agree, I wouldn't advise this - at the same time, I'd never advise sending any sensitive info over any email (without using GPG). The reason for suggesting custom content was, if I had several commands going that would send notifications, I wanted an easy way to identify which one completed (even just sending a number or simple word so I could idenity if). The idea of piping to it was simply an idea of how I could expand it and suite other people's use-cases.
Hope this all makes sense.. so no mass data gathering etc, and, as I say, I wouldn't advise putting any sensitive info through it anyway :)
Have a server that does not have SMTP port open, and bothering IT to open it will take ages. All I needed was to send email alerts if certain batch jobs fail. or if disks get close to full. Poor man's monitoring.
curlmail works like a charm.
Will be happy to get you a couple of cups of coffee. Please add some way to send you $.
Before I add a third party service, I want to be reasonably sure it will stick around for a while.
But the first time some idiot sends an anonymous threat through curlmail, you'll realize you have better things to do than talk to attorneys and law enforcement, and curlmail will disappear.
I wish simple utilities like this could exist, but anonymous public services have to deal with inevitable idiots, or they won't exist for long.
Not entirely sure what you mean about 'add a third party service'
That said, (aside from thank you for the first bit :) ), the rest does pose a very interesting point. Not something I'd massviely considered.. spam is one thing (which rate limiting sort of solves). But not threats and such. As it stands, there are no logs, apart from those that you'd normally expect from a web server, so that probably isn't great from a legal aspect.
I guess possibly rejecting emails based on content, bad word list or similar. I _did_ implement a policy that banned IP addresses when a notification was unsubscribed from (since it was intended for the user to email themselves), but this obviously doesn't stop the initial email from being sent.
I will certainly think about this and try get something knocked up asap to try and counter this.
Thank you for your comment!
<html><body><h1>400 Bad request</h1> Your browser sent an invalid request. </body></html>
Have you got any ideas about monetization? Are there any usage limits? How about unexpected things you learned while building this? An 'about' page would greatly help us learn more and appreciate the project. I personally love the idea, great work, and great project!
Will certainly look into this further!
2.- The page source links to a manifest at:
"https://curlmail.co/manifest.json"
which answers: "Invalid email address"
maybe it has to do with the way it handles emailsThanks for pointing this out
Sorry, didn't answer your first question..
Static front-page was knocked-up by a friend (https://github.com/bencevans).
The API is in python and uses a postfix container for sending the mail and redis for storing data for rate-limiting and unsubscribing
echo "My message" | mail -s subject user@mail.com* Avoiding getting junked/rejected due to:
* Missing/invalid SPF record
* What would the sending domain be, if not set could easily be rejected
* From a dynamic IP
* Port 25 may not be open (it wasn't for my case)Curl an API and out it goes. It's trivial to setup for yourself.