~dricottone/mail-filters

ref: b1a1f1c45b92fbfdba87ad9babc58a9caa2b177b mail-filters/src/mailman.sh -rwxr-xr-x 421 bytes
b1a1f1c4Dominic Ricottone Significant updates 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# mailman.sh
# ==========
# A filter (as for mutt or aerc) which runs digestion and an awk filter.

DIGESTION_INSTALL_DIR=/usr/local/bin
MAILFILTERS_INSTALL_DIR=/usr/local/share/mail-filters

if command -v $DIGESTION_INSTALL_DIR/digestion 2>&1 >/dev/null; then
  $DIGESTION_INSTALL_DIR/digestion -length $(tput cols) \
    | $MAILFILTERS_INSTALL_DIR/mailman.awk
else
  $MAILFILTERS_INSTALL_DIR/mailman.awk
fi