/[imapfilter]/imapfilter/imapfilter.c
ViewVC logotype

Diff of /imapfilter/imapfilter.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.47 by lefcha, Tue May 20 12:17:52 2003 UTC revision 1.48 by lefcha, Sat Jul 26 19:41:30 2003 UTC
# Line 23  extern namesp_t nsppri; Line 23  extern namesp_t nsppri;
23    
24  unsigned int options;           /* Program options. */  unsigned int options;           /* Program options. */
25  unsigned int flags = 0;         /* Program flags. */  unsigned int flags = 0;         /* Program flags. */
 unsigned int capabilities;      /* Capabilities of mail server. */  
26  unsigned int interval = 0;      /* Poll at the specified interval. */  unsigned int interval = 0;      /* Poll at the specified interval. */
27    unsigned int capspri, capsaux;  /* Capabilities of primary and auxiliary mail
28                                     * server. */
29    
 char authmech[AUTH_MECH_LEN];   /* Authentication mechanisms. */  
30  char logfile[PATH_MAX];         /* Log file. */  char logfile[PATH_MAX];         /* Log file. */
31  char *home = NULL;              /* User's home directory. */  char *home = NULL;              /* User's home directory. */
32  char charset[CHARSET_LEN];      /* Charset for IMAP SEARCH requests. */  char charset[CHARSET_LEN];      /* Charset for IMAP SEARCH requests. */
# Line 134  main(int argc, char *argv[]) Line 134  main(int argc, char *argv[])
134    
135          open_logfile();          open_logfile();
136    
137          init_vbuf();          init_ibuf();
138    
139          if (options & OPTION_DAEMON_MODE) {          if (options & OPTION_DAEMON_MODE) {
140                  f = 1;                  f = 1;
# Line 169  main(int argc, char *argv[]) Line 169  main(int argc, char *argv[])
169                                          get_password(ca->password, PASSWORD_LEN);                                          get_password(ca->password, PASSWORD_LEN);
170                                          ca->passwdattr = PASSWORD_PLAIN;                                          ca->passwdattr = PASSWORD_PLAIN;
171                                  }                                  }
172                                  if (login(&sockpri, ca->username,  #ifdef CRAM_MD5
173                                          ca->password) == RESPONSE_NO) {                                  if (capspri & CAPABILITY_AUTH_CRAM_MD5)
174                                            r = imf_cram_md5(&sockpri,
175                                                ca->username, ca->password);
176                                    else
177    #endif
178                                            r = login(&sockpri, ca->username,
179                                                ca->password);
180    
181                                    if (r == RESPONSE_NO) {
182                                          error("username %s or password rejected "                                          error("username %s or password rejected "
183                                              "at %s\n", ca->username, ca->server);                                              "at %s\n", ca->username, ca->server);
184                                          continue;                                          continue;
# Line 227  main(int argc, char *argv[]) Line 235  main(int argc, char *argv[])
235    
236          lockfile_remove();          lockfile_remove();
237    
238          exit(0);          return 0;
239  }  }
240    
241    

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26