I'm able to login to localhost:5000/webmail, but sending mail from RSConnect platform gives Unable to send mail... error.
Digging into the Admin > Settings to Send Test Mail, it gives Error: Cannot connect to SMTP host: localhost:0: dial tcp [::1]:0: connect: connection refused.
Is there a RStudio guide to set up Sendmail config in QuickStart VM?
It looks like it may not be using the right port... Connect should be using SMTP, as well as localhost and port 25 in the Admin > Settings panel. Is that what you see? Can you share a screen-shot?
You can test in a terminal if the smtp service is working by executing sudo netstat -lntp. You can share the output here, if you want! Basically, there should be a service listening on port 25 and port 111 (if I remember correctly).
There is some dirty hackery going on to get the SMTP "demo" working It usually just works, so I'm not sure why it is broken for you!
Haha yes! We try! Convenient timing, really Ohh strange! Did you update RStudio Connect, per chance? I think the version I built last was missing some of the new SMTP goodies in a config file. I'm wondering if there is a bug in the upgrade / migration process.
There should be an SMTP block there that you can edit. Then you will need to either restart or reload Connect. (sudo systemctl restart rstudio-connect).
Ultimately, you will want lines that look like this in the rstudio-connect.gcfg file, preferably. The migration file is just a temporary holdover when migrating versions that have a breaking config change.
Hopefully that will get you running! Apologies in advance if you're unfamiliar with text editing on a linux computer, as it can be a bit of work nano or vim are the usual culprits, and sudo nano /etc/rstudio-connect/rstudio-connect.gcfg may be necessary.
rstudio@rstudio-quickstart:~$ cat /etc/rstudio-connect/rstudio-connect.gcfg
; RStudio Connect Quickstart configuration file
[Server]
SenderEmail = rstudio-connect@example.com
Address = http://localhost:5000/rsconnect/
PublicWarning = <b>WARNING: This is a Quickstart Server and using it in production is not supported</b>
LoggedInWarning = <b>WARNING: This is a Quickstart Server and using it in production is not supported</b>
ExpandedViewUI = true
DefaultContentListView = "expanded"
[HTTP]
Listen = :3939
NoWarning = true
[Authentication]
Provider = pam
Notice = "WARNING: This is a Quickstart Server and using it in production is not supported. Login with user/password rstudio/rstudio"
[Applications]
RConfigActive = quickstart
[Python]
Enabled = true
Executable = /opt/Python/3.7.1/bin/python3
rstudio@rstudio-quickstart:~$ cat /etc/rstudio-connect/rstudio-connect-migration.gcfg
cat: /etc/rstudio-connect/rstudio-connect-migration.gcfg: Permission denied
rstudio@rstudio-quickstart:~$ sudo cat /etc/rstudio-connect/rstudio-connect-migration.gcfg
; This is an automatically generated file and it should not be
; modified. Use the command `rscadmin configure --append-migration` to
; move any settings declared here to your main configuration file.
;
; The Configuration Migration section in the Configuration Appendix
; of the Admin Guide explains how to work with the migration file.
;
[Server]
EmailProvider = "smtp"
[SMTP]
Host = "localhost"
StartTLS = "never"
; End of the migration
Edited
rstudio@rstudio-quickstart:~$ sudo cat /etc/rstudio-connect/rstudio-connect-migration.gcfg
; This is an automatically generated file and it should not be
; modified. Use the command `rscadmin configure --append-migration` to
; move any settings declared here to your main configuration file.
;
; The Configuration Migration section in the Configuration Appendix
; of the Admin Guide explains how to work with the migration file.
;
[Server]
EmailProvider = "smtp"
[SMTP]
Host = "localhost"
Port = 25
StartTLS = "never"
; End of the migration
Indeed, original config file was missing port info.
rstudio@rstudio-quickstart:~$ cat /etc/rstudio-connect/rstudio-connect.gcfg
; RStudio Connect Quickstart configuration file
[Server]
SenderEmail = rstudio-connect@example.com
Address = http://localhost:5000/rsconnect/
PublicWarning = <b>WARNING: This is a Quickstart Server and using it in production is not supported</b>
LoggedInWarning = <b>WARNING: This is a Quickstart Server and using it in production is not supported</b>
ExpandedViewUI = true
DefaultContentListView = "expanded"
[HTTP]
Listen = :3939
NoWarning = true
[Authentication]
Provider = pam
Notice = "WARNING: This is a Quickstart Server and using it in production is not supported. Login with user/password rstudio/rstudio"
[Applications]
RConfigActive = quickstart
[Python]
Enabled = true
Executable = /opt/Python/3.7.1/bin/python3
rstudio@rstudio-quickstart:~$ cat /etc/rstudio-connect/rstudio-connect-migration.gcfg
cat: /etc/rstudio-connect/rstudio-connect-migration.gcfg: Permission denied
rstudio@rstudio-quickstart:~$ sudo cat /etc/rstudio-connect/rstudio-connect-migration.gcfg
; This is an automatically generated file and it should not be
; modified. Use the command `rscadmin configure --append-migration` to
; move any settings declared here to your main configuration file.
;
; The Configuration Migration section in the Configuration Appendix
; of the Admin Guide explains how to work with the migration file.
;
[Server]
EmailProvider = "smtp"
[SMTP]
Host = "localhost"
StartTLS = "never"
; End of the migration
Edited
rstudio@rstudio-quickstart:~$ sudo cat /etc/rstudio-connect/rstudio-connect-migration.gcfg
; This is an automatically generated file and it should not be
; modified. Use the command `rscadmin configure --append-migration` to
; move any settings declared here to your main configuration file.
;
; The Configuration Migration section in the Configuration Appendix
; of the Admin Guide explains how to work with the migration file.
;
[Server]
EmailProvider = "smtp"
[SMTP]
Host = "localhost"
Port = 25
StartTLS = "never"
; End of the migration
I left the /etc/rstudio-connect/rstudio-connect.gcfg as is.
Had to keep the StartTLS = "never" setting for this to work
Interesting!! Well done, and thanks so much for sharing! I'm now a bit concerned that this is a bug in the product's upgrade process, so I will do some sleuthing to find out if that is the case.
Definitely let us know if you run into any more issues! I'm glad to hear that the email demo is working!
Just posted another issue related to connecting RSConnect with desktop RStudio for publishing functionality; guess you'll be the one answering it too !