From: zacheiss Date: Fri, 29 Aug 2008 16:54:04 +0000 (+0000) Subject: If someone has an exchange pobox, check if their imap filesystem exists X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/5ed44d5d2616c186ce12193eaa49f61ebf0f323f If someone has an exchange pobox, check if their imap filesystem exists and put that server in hesiod. --- diff --git a/gen/hesiod.pc b/gen/hesiod.pc index 3b995581..317b0a26 100644 --- a/gen/hesiod.pc +++ b/gen/hesiod.pc @@ -270,7 +270,15 @@ int do_passwd(void) } if (eid != 0) - pid = eid; + { + /* Check for IMAP. Can't use iid because it should be zero. */ + EXEC SQL SELECT mach_id INTO :mid FROM filesys + WHERE label = :login || '.po' AND type = 'IMAP'; + if (sqlca.sqlcode == 0) + pid = mid; + else + pid = eid; + } if (iid != 0) {