Announcement

Collapse
No announcement yet.

[SOLVED] Hard drive spindown: root drive wakes frequently

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Re: Hard drive spindown: root drive wakes frequently

    OK. Looks like it's working now. Tonight rsync only ran at 4:20!
    Now, about the mail command... Whenever I try sending a message to my email address, the message bounces back saying "Mailing to remote domains not supported".
    But I need to get the mail from the server directly in my regular inbox (the inbox that I check with Thunderbird). I've read the man page for mail but couldn't understand how to do that (or if that can be done).
    Also, where could I find some info on how to use scripts? Right now I don't even know how to redirect the stdout and stderr to log file...

    Cheers
    Cristian

    EDIT: Having the logs delivered to my inbox would be best (so that I could also see if something's going wrong while I'm out of town); but if that's not possible, even having a window pop up automatically to display the logs on *this* computer would be ok (sort of like the Windows "net send" command, but should be cached in case this pc is shut down when the message is sent)...

    Comment


      #47
      Re: Hard drive spindown: root drive wakes frequently

      Originally posted by Quaxo76
      OK. Looks like it's working now. Tonight rsync only ran at 4:20!
      good.
      well done.

      Originally posted by Quaxo76
      Now, about the mail command...
      Whenever I try sending a message to my email address,
      the message bounces back saying "Mailing to remote domains not supported".
      But I need to get the mail from the server directly in my regular inbox
      (the inbox that I check with Thunderbird).
      I've read the man page for mail but couldn't understand how to do that (or if that can be done).
      guess you installed mailx, yeah?
      you'll have to go through:
      Code:
      sudp dpkg-reconfigure exim4-config
      and pick "mail sent by smarthost; no local mail".
      google for what to set for the rest.
      it's a bit complicated...

      Originally posted by Quaxo76
      Also, where could I find some info on how to use scripts?
      Right now I don't even know how to redirect the stdout and stderr to log file...
      look here.
      check out the "external links" down at the bottom.
      you'll find beginners and advanced users' guides.

      as for redirecting stdout and stderr...it's easy.
      keep in mind that file descriptor 0 is stdin, fd 1 is stdout and fd 2 is stderr.
      (btw, this is why when you open a file in unix you always get fd>=3)
      you use the major sign (>) to redirect the output of a command.
      and you double it (>>) to redirect in append mode.
      default redirects fd 1.
      if you want to redirect fd 2, you'll have to say it explicitly (2>).
      you can merge the two: "command > filename 2>&1"
      example:
      echo "redirect this line to a file" > /tmp/pippo
      echo "adding another line to a file" >> /tmp/pippo

      Originally posted by Quaxo76
      EDIT: Having the logs delivered to my inbox would be best
      (so that I could also see if something's going wrong while I'm out of town);
      but if that's not possible, even having a window pop up automatically
      to display the logs on *this* computer would be ok
      (sort of like the Windows "net send" command,
      but should be cached in case this pc is shut down when the message is sent)...
      we should avoid using windoze as an example.
      "windoze" and "server" is a contradiction in terms.

      hth
      gnu/linux is not windoze

      Comment


        #48
        Re: Hard drive spindown: root drive wakes frequently

        I installed mailx, yes. And it is complicated indeed. I don't know much of the "inner working" of a mail system. I was hoping for something where I could just plop in the smtp address of my mail service provider, and the username and password, and be allowed with that to send emails. Like it is with GUI mailing programs...

        Thanks for the info on the scripts. Scripts are something I always wanted to look into, but never really did - as they're not really needed with GUIs. This server-setup thing forced me to learn many new things!

        Cristian

        Comment


          #49
          Re: Hard drive spindown: root drive wakes frequently

          if your isp mail server doesn't require authentication (when sending, i mean),
          then it shouldn't really be all that difficult...

          when you get to the bit the configuration asks you for "IP address or host name of the outgoing smarthost"
          then you simply enter the same value you have for sending from your gui mail client and that's it.

          otherwise, you'll have a bit more reading ahead...
          check this out.

          gnu/linux is not windoze

          Comment


            #50
            Re: Hard drive spindown: root drive wakes frequently

            I tried to make a couple of experiments. I wrote the address of my isp's smtp host (by the way, it's gmail). I know that it needs authentication, so I edited the file /etc/exim4/passwd.client, and wrote there host_name:usernameassword
            This was supposed to match that host with those username/password. But mail is still not delivered.
            I run "sudo mail -s test myaddress@gmail.com"; then I type in the message body; then I end with an eof character; then I press enter when it asks for CC and then I'm back to the command prompt, but the mail isn't delivered.
            I think I'll have to surrender, as all those settings in the doc you gave me are "a bit" above my knowledge...

            Comment


              #51
              Re: Hard drive spindown: root drive wakes frequently

              we've been doing some pretty sophisticated stuff.
              stuff that usually requires some pretty skilled professionals.
              so...no problems.
              i'd suggest you go ahead with the shell scripting thing for now.
              enjoy yourself.
              it'll take you a while.
              take care.
              bye now.
              gnu/linux is not windoze

              Comment


                #52
                Re: Hard drive spindown: root drive wakes frequently

                Well - I gave up with mail, but I didn't give up the emailing thing altogether, as I really need it. Well, I found a nice program that does exactly what I want! It's called "sendEmail" and doesn't need any external modules. You just issue this command:

                Code:
                sendEmail -f <sender_address> -t <recipient_address> -u <subject> -m <message_body> -s <smtp_server_address> -xu <smtp_username> -xp <smtp_password>
                and the email is sent! It can also send attachments, or take the message body from a file. Which is just what I will need once I told the script to output the data as a log file!

                Well, thank you so much for all the help you gave me.
                By the way, how/where did you learn so many "exotic" things about Linux? How long did it take to learn so much? I've been a Windows user for years, and I completely dropped it only about one year ago... And I have so much to learn!

                Cristian

                Comment


                  #53
                  Re: Hard drive spindown: root drive wakes frequently

                  Code:
                  [quote=Quaxo76 ]
                  Well, I found a nice program that does exactly what I want! It's called "sendEmail"...
                  i need to write this down.
                  thanks.

                  Originally posted by Quaxo76
                  Well, thank you so much for all the help you gave me.
                  no problems.
                  i guess we'll meet again on this forum

                  Originally posted by Quaxo76
                  By the way, how/where did you learn so many "exotic" things about Linux?
                  How long did it take to learn so much?
                  it's my job to know computer science.
                  i learned at school, first, and at work, later.
                  i don't really know all that much about linux.
                  well, no, that's not fair.
                  i know quite a bit about this os.
                  but there's many (very smart) people on this forum that know a lot more.
                  i like doing support here because:
                  1) it's my paying back the community for what i get from this os
                  2) some people (like you) ask about stuff that help me stay up to date or even learn new things

                  Originally posted by Quaxo76
                  I've been a Windows user for years, and I completely dropped it only about one year ago...
                  well, it's never too late to give the bloody thing up, is it?

                  Originally posted by Quaxo76
                  And I have so much to learn!
                  nowadays there's plenty of resources online.
                  so, finding the info you need is not an issue.
                  the problem for someone that wants to learn is guidance.
                  i mean, someone (or something) that guide you in understanding
                  how much you need to learn of what and when.

                  cheers
                  gnu/linux is not windoze

                  Comment

                  Working...
                  X