yunohost/hooks/backup/23-system_mail

6 lines
92 B
Bash

#!/bin/bash
backup_dir="$1/mail"
mkdir -p $backup_dir
sudo cp -a /var/mail/* $backup_dir/