Tag Info

New answers tagged

1

It is not possible without patching mutt, however you could limit to: ~d <1d ~h '^Date:.*(1[3-9]|2.):..:' To list the emails that have been sent today after 13:00 (in their own timezone). To check the date in your timezone, you may be able to rely on the fact that there should be a Received header added by a MTA in your timezone (especially if it goes ...


0

Consider looking at RFC1521 "MIME Part One", Appendix C "A Complex Multipart Example". It seems that you need to put a blank line after headers.


1

You should install an IMAP server on your machine. Then both MUA's can have access to your mail via IMAP.


1

Just search for the next flagged message: / followed by ~F. Well, the only drawback is that this doesn't work from the pager menu (but this would be a valid RFE). And you can write a macro with the value: <search>~F\r Note: similarly, I suppose that <next-new> is almost the same as <search>~N\r in the index menu (the only difference I can ...


1

Seem to have figured out a working method. Avoiding $IFS and not trying to handle the entire directory list as a string or array - working on each entry as it is found. Replaced last loop with the following: find "$DIR" -type f -mtime -2 -name '*.xls*' -exec sh -c ' for file do # Check to see if we found any files or not if [ -z "$file" ]; then ...


1

The problem is $FILE is not an array but you're accessing it like it is for datafile in ${FILES[*]} It's just returning a giant string, hence all the files at once. To work around this, append a newline to each file in $FILE then in the loop use echo -e to return each line indivivually # Get the list of files to send FILES=$(find "$DIR" -type f -mtime ...


2

set "/home/user/path to files/"*.xls for f do [ "$f" -nt "$two_day_old_file" ] && set "$@" "$f" ; shift ; done touch "$two_day_old_file" echo $MBODY | mutt -s "Data files for $TODAY" -a "$@" -- $EMAILS To mail them one at a time change the echo line to: for mailf do echo "$MBODY" | mutt -s "Data files for $TODAY" -a "$mailf" -- $EMAILS ...


3

With zsh: mutt -s "Log" -a /path/to/*.log(.om[1]) example@example.com That uses zsh glob qualifiers. While other shell globs can only generate filenames based on their name, in zsh, you can use those qualifiers ((.om[1]) above), to select based on file attributes (type, size, times, permissions...) or other criteria of your own, affect the order, apply ...


1

Get_Attachment_Name () { file_attachment_dir="Whatever you want your directory to be" file_attachment=`ls -lrt -- "$file_attachment_dir" | grep -v "^[bcdl]"| tail -n 1 | awk '{print $9}'` } Grepping out any output lines starting with b, c, d, or l will eliminate trying to send block special files, character special files, directories or symbolic ...



Top 50 recent answers are included