• April 26, 2024, 07:29:30 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Setting up SMTP email alerts  (Read 28925 times)

itsphake

  • Level 1 Member
  • *
  • Posts: 3
Setting up SMTP email alerts
« on: February 27, 2011, 12:31:51 PM »

I was trying to configure the outbound email alerts using the GMAIL outgoing SMTP mail server (smtp.google.com).

I'm initially using port 465 right now.  I have SMTP authentication checked.  When I test the email the pop-up opens with the SEnding message, but it hangs on that forever.  Then it appears to crash the webserver because I'm unable to access the DNS-323 Administration login anymore.  When this  happens do I just need to power the device down manually and power it back on?  I wasn't sure if this would do any harm to the device. 

Has anyone else configured their DNS-323 to use the Gmail outgoing SMTP and can send me their settings?

Thanks in advance.
Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: Setting up SMTP email alerts
« Reply #1 on: February 27, 2011, 02:25:31 PM »

This works for me:

Login Method ->  Account
User Name -> your_account
Password -> your_password
Port -> 587
SMTP Server -> smtp.gmail.com
Sender E-mail -> your_account@gmail.com
Receiver E-mail -> your_account@gmail.com
SMTP Authentication -> checked
« Last Edit: March 02, 2011, 12:48:31 PM by dosborne »
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

47th_ronin

  • Level 2 Member
  • **
  • Posts: 55
Re: Setting up SMTP email alerts
« Reply #2 on: February 28, 2011, 05:43:36 AM »

for me email notifications work only if both the sender and receiver addresses are the same.
Logged

skippy

  • Level 1 Member
  • *
  • Posts: 2
Re: Setting up SMTP email alerts
« Reply #3 on: March 30, 2011, 09:36:43 PM »

I have insight into what works and doesn't work sending through Gmail.

I found a strange bug in my version of the DNS-323 (Firmware 1.09). If I use correct email settings, I can send test messages, and alerts work. If I use certain incorrect settings, then I get failures. But if I use special incorrect settings, I crash the administrative web server, essentially freezing it, perhaps due to a blocked process.

I tried several configurations. In each case, I included these settings:

username: myaccount@gmail.com
password: magicpassword
sender email: myaccount@gmail.com
receiver email: myaccount@gmail.com
smtp authentication: check

The correct settings finished with this:

smtp server: smtp.gmail.com, port: 587

Settings that resulted in failure message finished with this:

smtp server: smtp.googlemail.com, port: 587

Settings that resulted in a crash finished with either of these:

smtp server: smtp.googlemail.com, port: 465
smtp server: smtp.gmail.com, port: 465

I'm surprised to find that these result in a crash, since the port 465 settings were taken from Google's documentation of how to set up outgoing email.

The crashed web server won't come up until it is restarted. Most people will need to reboot the DNS 323 for this. Those of us with ffp installed and ssh access can go in and restart it as follows:

# killall webs
# /web/webs &

By the way, I've seen many people complain in online forums that no logging is available to inform them of what causes their test to fail. If you can log in through ssh and watch the console, then you'll see the errors in the output. For example, with smtp.google.com.com on 587, I saw this:

msmtp: the server does not support authentication
msmtp: could not send mail (account default from /etc/.msmtprc)
Error sending message, child exited 69 (Service unavailable.).

And when I tried testing with smtp.gmail.com on 587 but without checking the box for smtp authentication, I saw this:

msmtp: envelope from address myaccount@gmail.com not accepted by the server
msmtp: server message: 530 5.7.0 Must issue a STARTTLS command first. c18sm589580ana.27
msmtp: could not send mail (account default from /etc/.msmtprc)
Error sending message, child exited 65 (Data format error.).
Mail Server test fail

However, the only way I know to get these in my output is to first restart the web server from the console. I suppose this makes the process of my ssh session the parent to the web server process.

On the crash, no message is sent to output. Instead, the system freezes.

Interesting!
Logged