Mail avec quoted-printable
This commit is contained in:
parent
3b20742a57
commit
774b65510c
|
@ -1,11 +1,8 @@
|
|||
#!/bin/sh
|
||||
users_num_robot=13
|
||||
|
||||
echo -n "Pre-processing..."
|
||||
|
||||
users_num_all=$( ls /home/ | wc -w )
|
||||
users_num_human=$(( $users_num_all-$users_num_robot ))
|
||||
|
||||
users_num_all=$( wc -l /etc/postfix/virtual_members | awk '{print $1 - 1}')
|
||||
size_home=$( du -sh /home | awk '{print $1}' )
|
||||
size_per_user=$( du -h --max-depth=1 /home | sort -rh )
|
||||
|
||||
|
@ -15,5 +12,5 @@ echo "[done]"
|
|||
echo "Total number of mailboxes: " $users_num_all
|
||||
echo "Number of real human mail users: " $users_num_human
|
||||
echo "Home storage: " $size_home
|
||||
echo "Users: "
|
||||
echo $size_per_user | xargs -n 2 echo
|
||||
#echo "Users: "
|
||||
#echo $size_per_user | xargs -n 2 echo
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -ne 3 ] ; then
|
||||
echo -e "Params:\t<username> <contact@email> <password>" >&2
|
||||
|
@ -11,13 +11,19 @@ password=$3
|
|||
|
||||
echo -n "Sending mail to \"$email\" for account creation \"$user\"..."
|
||||
date=$( date -R )
|
||||
sendmail $email <<EOF
|
||||
|
||||
headers=$(cat<< EOF
|
||||
From: Commission Infrastructure <cominfra@a-lec.org>
|
||||
To: <$email>
|
||||
Date: $date
|
||||
Subject: Mise en place de vos services
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
EOF
|
||||
)
|
||||
|
||||
message=$(cat <<EOF
|
||||
Bonjour,
|
||||
|
||||
Suite à votre adhésion à l'association Libre en Communs,
|
||||
|
@ -64,7 +70,9 @@ Commission Infrastructure,
|
|||
Libre en Communs
|
||||
.
|
||||
EOF
|
||||
)
|
||||
|
||||
echo -e "$headers\n\n$( echo "$message" | recode ...UTF-8/QP )" | sendmail -t
|
||||
|
||||
echo "[OK]"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -ne 2 ] ; then
|
||||
echo -e "Params:\t<username> <contact@email>" >&2
|
||||
|
@ -12,13 +12,18 @@ date=$( date -R )
|
|||
|
||||
echo -n "Sending mail to \"$email\": account redirection from \"$user\"..."
|
||||
|
||||
sendmail $email <<EOF
|
||||
headers=$(cat<<EOF
|
||||
From: Commission Infrastructure <cominfra@a-lec.org>
|
||||
To: <$email>
|
||||
Date: $date
|
||||
Subject: Mise en place de vos services
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
EOF
|
||||
)
|
||||
|
||||
message=$(cat <<EOF
|
||||
Bonjour,
|
||||
|
||||
Suite à votre adhésion à l'association Libre en Communs,
|
||||
|
@ -57,5 +62,8 @@ Commission Infrastructure,
|
|||
Libre en Communs
|
||||
.
|
||||
EOF
|
||||
)
|
||||
|
||||
echo -e "$headers\n\n$( echo "$message" | recode ...UTF-8/QP )" | sendmail -it
|
||||
|
||||
echo "[OK]"
|
||||
|
|
Loading…
Reference in New Issue