Dan Johansson writes:
On Friday 24 July 2009, Sam Varshavchik wrote:Dan Johansson writes: > I have a setup with virtual E-Mail accounts with a MySQL backend. > Now I want to make one account unavailable to the world (not accept new > E-Mails, like the account never existed) but still be able to access the > mail that is allready there via IMAP (the guy has quit but we still wants > his mail available in his account). > What would be the best way to accomplish this.You will have to define a custom SELECT query in authmysqlrc. Instead of setting the individual fields, define MYSQL_SELECT_CLAUSE to the entire SEELCT statement. Use the $(service) variable to return the account only for the imap service, and not the courier service.Thanks for the info, one more question though: Is the $(service) evaluated in the MYSQL_WHERE_CLAUSE as well? I am thinking in the line of adding a field
No.
to the password table, lets say 'still_here', and the set MYSQL_WHERE_CLAUSE to something like "AND (still_here=1 OR $(service) IN ('imap', 'imaps'))"If not, could you plase tell my the default SELECT query?
The comments for the MYSQL_SELECT_CLAUSE setting explain what fields your custom query should return and in which order. I can't tell you what your query should be because everyone uses different schema, there is no standard schema. No matter what your table looks like, your SELECT query simply needs to return the list fields in the given order. The names of the fields don't matter, only their relative order. For example, the first field is the login id, the second field is the encrypted password, and so on. Fields which you do not have can simply be returned as empty strings. The only required fields are the login id, either an encrypted or the cleartext password, the user and the group ids, and the home directory.
pgpFKmf1cWQ30.pgp
Description: PGP signature
------------------------------------------------------------------------------
_______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
