• February 23, 2025, 08:22:05 PM
  • 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: Sending mail from the terminal  (Read 6366 times)

heliotrope

  • Level 1 Member
  • *
  • Posts: 9
Sending mail from the terminal
« on: August 03, 2011, 09:44:47 AM »

Hello all-
First, a big thanks to DLink for making a great product and supporting us with fun_plug.

I have a DNS-320 with a USB backup drive attached.  I have fun_plug working, and I have a crontabbed rsync job that mirrors the whole damn drive to the attached USB once per week as my "bullet-proof" backup.

I also have standard notifications set to let me know about drive space, status, etc. using the built-in gui and an anonymous smtp.

I'd like to send myself a note letting me know if rsync worked or failed.  I have installed mailx, esmtp, and one additional library for esmtp (I forgot which).

I can't figure out how to send myself mail from the command line.  I tried making an msmtprc and an esmptrc config file (very basic, just added my info to the examples) and I tried Ricardo's method
/usr/bin/msmtp --host=smtp.gmail.com --port=587 --auth=on --user <your_gmail_username> --tls=on --tls-certcheck=off -f <your_gmail_username@gmail.com> -t < /path/to/file_containing_your_message
all to no avail.  It just.... hangs?  The terminal just stops doing things until I hit ctrl-c.

Any help?  I'd just like to send the rsync stats file I'm making to myself via command line.
Logged

threepwood

  • Level 2 Member
  • **
  • Posts: 27
Re: Sending mail from the terminal
« Reply #1 on: August 03, 2011, 03:28:29 PM »

I'm sorry I can't help you with this, but I was wondering how you got your job into crontab.
My DNS-320 rewrote the crontab file after a few days.
Can you give me a hint? Thanks!
Logged

heliotrope

  • Level 1 Member
  • *
  • Posts: 9
Re: Sending mail from the terminal
« Reply #2 on: August 03, 2011, 04:15:47 PM »

Hmm, I haven't seen crontab rewrite, but I just did this yesterday.  You can use crontab -e and vi edit it in manually, or you use the tutorial here http://wiki.dns323.info/howto:backup modified to target the mounted USB ext3 volume.

Anybody have any ideas on the email thing?
Logged

heliotrope

  • Level 1 Member
  • *
  • Posts: 9
Re: Sending mail from the terminal
« Reply #3 on: August 04, 2011, 04:51:02 PM »

Please help?
Logged

ivan

  • Level 8 Member
  • ***
  • Posts: 1480
Re: Sending mail from the terminal
« Reply #4 on: August 05, 2011, 09:42:17 AM »

You should be asking this type of question over on the fun-plug site.
Logged

heliotrope

  • Level 1 Member
  • *
  • Posts: 9
Re: Sending mail from the terminal
« Reply #5 on: August 05, 2011, 09:48:54 AM »

Well that isn't helpful.  What fun_plug site?  inreto.de? Or nas-tweaks? I have asked at both of those, and I have read the tutorial on setting it up with gmail- which is not what I want to do/isn't working.   A lot of people on this forum are using terminal commands to do various things and are using fun_plug.  Don't troll my posts- if you have something helpful to say, say it, otherwise stay out of my business. 
Logged

ivan

  • Level 8 Member
  • ***
  • Posts: 1480
Re: Sending mail from the terminal
« Reply #6 on: August 06, 2011, 02:14:13 AM »

Heliotrope, I was not 'trolling' your post mealy saying that since D-Link does NOT support fun_plug that you would be much more likely to find the answers you are looking for on such sites as http://forum.dsmg600.info/index.php in the DNS-320 section.
Logged

gailh

  • Level 1 Member
  • *
  • Posts: 14
Re: Sending mail from the terminal
« Reply #7 on: October 02, 2011, 12:14:47 PM »

Hello all-
First, a big thanks to DLink for making a great product and supporting us with fun_plug. [...]
[...] Then, It just.... hangs?  The terminal just stops doing things until I hit ctrl-c. Any help?
heliotrope: I have exactly the same problem. After invoking mailx, it says: "connecting to MTA", then the system just hangs.
TIA - MiriamG
Logged