Tag Info

New answers tagged

1

Here is your script modified slightly: #!/bin/bash if files=$(find . -name "*.gz" -size -10k -mtime -1 -print) ; then echo "The backup test has failed!\n$files" | mail -s "BACKUP FAILURE" myemail@gmail.com fi You don't need to put this in a for loop; there is an implicit loop in the find comand. One debugging technique you can use if you haven't ...


0

I assume you want to check for small gz files in this folder /usr/test, the follwoing should help you. it will send you a log file of all the gz files under this path and email you the list. You can use this list for later use. My script would be: #!/bin/bash size_checker () { cd /usr/test ls *.gz > gzfiles for FILE in `cat gzfiles` do SIZE=`ls -la ...


0

For me i needed to specify a variable such as SMTP server, so the mail command worked in the below fashion. I searched across many posts, and i found below property to convert the body into text/html. Now the email i receive is in the HTML format. Content-Disposition: inline Unix version: Red Hat Enterprise Linux Server release 6.6 (Santiago) First. ...


2

I use mutt to do that, like this. Be aware of argument order, do not place recipient after -a mutt joe@example.com -s "Mail subject" -a /file/to/attach < /file/with/mail/body


1

Postfix is delivering to a mailbox file rather than a Maildir. Try something like this in Dovecot: mail_location = mbox:~/mail:INBOX=/var/mail/%u Alternatively, configure postfix to deliver to a Maildir with a command like: sudo postconf -e "home_mailbox = Maildir/" And configure Dovecot to use a Maildir by specifying: mail_location = ...


0

You should add the following to your gnu tar command: --warning=no-file-changed That will suppress all the "%s: file changed as we read it" messages. And by using this solution (and not redirecting everything to /dev/null), you will still be able to get error messages when stuff really goes wrong.. With the --warning flag you can enable and disable a lot ...


0

I found a solution that works for me even though it is not pretty. set record = "+INBOX" I just set record to my inbox, in that way the messages get threaded. It might not be ideal when I am the first sending an e-mail, but normally I will get an answer, so no issue.


0

Which version of mailx are you using? heirloom-mailx 12.5 on Ubuntu 14.04 prompts me for the password every time if there's no smtp-auth-password setting in ~/.mailrc. This feature was added in 12.0 in March 2006 according to ChangeLog.


0

mbbb's answer lets you pull down a bunch of mailboxes and just strip the INBOX/ leader. This is nice, but something else you might want to do is download a single mailbox and totally rename it. This is how you can rename your sent mail to something more UNIX-friendly: Channel fmails Master :fmimap:INBOX/"Sent Items" Slave ...



Top 50 recent answers are included