[Dovecot] about postlogin in dovecot2

Daniel Parthey daniel.parthey at informatik.tu-chemnitz.de
Wed Aug 15 02:04:03 EEST 2012


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
##############################################################################

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820



More information about the dovecot mailing list