Send to both uwdir email and csclub email

* We were getting lots of bounces from uwdir emails (perhaps grads?)
* In the worse case, someone will get the email twice
This commit is contained in:
David Bartley 2008-01-23 16:39:40 -05:00
parent 6027249715
commit 1cb28e9cc8
1 changed files with 8 additions and 7 deletions

View File

@ -83,14 +83,15 @@ def expiredaccounts(args):
for member in mlist.values():
uid = member['uid'][0]
name = member['cn'][0]
email = uid
user = uwl.search_s(uwldap.base(), ldap.SCOPE_SUBTREE,
'(uid=%s)' % ldapi.escape(uid))
if len(user) > 0 and 'mailLocalAddress' in user[0][1]:
email = user[0][1]['mailLocalAddress'][0]
email = None
if send_email:
members.send_account_expired_email(name, email)
print '%s %s %s' % (uid.ljust(12), name.ljust(30), email)
members.send_account_expired_email(name, uid)
user = uwl.search_s(uwldap.base(), ldap.SCOPE_SUBTREE,
'(uid=%s)' % ldapi.escape(uid))
if len(user) > 0 and 'mailLocalAddress' in user[0][1]:
email = user[0][1]['mailLocalAddress'][0]
members.send_account_expired_email(name, email)
print '%s %s' % (uid.ljust(12), name.ljust(30))
# list of commands
commands = {