Re: [BackupPC-users] "mutt" and "/etc/aliases"

2021-09-29 Thread orsomann...@gmail.com

It seems to me that this is a mail client question, not a BackupPC
question.


I know and ... honestly: I posted here in the hope that someone could 
suggest an alternative way to send notifications from BackupPC, because 
I went insane trying to send attachments with sendamil provided by 
Postfix ...




Perhaps you will need to create a script which takes your /etc/aliases
and outputs text suitable for mutt


Thank you so much for your answer!



___
BackupPC-users mailing list
[email protected]
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] "mutt" and "/etc/aliases"

2021-10-01 Thread orsomann...@gmail.com
This part, at least, I can explain:  mutt (and mail) knows nothing about 
the aliases in /etc/aliases.  It only knows its own aliases (defined in 
.muttrc).


Thanks a lot!

To give something back to the ML, here's how to send an attachment with 
sendmail postfix (finally i got it): this is the script I use to have an 
external (sent via email) backup of BackupPC configuration (plus the 
BackupPC_report report that quoted by mike, if desired):




#!/bin/bash

EMAIL_BODY="${1}"  # es. "$(/usr/local/bin/BackupPC_report.pl)"
EMAIL_SUBJECT="BackupPC repot $(hostname -f)"

BACKUPPC_CONF_DIR="/etc/BackupPC/"
BACKUPPC_BACKUP_DIR="/tmp/"
BACKUPPC_BACKUP_FILE="backuppc_conf_backup.tgz"
BACKUPPC_BACKUP_FULLPATH="${BACKUPPC_BACKUP_DIR}${BACKUPPC_BACKUP_FILE}"

# backup
tar -czf "${BACKUPPC_BACKUP_FULLPATH}" -P "${BACKUPPC_CONF_DIR}"

# send mail
BOUNDARY=$(uuidgen -t)
(
echo "Subject: ${EMAIL_SUBJECT}"
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/mixed; boundary=\"${BOUNDARY}\""
echo ""
echo "--${BOUNDARY}"
echo "Content-Type: text/plain; charset=utf-8"
echo "Content-Transfer-Encoding: 7bit"
echo ""
echo "${EMAIL_BODY}"
echo ""
echo "--${BOUNDARY}"
echo "Content-Type: application/zip; name=\"${BACKUPPC_BACKUP_FILE}\""
echo "Content-Disposition: attachment; filename=\"${BACKUPPC_BACKUP_FILE}\""
echo "Content-Transfer-Encoding: base64"
echo ""
base64 "${BACKUPPC_BACKUP_FULLPATH}"
echo "--${BOUNDARY}--"
) | /usr/sbin/sendmail root  # or "your_email_address"

# remove backup
rm "${BACKUPPC_BACKUP_FULLPATH}"



___
BackupPC-users mailing list
[email protected]
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/