|
@@ -2179,7 +2179,7 @@ function encrypt_all_email {
|
2179
|
2179
|
echo ' unlink "/tmp/msg_$USERNAME"' >> /usr/bin/encmaildir
|
2180
|
2180
|
echo 'done' >> /usr/bin/encmaildir
|
2181
|
2181
|
echo '' >> /usr/bin/encmaildir
|
2182
|
|
- echo '#Remove Dovecot index and uids for regeneration.' >> /usr/bin/encmaildir
|
|
2182
|
+ echo '# Remove Dovecot index and uids for regeneration.' >> /usr/bin/encmaildir
|
2183
|
2183
|
echo 'if [ -f "/tmp/rebuild_index_$USERNAME" ]; then' >> /usr/bin/encmaildir
|
2184
|
2184
|
echo ' echo "Removing Dovecot indexes and uids"' >> /usr/bin/encmaildir
|
2185
|
2185
|
echo -n ' find "$MAIL_DIR" -type f -regex ' >> /usr/bin/encmaildir
|
|
@@ -2193,6 +2193,25 @@ function encrypt_all_email {
|
2193
|
2193
|
echo 'fi' >> /usr/bin/encmaildir
|
2194
|
2194
|
echo 'exit 0' >> /usr/bin/encmaildir
|
2195
|
2195
|
chmod +x /usr/bin/encmaildir
|
|
2196
|
+
|
|
2197
|
+ if [ ! /home/$MY_USERNAME/README ]; then
|
|
2198
|
+ touch /home/$MY_USERNAME/README
|
|
2199
|
+ fi
|
|
2200
|
+ if ! grep -q "If you have imported legacy email" /home/$MY_USERNAME/README; then
|
|
2201
|
+ echo '' >> /home/$MY_USERNAME/README
|
|
2202
|
+ echo '' >> /home/$MY_USERNAME/README
|
|
2203
|
+ echo 'Encrypting legacy email' >> /home/$MY_USERNAME/README
|
|
2204
|
+ echo '=======================' >> /home/$MY_USERNAME/README
|
|
2205
|
+ echo 'If you have imported legacy email which is not encrypted' >> /home/$MY_USERNAME/README
|
|
2206
|
+ echo 'then it can be encrypted with the command:' >> /home/$MY_USERNAME/README
|
|
2207
|
+ echo '' >> /home/$MY_USERNAME/README
|
|
2208
|
+ echo ' encmaildir' >> /home/$MY_USERNAME/README
|
|
2209
|
+ echo '' >> /home/$MY_USERNAME/README
|
|
2210
|
+ echo 'But be warned that depending upon how much email you have' >> /home/$MY_USERNAME/README
|
|
2211
|
+ echo 'this could take a seriously LONG time on the Beaglebone' >> /home/$MY_USERNAME/README
|
|
2212
|
+ echo 'and may be better done on a faster machine.' >> /home/$MY_USERNAME/README
|
|
2213
|
+ fi
|
|
2214
|
+
|
2196
|
2215
|
echo 'encrypt_all_email' >> $COMPLETION_FILE
|
2197
|
2216
|
}
|
2198
|
2217
|
|