Handle Bcc being a fully qualified address in rotate script
GLPI #30996
This commit is contained in:
parent
19722f2507
commit
4d00447448
|
@ -11,8 +11,16 @@ if [ "$BCC" != "enabled" -o "$ARCHIVE" != "enabled" ]; then
|
|||
fi
|
||||
|
||||
USER=$(db configuration getprop qpsmtpd BccUser || echo 'maillog')
|
||||
# Truncate if it's a mail address
|
||||
USER=${USER%@*}
|
||||
HOME="/home/e-smith/files/users/$USER"
|
||||
|
||||
# Stop here if the home dir doesn't exist
|
||||
if [ \! -d $HOME ]; then
|
||||
echo "$HOME doesn't exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MONTH=$(date +%m)
|
||||
YEAR=$(date +%Y)
|
||||
|
||||
|
|
Loading…
Reference in New Issue