diff -ruN mailsync-5.2.1.orig/src/configuration.cc mailsync-5.2.1/src/configuration.cc
--- mailsync-5.2.1.orig/src/configuration.cc	2004-06-14 13:34:04.000000000 +0200
+++ mailsync-5.2.1/src/configuration.cc	2004-11-22 20:05:59.633723080 +0200
@@ -182,7 +182,7 @@
         }
         else if (t->buf == "pat") {
           get_token(f, t);
-          store->pat = t->buf;
+          store->pats.push_back(t->buf);
         }
         else if (t->buf == "passwd") {
           get_token(f, t);
diff -ruN mailsync-5.2.1.orig/src/store.cc mailsync-5.2.1/src/store.cc
--- mailsync-5.2.1.orig/src/store.cc	2004-06-14 09:30:39.000000000 +0200
+++ mailsync-5.2.1/src/store.cc	2004-11-22 20:05:01.020633624 +0200
@@ -21,7 +21,7 @@
   server   = "";
   prefix   = "";
   ref      = "";
-  pat      = "";
+  pats.clear();
   isremote = 0;
   delim    = '!';
   stream   = NIL;
@@ -42,9 +42,9 @@
     fprintf( f, "\n\tref ");
     print_with_escapes( f, ref);
   }
-  if (pat != "") {
+  for (vector<string>::const_iterator i = pats.begin(); i != pats.end(); i++) {
     fprintf( f, "\n\tpat ");
-    print_with_escapes( f, pat);
+    print_with_escapes( f, *i);
   }
   if (! passwd.nopasswd) {
     fprintf( f, "\n\tpasswd ");
@@ -69,7 +69,9 @@
 //////////////////////////////////////////////////////////////////////////
 {
   match_pattern_store = this;
-  mail_list( this->stream, nccs(ref), nccs(pat));
+  for (vector<string>::const_iterator i = pats.begin(); i != pats.end(); i++) {
+    mail_list( this->stream, nccs(ref), nccs(*i));
+  }
   match_pattern_store = NULL;
  
   return boxes.size();
@@ -89,7 +91,7 @@
   store_tmp.ref    = this->ref;
   store_tmp.passwd = this->passwd;
   store_tmp.prefix = "";
-  store_tmp.pat = "INBOX";
+  store_tmp.pats.push_back("INBOX");
   store_tmp.acquire_mail_list();
   this->delim = store_tmp.delim;
 }
diff -ruN mailsync-5.2.1.orig/src/store.h mailsync-5.2.1/src/store.h
--- mailsync-5.2.1.orig/src/store.h	2004-06-14 13:35:52.000000000 +0200
+++ mailsync-5.2.1/src/store.h	2004-11-22 20:02:29.569657672 +0200
@@ -4,6 +4,7 @@
 #include <string>
 #include <map>
 #include <set>
+#include <vector>
 #include "c-client-header.h"
 #include "types.h"
 #include "msgid.h"
@@ -18,7 +19,8 @@
 {
   public:
     string name, server, prefix;
-    string ref, pat;
+    string ref;
+    vector<string> pats;
     Passwd passwd;
     int isremote;                  // I.e. allows OP_HALFOPEN
     int delim;
@@ -29,7 +31,7 @@
     void clear();
 
     Store():
-      boxes(), name(), server(), prefix(), ref(), pat(), passwd() { clear(); }
+      boxes(), name(), server(), prefix(), ref(), pats(), passwd() { clear(); }
 
     void print(FILE* f);
     void set_passwd(string password) { passwd.set_passwd(password);}
