Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

  1. #11
    Join Date
    Sep 2010
    Beans
    14

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Hi

    Thanks for your response, it has been useful so far!!

    I do however have one issue...

    I think my issue is linked with your statement:
    "* mdadm e-mail notification by default looks for /usr/sbin/sendmail."

    I can send emails successfully using msmtp but it seems that mdadm still uses sendmail because I can see changes to /etc/postfix/main.cf refelct in /var/log/mail.log.

    My mails get bounced back and I think it is because the from field is incorrect. With msmtp I set my from field to myemail@gmail.com but i cannot do that with main.cf as it sends it as the user I am logged in with i.e. root@myhostname.com

    I have edited the /etc/aliases file with root: myemail@gmail.com as well.

    I am out of ideas now and any help would be appreciated!!

    Can I set mdadm so it uses msmtp instead of postfix? I am not sure if I even udnerstand all this correctly, so if I am talking trash, please correct me

  2. #12
    Join Date
    Jul 2010
    Location
    Poland
    Beans
    42
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Instead of install msmtp package, please all of you install msmtp-mta package.
    Better do this with sudo aptitude, because you have to remove broken dependency between postfix.
    If you do this correct aptitude will install msmtp package and automatically will link sendmail to msmtp.

    jk@ubuntu1:/usr/sbin$ ll sendmail
    lrwxrwxrwx 1 root root 12 2011-09-15 23:06 sendmail -> ../bin/msmtp*
    Last edited by jacekk015; September 15th, 2011 at 10:16 PM.

  3. #13
    Join Date
    Sep 2006
    Location
    UK
    Beans
    878
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Quote Originally Posted by jacekk015 View Post
    Instead of install msmtp package, please all of you install msmtp-mta package.
    Better do this with sudo aptitude, because you have to remove broken dependency between postfix.
    If you do this correct aptitude will install msmtp package and automatically will link sendmail to msmtp.

    jk@ubuntu1:/usr/sbin$ ll sendmail
    lrwxrwxrwx 1 root root 12 2011-09-15 23:06 sendmail -> ../bin/msmtp*
    I set up my first mdadm array yesterday so would like to set up monitoring and email notifications this evening. Can anyone verify that the last bit of advice above works (so that I can ignore the symbolic link bit in the original post)? Thanks

  4. #14
    Join Date
    Feb 2009
    Beans
    4

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Quote Originally Posted by njparton View Post
    Can anyone verify that the last bit of advice above works (so that I can ignore the symbolic link bit in the original post)? Thanks
    ...I know this is an old post, but yes, I can verify it works as described on 11.10.

  5. #15
    Join Date
    Sep 2006
    Location
    UK
    Beans
    878
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Great, I have it working in Debian Squeeze too.

  6. #16
    Join Date
    Feb 2012
    Beans
    1

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Thanks for your great guide. I made this journey on Ubuntu 12.04 LTS, here is my shortened version;

    Ubuntu 12.04 does autostart "mdadm" daemon, so i just added a service restart command at the end. I also excluded the "configure a Mail Transfer Agent (MTA)" part.


    instructions:

    Code:
    sudo nano /etc/mdadm/mdadm.conf
    edit “MAILADDR”, be sure to have a sendmail MTA configured (i use ssmtp, orginal poster suggested msmtp. both is used for relaying the mail to a external SMTP server, like gmail)

    verify config is working, by running and then check your inbox:

    Code:
    sudo mdadm --monitor --scan --test --oneshot
    by default, Ubuntu will auto-start mdadm in daemon mode, see /etc/default/mdadm

    To make the changes to /etc/mdadm/mdadm.conf take place, restart the deamon:

    Code:
    sudo service mdadm restart

  7. #17
    Join Date
    Nov 2008
    Beans
    33

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Hello,

    Thanks for writing this guide, I found it quite detailed and easy to follow, and it works (Using Ubuntu 12.04.1 64b) except for one thing.

    I installed everything as described, performed the mdadm notification tests (which worked), and then proceded to perform a test. I turned the computer off, then I unplugged one of the hard drives and booted up.

    I can confirm (using Webmin) that mdadm has detected the degraded array, but I received no notification.

    If I restart the service (sudo service mdadm restart), then I get a notification on the degraded array. Or if I stop the service, I will get the notification upon service start.

    So, if the notifications are being sent on mdadm start, why are they NOT being sent on system boot, when mdadm starts?

    Thanks

  8. #18
    Join Date
    Mar 2013
    Location
    Lebanon New Hampshire
    Beans
    115
    Distro
    Ubuntu

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    I know this post is old and probably no one really monitors it however I keep getting this error when trying to test my email as described in the first post. msmtp: /etc/msmtprc: line 49: account Gmail not (yet) defined

    I did change my password to the app specific password as described earlier as well. When I go into the mail logs, I see this
    Mar 24 02:53:38 server-box postfix/sendmail[4354]: fatal: open /etc/postfix/main.cf: No such file or directory
    Mar 24 08:25:57 server-box postfix/sendmail[1132]: fatal: open /etc/postfix/main.cf: No such file or directory

    Could this be because I have postfix installed? I could remove it as I haven't yet gotten it set up for anything.
    Any ideas?

  9. #19
    Join Date
    Jan 2006
    Location
    Waterloo, ON, Canada
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Thanks everyone for the feedback!

    Since I originally wrote this how-to on Ubuntu 8.04, I have since built a new server, and reconfiguring my RAID monitoring has been long over-due. I finally got around to it, and edited this how-to accordingly to be updated for Ubuntu 10.04 LTS. In addition, I have noted the feedback regarding the proper way to have msmtp be sendmail (msmtp-mta).

    Further feedback on the edited instructions is appreciated.
    Last edited by fermulator; May 19th, 2013 at 02:54 AM.
    ~Fermmy

  10. #20
    Join Date
    Sep 2006
    Beans
    4

    Re: How To Configure mdadm RAID e-mail Notifications via ISP SMTP Using msmtp

    Thanks for this write-up! Worked great, sendmail worked without having to make the links manually.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •