diff --git a/mutt.spec b/mutt.spec new file mode 100644 index 0000000..612e1af --- /dev/null +++ b/mutt.spec @@ -0,0 +1,32 @@ +Name: 3isec-qubes-mutt +Version: 1.0 +Release: 1%{?dist} +Summary: Salt template for using mutt in Qubes + +License: GPLv3+ +SOURCE0: mutt + +%description +Salt state to create template for using mutt in Qubes + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/srv/salt +cp -rv %{SOURCE0}/ %{buildroot}/srv/salt + +%files +%defattr(-,root,root,-) +/srv/salt/mutt/* + +%post +if [ $1 -eq 1 ]; then + qubesctl state.apply mutt.clone + qubesctl --skip-dom0 --targets=template-mutt state.apply mutt.install +fi + +%preun + + +%changelog +* Wed Jul 15 2021 unman +- First Build diff --git a/mutt/install.sls b/mutt/install.sls index 02994cf..b9411ce 100644 --- a/mutt/install.sls +++ b/mutt/install.sls @@ -33,4 +33,19 @@ installed: - w3m - skip_suggestions: True +change_timeout: + file.replace: + - name: /usr/lib/python3/dist-packages/qubesidle/idleness_monitor.py + - pattern: '15 * 60' + - repl: '3 * 60' + - flags: [ 'IGNORECASE', 'MULTILINE' ] + +default_muttrc: + file.managed: + - name: /etc/skel/.muttrc + - source: salt://mutt/muttrc + - user: user + - group: user + + {% endif %} diff --git a/mutt/muttrc b/mutt/muttrc new file mode 100644 index 0000000..30e0a67 --- /dev/null +++ b/mutt/muttrc @@ -0,0 +1,36 @@ +set pgp_use_gpg_agent = no +set crypt_use_gpgme=no +# Specify what key to use for signing here: +set pgp_sign_as=0x + +# decode application/pgp +set pgp_decode_command="qubes-gpg-client-wrapper -d --status-fd=2 --batch %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="$pgp_decode_command" + +# verify a pgp/mime signature +#set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +set mbox_type=Maildir +set record=+mail + +set header_cache = "/home/user/.cache/Mail/headers" +set editor="vi -c ':set tw=72' " +set pager_index_lines=10 +color index green black ~N +color index yellow black ~O + +macro index \ +"set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key\ +notmuch-mutt -r --prompt search\ +`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`\ +set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key" \ + "notmuch: search mail" + +macro index \ +"set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key\ +/usr/bin/notmuch-mutt -r thread \ +/home/user/.cache/notmuch/mutt/results \ +set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key" \ + "notmuch: reconstruct thread"