bmalik wrote:
But I 'll do that for only some email addresses.
I assume that by "email addresses" you mean "user names".
How can i do that ?
The $SECURED variable contains "secured" if a user tries to log in via SSL/TLS, so if an insecure connection is found, the script should check whether the user is in the list if users which are forced to use encryption:
############################################################################## if [ "$SECURED" == "secure" ] then :# handle secure connections here else :# handle insecure connections here if grep -q "$USER" in /etc/users-with-forced-encryption then printf "* NO [ALERT] You are not allowed to connect without encryption\r\n" exit 0 fi fi ##############################################################################