mutt problem on ubuntu

2010-07-12
2013-05-29
  • Magyar Balázs
    Magyar Balázs
    2010-07-12

    Hi all!

    I had some trouble with mailing files after backup. When i ran the script, i  got errors like:

    Can't stat myaddress@mail.com: No such file or directory
    myaddress@mail.com: unable to attach file.

    Since i already had mutt installed, googled for the problem, but didnt find any like this. Then i looked through the script and changed this:

    from:

    mutt -s "${ERRORNOTE} MySQL Backup Log and SQL Files for ${HOST} - ${DATE}" ${BACKUPFILES} ${MAILADDR} < ${LOGFILE} #send via mutt

    to:

    mutt -s "${ERRORNOTE} MySQL Backup Log and SQL Files for ${HOST} - ${DATE}" ${MAILADDR} ${BACKUPFILES} < ${LOGFILE} #send via mutt

    so all i did was switched  ${BACKUPFILES}  with ${MAILADDR} .

    It is working all right now.

    I was on Ubuntu server 9.10.

    I hope it may help somebody! ;)

    Nice script, thanks for your time, have a nice day!

    bulazs

     
  • Tom
    Tom
    2010-07-12

    bulazs,

    Seems strange that your problem was fixed by switching BACKUPFILES with MAILADDR.
    The original order of those is correct!
    The only problem, that I see, is that the option "-a" is missing before ${BACKUPFILES}.

    If I'm wrong, then someone please correct me.

     
  • Hi,

    @bulazs: Thanks for reporting!

    @basicprogrammer:
    Just take a look one line above:
       BACKUPFILES=`${ECHO} "${BACKUPFILES}" | ${SED} -e "s# # -a #g"` #enable multiple attachments

    This variable begins with a space in front of the first filename. Filename are separated by space. The sed command above substitutes every space with " -a ".

    I've made backups of sizes over 10G. Thus I've never tried to send them to a mailbox.

    Okay, since there are problems with this part of the script I'll have designs on it for future versions.

    Eric Litak ( elitak ) also filed bug #2919794 on this on 2009-12-23. He had his own suggestion for a workaround that worked for him.

     
  • xboxphanatic
    xboxphanatic
    2010-07-30

    Thanks a lot for posting this! I made the switch to Ubuntu 10.04 from 8.04 on two servers and they would not email me the backups anymore. I came today and saw that version 2.5.1 had been released, tried it, and got the same error you mentioned at the top of your post. I just made the change in the script and now it works! Really appreciate it. 

     
  • Magyar Balázs
    Magyar Balázs
    2010-07-30

    I am glad i could help!

     
  • mlanner
    mlanner
    2011-12-30

    Sorry if I'm dense here … I'm having the same problem, not getting emails. I looked around for the statement above, but can't find it in my automysqlbackup file. I installed automysqlbackup directly from the Ubuntu 10.04 repos. Any hints appreciated.

    Thx in advance.

     
  • PittaGurneyi
    PittaGurneyi
    2011-12-31

    First of all, the 2.x versions have many flaws. Out of the need for a well-working version, I reprogrammed most of the script in a much safer way, so that it is no longer vulnerable to all kinds of possible parsing errors. Aside from that I fixed many bugs and ended up with a new version, which we chose to call 3.0. Although it is not yet called final, it works very well. My suggestion would be to use the new version. I won't help to solve issues  with 2.x unless they are still in the new version.

    I hope you can understand my point of view.

     
  • mlanner
    mlanner
    2012-01-09

    pittagurneyi,

    Fair enough. I actually originally installed the 3.0 beta, but removed it and downgraded to 2.5 in the Ubuntu repositories because I wanted it to be as "streamlined" as possible to install updates. As a first time user of AutoMySQLBackup, the many more settings and the documentation of the 3.0 package seemed not as straight-forward. I'll put 3.0 on a test server and when I've got it running OK, I'll install it on the production server.

    When do you think we can expect to see 3.0 in the Debian/Ubuntu repos?

    Thanks for a great product.