sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.73k stars 708 forks source link

SMTP Switch Error 450 #3008

Open ertanalytics opened 6 years ago

ertanalytics commented 6 years ago

Send a test email fails with error code:

Error while trying to send test email: {"code":"EMESSAGE","response":"450","responseCode":450,"commands","DATA"} [other email-sending-error]

This occurred when attempting to switch ports in sandstorm.conf from 30025 to 25

kentonv commented 6 years ago

Hmm, the port setting in sandstorm.conf is for incoming mail. It should have no effect on outgoing mail, so it shouldn't affect the test e-mail.

The error message when sending a test mail comes from your outgoing mail server, which you would have configured in the admin settings. Unfortunately I don't know what the message you quoted could mean. What outgoing mail server are you using?

ertanalytics commented 6 years ago

I am using sandstorm default in the admin settings of localhost port 25. It seems that Roundcube works fine when I set the sandstorm.conf to 25, but it breaks the test emails and the login send token emails. Then when I sent the sandstorm.conf back to 30025, Roundcube no longer works and the login and token emails begin to work again.

As far as separate SMTP from anything that might be included, I have not deployed anything deliberately and happen to be on Ubuntu 16.04.

kentonv commented 6 years ago

The default SMTP setting of localhost:25 assumes that you have a mail server running on your machine, like sendmail or postfix. Usually that will run on port 25. If you switched Sandstorm to use port 25, then possibly this caused the other mail server to fail to start because the port was in-use. If you then tried to send e-mail from Sandstorm, it would only work if the destination address was an app hosted on Sandstorm. So if you used roundcube to send mail to roundcube, it would work, but if you sent to some external address, it wouldn't.

In any case, you definitely can't configure outgoing SMTP to talk to Sandstorm's own SMTP port on localhost. Sandstorm doesn't know how to route mail, so it has to talk to a separate mail server for outgoing messages.

gitgithubs commented 4 years ago

The default SMTP setting of localhost:25 assumes that you have a mail server running on your machine, like sendmail or postfix. Usually that will run on port 25. If you switched Sandstorm to use port 25, then possibly this caused the other mail server to fail to start because the port was in-use. If you then tried to send e-mail from Sandstorm, it would only work if the destination address was an app hosted on Sandstorm. So if you used roundcube to send mail to roundcube, it would work, but if you sent to some external address, it wouldn't.

In any case, you definitely can't configure outgoing SMTP to talk to Sandstorm's own SMTP port on localhost. Sandstorm doesn't know how to route mail, so it has to talk to a separate mail server for outgoing messages.

so what i need to do for make sending login tokens to external emails ?

ocdtrekkie commented 4 years ago

@gitgithubs Personally, I recommend Sendgrid. I signed up for the free plan when I set up my server and have literally forgot about it since. I've never hit the limit of the free tier with my Sandstorm server, I've never had to fix or update the account in any way since I first set it up, etc.

Michael-S commented 4 years ago

I set up my own mail server with the free software mailinabox.email project and used that. I rent a $5/month server for it, and pay for a cheap domain.

On Mon, Aug 24, 2020 at 2:30 PM Jacob Weisz notifications@github.com wrote:

@gitgithubs https://github.com/gitgithubs Personally, I recommend Sendgrid. I signed up for the free plan when I set up my server and have literally forgot about it since. I've never hit the limit of the free tier with my Sandstorm server, I've never had to fix or update the account in any way since I first set it up, etc.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sandstorm-io/sandstorm/issues/3008#issuecomment-679293004, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADLZM4JOGC6XJI2X2QVVSTSCKWTZANCNFSM4EDYLRAQ .

ocdtrekkie commented 4 years ago

@Michael-S It's good to hear a decentralized option works well for this. Would you say setup for that was trivial enough that we should recommend it in our documentation? I generally hesitate to recommend someone solve a Sandstorm configuration issue by setting up an entire other server/application, but if it's super easy it may at least deserve a mention.

Michael-S commented 4 years ago

Well, the setup is about as complicated as setting up your own Sandstorm server. So it's not terrible for someone already willing to try Sandstorm, but I'd be reluctant to recommend by default something that doubles the amount of work. I would keep Sendgrid and things like it as the default option and at most suggest mailinabox.email as an alternative for people that are a bit more ambitious.

-Mike

On Mon, Aug 24, 2020 at 2:44 PM Jacob Weisz notifications@github.com wrote:

@Michael-S https://github.com/Michael-S It's good to hear a decentralized option works well for this. Would you say setup for that was trivial enough that we should recommend it in our documentation? I generally hesitate to recommend someone solve a Sandstorm configuration issue by setting up an entire other server/application, but if it's super easy it may at least deserve a mention.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sandstorm-io/sandstorm/issues/3008#issuecomment-679299815, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADLZM4BR5X6T3NIOYHNW33SCKYKDANCNFSM4EDYLRAQ .

abliss commented 4 years ago

Fwiw I also used sendgrid and have had a great experience just like @ocdtrekkie

zenhack commented 4 years ago

I've been using mailgun for years and it's been a good experience.