admin scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
374 B

  1. #! /bin/bash
  2. # Input : a file with a list of email addresses (one address per line)
  3. # Check if the email is in our ldap, if not return the email address.
  4. echo "Enter path to list of emails"
  5. read -r FILE
  6. while read -r line
  7. do
  8. if [ -z "$(ldapsearch -D cn=root,ou=ldap,o=redbrick -xLLL -y /etc/ldap.secret "altmail=$line" uid)" ]
  9. then
  10. echo "$line"
  11. fi
  12. done <"$FILE"