aboutsummaryrefslogtreecommitdiff
path: root/mail
blob: 610365abf542473c421445c0d2cec5853d47db18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# Wrapper for mail application.
#

# Parameters
BASENAME="`basename $0`"

# Check for mutt
if ! which mutt > /dev/null; then
  if [ -x "/usr/bin/mail" ]; then
    /usr/bin/mail
    exit $?
  else
    exit 1
  fi
fi

# Check configuration
if [ ! -e "$HOME/.custom/muttrc" ]; then
  mkdir -p $HOME/.custom/mutt
  touch    $HOME/.custom/muttrc
  touch    $HOME/.custom/mutt/aliases
fi

# Check INBOX
if [ ! -e "$HOME/mail/INBOX" ]; then
  mkdir -p $HOME/mail/INBOX/{cur,new,tmp}
fi

# Check temporary folder
if [ ! -e "$HOME/temp/mutt/misc" ]; then
  mkdir -p $HOME/temp/mutt/misc
fi

# Dispatch using firejail
#firejail --quiet mutt

# Dipatching using mutt
# Should call firejail anyway if properly configured at ~/apps/firejail
mutt