outgoing email not sending

1,019 views
Skip to first unread message

sdf wer

unread,
Feb 14, 2017, 2:41:19 PM2/14/17
to Canvas LMS Users
I've installed canvas using the quick start and got it to work to the point where I added a course and a bunch of students.  But it just sends their invitations to the stdout of the server process instead of actually emailing.  I've edited outgoing_email.yml and it doesn't seem to make a difference, and tried it both with the 'delivery_method: "sendmail" and without.  Any ideas?  (The "se~~s.com" is a valid email address in my real file :)
Thanks,
Mike
PS, also all it will listen to is ::1:3000, how do I get it to listen to 0.0.0.0:3000?

development:
  delivery_method: "sendmail"
  address: "localhost"
  port: "25"
  domain: "outerworldapps.com"
  outgoing_address: "se~~s.com"
  default_name: "Instructure Canvas"

# or to use sendmail --
#
# development:
#   delivery_method: "sendmail"

test:
  delivery_method: "sendmail"
  address: "localhost"
  port: "25"
  domain: "outerworldapps.com"
  outgoing_address: "se~~s.com"
  default_name: "Instructure Canvas"

production:
  delivery_method: "sendmail"
  address: "localhost"
  port: "25"
  domain: "outerworldapps.com"
  outgoing_address: "se~~s.com"
  default_name: "Instructure Canvas"

# If receiving mail from multiple inboxes (see incoming_mail.yml.example),
# you'll want to include those addresses in a reply_to_addresses array so
# Canvas will select the Reply-To field of outgoing messages from all of the
# incoming mailboxes.

multiple_inboxes:
  delivery_method: "sendmail"
  address: "localhost"
  port: "25"
  domain: "outerworldapps.com"
  outgoing_address: "se~~s.com"
  default_name: "Instructure Canvas"

Graham Ballantyne

unread,
Feb 14, 2017, 5:10:10 PM2/14/17
to canvas-l...@googlegroups.com

A note about emails

Canvas will often attempt to send email. With the Quick Start instructions, email will go straight to the console that rails server is running on. If you want to set up email that actually goes to email addresses, please follow the Production Start instructions.




--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Graham Ballantyne
IT Services
Simon Fraser University

Graham Ballantyne

unread,
Feb 14, 2017, 5:10:39 PM2/14/17
to canvas-l...@googlegroups.com

A note about emails

Canvas will often attempt to send email. With the Quick Start instructions, email will go straight to the console that rails server is running on. If you want to set up email that actually goes to email addresses, please follow the Production Start instructions.





----- On 14 Feb, 2017, at 11:41, sdf wer <wmri...@gmail.com> wrote:
--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sdf wer

unread,
Feb 15, 2017, 9:20:08 AM2/15/17
to Canvas LMS Users
thanks for the reply I was afraid of that... those instructions are insane.  everything works just fine except for the emails as far as I can tell so far.

Graham Ballantyne

unread,
Feb 15, 2017, 12:33:12 PM2/15/17
to canvas-l...@googlegroups.com
The quick start guide is intended to get a Canvas enviornment up and running as quickly as possible (e.g. as a development environment). In such a situation you generally wouldn't want emails escaping your dev environment. In most cases you should really follow the Production Start guide instead. It's not much more work than doing the quick start install manually, and gives you a fully-functional Canvas environment.
--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sdf wer

unread,
Feb 16, 2017, 9:14:14 AM2/16/17
to Canvas LMS Users
thanks again for answering. I deleted the old stuff then worked through the productions steps and still no email is sent.
I dropped the canvas_development database so I'm pretty sure the stuff is seeing the 'SetEnv RAILS_ENV production'.
There isn't anything in /var/log/maillog near the time where the mail should have been sent.
Here is my outgoing_mail.yml, I tried it both with and without the 'delivery_method: "sendmail"' line in the production section:

development:
  address: "smtp.example.com"
  port: "25"
  user_name: "user"
  password: "password"
  authentication: "plain" # plain, login, or cram_md5
  domain: "example.com"
  outgoing_address: "can...@example.com"

  default_name: "Instructure Canvas"

# or to use sendmail --
#
# development:
#   delivery_method: "sendmail"

test:
  delivery_method: "test"


production:
  delivery_method: "sendmail"
  address: "localhost"
  port: "25"
  ##user_name: "user"
  ##password: "password"
  ##authentication: "plain" # plain, login, or cram_md5
  domain: "outerworldapps.com"
  outgoing_address: "ca~~~ps.com"

  default_name: "Instructure Canvas"

# If receiving mail from multiple inboxes (see incoming_mail.yml.example),
# you'll want to include those addresses in a reply_to_addresses array so
# Canvas will select the Reply-To field of outgoing messages from all of the
# incoming mailboxes.

multiple_inboxes:
  address: "smtp.example.com"
  port: "25"
  user_name: "user"
  password: "password"
  authentication: "plain" # plain, login, or cram_md5
  domain: "example.com"
  outgoing_address: "can...@example.com"
  default_name: "Instructure Canvas"
  reply_to_addresses:
  - "can...@example.com"
  - "can...@example.com"
  - "can...@example.com"
  - "can...@example.com"


And if it helps here is the relevant part of ssl.conf (I am using CentOS):

<VirtualHost *:3000>
    LogLevel warn

    SSLEngine on
    BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
    SSLCertificateFile /etc/pki/tls/certs/www_outerworldapps_com.crt
    SSLCertificateKeyFile /etc/pki/tls/private/www.outerworldapps.com.key
    SSLCertificateChainFile /etc/pki/tls/certs/www_outerworldapps_com.ca-bundle

    ServerName www.outerworldapps.com
    DocumentRoot /home/canvas/canvas/public
    ErrorLog /var/log/httpd/canvas_errors.log
    LogLevel warn
    CustomLog /var/log/httpd/canvas_access.log combined
    SetEnv RAILS_ENV production
    SetEnv GEM_HOME /home/canvas/.gems
    SetEnv LD_LIBRARY_PATH /opt/rh/rh-postgresql94/root/usr/lib64:/opt/rh/rh-ruby23/root/usr/lib64
    SetEnv PATH /opt/rh/rh-ruby23/root/usr/bin:/opt/rh/rh-postgresql94/root/usr/bin:/usr/local/bin:/usr/bin:/bin
    SetEnv PGHOST localhost
    <Directory /home/canvas/canvas/public>
        Options All
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>




On Tuesday, February 14, 2017 at 2:41:19 PM UTC-5, sdf wer wrote:

Graham Ballantyne

unread,
Feb 16, 2017, 12:08:06 PM2/16/17
to canvas-l...@googlegroups.com
Canvas uses delayed jobs to send mail. Is your jobs processor running (try `ps -ef | grep delay`)? Is there anything in your logs/delayed_job.log file?
--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sdf wer

unread,
Feb 17, 2017, 7:39:44 AM2/17/17
to Canvas LMS Users, gra...@sfu.ca
thanks again Graham for replying
Sorry never heard of 'delay' before.  Looked on several systems for it (CentOS-7, Ubuntu 11.04, 14.04, 16.04) with 'ps -ef | grep delay'  I did rpm -qa | grep delay and yum search delay on CentOS-7 no luck.  Also did apt-cache search delay on the Ubuntu systems and no luck there either.
DId google search for 'linux delay' and 'ubuntu delay' and of course got a bunch of stuff about the sleep and at commands.  Where do I get delay?  Maybe should add another step to the installation instructions.
Mike

Graham Ballantyne

unread,
Feb 17, 2017, 10:49:22 AM2/17/17
to canvas-l...@googlegroups.com


-- 
Graham Ballantyne 
IT Services 
Simon Fraser University 

sdf wer

unread,
Feb 18, 2017, 12:04:09 PM2/18/17
to Canvas LMS Users
thanks again graham IT WORKS NOW!!! YIPPY!!



On Tuesday, February 14, 2017 at 2:41:19 PM UTC-5, sdf wer wrote:

sdf wer

unread,
Feb 24, 2017, 8:41:45 AM2/24/17
to Canvas LMS Users
one more question if its ok, is there any way to rotate that delayed_job.log file?  it has grown 500MB in a few days.  I tried scripts/canvas_init restart but it just hangs.
thanks again
mike

Graham Ballantyne

unread,
Feb 27, 2017, 1:29:31 PM2/27/17
to canvas-l...@googlegroups.com
There's a couple of ways you could approach this:

  1. Set up logrotate for the delayed_jobs.log file (and probably your production.log file). However, you'll likely need to restart the canvas_init service post-rotate so that it opens the new log file (and if you rotate production.log, you'll probably have to restart the Canvas app, which takes a bit of time).
  2. Send your logs to syslog facility (e.g. local1 or user), configure syslog to save those facilities to a file, and use logrotate to rotate those files (and have it restart syslog). This is what we do in production on our site; we have 20 app servers and two jobs servers all forwarding their logs to one machine, which aggregates them to a file, and also forwards to our centrally-managed logging server. A similar question came up in IRC last week so I posted the relevant parts of our canvas, rsyslog, and logrotate configs: https://gist.github.com/grahamb/712c6b1901e16d1e04f99ab3ec670b12
Hope that helps.
--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages