Sending email from Synology via CLI/SSH on DSM 6

Doing a quick Google search for sending emails from Synology via CLI/SSH talks about the sendmail command. However, this doesn’t work on DSM6 unless you install a package that provides the command.

You can install one of the following packages to get the sendmail command

  • Synology Mail Server
  • Synology MailPlus Server

Both allow you to set up an SMTP mail relay such as Gmail, Postmark, or Sendgrid. But that means you need to install and run these services. This is not ideal if you’re not using all the features of these applications.

Instead, you can look at using ssmtp which is installed by default and will use the built-in SMTP configuration that is present in the Synology Control Panel -> Notification -> Email.

You will have to make sure you use the appropriate email headers such as From: when piping in data to be sent via email like so.

echo "From: [email protected]\nthis is a test" | ssmtp [email protected]

You could also look at using Sendgrid or Postmark with Bash. There are two scripts that would work for this.

  • SendGrid

How to Increase Exim4 Logging Information

This is pretty simple to do, the syntax is as follows.

Plain Text

However, depending on your OS, you will need to add this line to /etc/exim.conf or if you’re running cPanel you can follow these instructions.

https://www.limestonenetworks.com/support/knowledge-center/1/62/how_do_i_configure_exim_for_better_logging.html

JungleDisk – Server Daemon Not Responding, No Backups, Not cool?

So I noticed that one of my servers wasn’t being backed up via email alerts recently. Usually I’m on top of it, but I noticed recently one less email from JungleDisk (I get completion notices on all JungleDisk Backups).

So I opened up the Jungle Disk Server Edition Management and found that I couldn’t connect to the machine I was trying to open. I thought, hrmm this happened before I just need to restart the “junglediskserver” process on the server in question. At which point I could then see the server listed in the Management console.

Once selected the server to see when the last backup was, I noticed it was 24 days from the last complete backup. I was super surprised and kinda ticked off because I didn’t notice this quick enough to fix it and neither did JungleDisk. I mean if there are 24 missed backup windows, don’t you think I should be notified.

I described the above to JungleDisk in an email to their Feedback address, lets see how they respond.

Update #1: I got a response from JungleDisk via email, they directed me to their Support System at which point I was able to post a feature request. But to my surprise their were already a handful of similar requests, so I dropped my two bits in. The one thread was over 2 years old. Great software, bad community relationship.

Update #2: I haven’t been following the thread on Jungledisk’s support site as I’ve pretty much decided to live with this problem. However, another awesome thing happened (I’m being sarcastic). Jungledisk was doing a backup and it either started super slow or during the backup it slowed down, either way the backup was going at 0.1k/s and wasn’t going to finish. It kept running, it missed the next backup window and I only knew this because I got no email about the job completing. You would think if a job takes too long and the next backup window is forthcoming, why not notify via email that it’s happening.