Index: ossp-pkg/petidomo/config.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/Attic/config.c,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/petidomo/Attic/config.c,v' 2>/dev/null --- config.c 2001/01/15 16:35:06 1.13 +++ config.c 2001/01/15 16:55:45 1.14 @@ -136,7 +136,7 @@ static char* reply_to; static char* postingfilter; static char* archivepath; -static bool allowpubsub; +static char* subtype; static bool allowmembers; static char* intro_file; static char* sig_file; @@ -161,7 +161,7 @@ struct ConfigFile ListCF[] = { { "ListType", CF_STRING, &listtype }, - { "AllowPublicSubscription", CF_YES_NO, &allowpubsub }, + { "SubscriptionType", CF_STRING, &subtype }, { "AllowMembersCommand", CF_YES_NO, &allowmembers }, { "ReplyTo", CF_STRING, &reply_to }, { "Hostname", CF_STRING, &list_fqdn }, @@ -188,7 +188,7 @@ reply_to = NULL; postingfilter = NULL; archivepath = NULL; - allowpubsub = TRUE; + subtype = NULL; allowmembers = FALSE; intro_file = "introduction"; sig_file = "signature"; @@ -252,12 +252,23 @@ ListConfig->listtype = LIST_CLOSED; else if (!strcasecmp(listtype, "moderated")) ListConfig->listtype = LIST_MODERATED; + else if (!strcasecmp(listtype, "acknowledged") || !strcasecmp(listtype, "acked")) + ListConfig->listtype = LIST_ACKED; + else if (!strcasecmp(listtype, "acknowledged-once") || !strcasecmp(listtype, "acked-once")) + ListConfig->listtype = LIST_ACKED_ONCE; else { syslog(LOG_ERR, "List \"%s\" doesn't have a valid type in config file.", listname); exit(1); } - ListConfig->allowpubsub = allowpubsub; + + if (!strcasecmp(subtype, "public")) + ListConfig->listtype = SUBSCRIPTION_PUBLIC; + else if (!strcasecmp(subtype, "admin")) + ListConfig->listtype = SUBSCRIPTION_ADMIN; + else if (!strcasecmp(subtype, "acknowledged") || !strcasecmp(subtype, "acked")) + ListConfig->listtype = SUBSCRIPTION_ACKED; + ListConfig->allowmembers = allowmembers; ListConfig->fqdn = (list_fqdn) ? list_fqdn : MasterConfig->fqdn; ListConfig->reply_to = reply_to; Index: ossp-pkg/petidomo/config/list-config RCS File: /v/ossp/cvs/ossp-pkg/petidomo/config/list-config,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/petidomo/config/list-config,v' 2>/dev/null --- list-config 2001/01/15 16:36:11 1.4 +++ list-config 2001/01/15 16:55:45 1.5 @@ -2,28 +2,36 @@ # $Header$ # -# TAG: ListType -# The following types of mailing lists exists and one of them -# should be specified here: +# TAG: ListType +# The following types of mailing lists exists: # # open -- The list is open for all postings which are not rejected # due to the access control mechanism. # closed -- Only subscribers are allowed to post. # moderated -- Only postings which contain the correct posting # password are allowed. +# acknowledged -- Every attempt to post will be answered with +# a request for acknowledgment, asking the poster to +# confirm. This prevents abuse and forgery. +# acknowledged-once -- A fist-time poster will have to +# acknowledge his posting once, after that, he can post +# as he wishes. # # This option is REQUIRED. Petidomo will abort with an error, if it is # unset. ListType open -# TAG: AllowPublicSubscription -# yes -- Everybody can subscribe and unsubscribe. -# no -- Un-/subscription can only be done by the admin. +# TAG: SubscriptionType +# public -- Everybody can subscribe and unsubscribe. +# admin -- Un-/subscription can only be done by the admin. # Authenticiation is done via password mechanism. +# acknowledged -- Anybody can un-/subscribe, but he has to +# acknowledge the request sent to the address add to or +# deleted from the list. # # The default, if this option is unset, is to allow public # subscription and unsubscription. -AllowPublicSubscription yes +SubscriptionType public # TAG: AllowMembersCommand # Does the 'members' or 'who' command work for this mailing list, or Index: ossp-pkg/petidomo/petidomo.h RCS File: /v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v' 2>/dev/null --- petidomo.h 2001/01/15 16:35:06 1.9 +++ petidomo.h 2001/01/15 16:55:45 1.10 @@ -63,17 +63,26 @@ char * index_file; }; -enum +enum list_type_t { LIST_OPEN, LIST_CLOSED, - LIST_MODERATED + LIST_MODERATED, + LIST_ACKED, + LIST_ACKED_ONCE + }; + +enum subscription_type_t + { + SUBSCRIPTION_PUBLIC, + SUBSCRIPTION_ADMIN, + SUBSCRIPTION_ACKED }; struct List_Config { unsigned int listtype; - int allowpubsub; + unsigned int subtype; int allowmembers; char * fqdn; char * admin_password; Index: ossp-pkg/petidomo/subscribe.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v' 2>/dev/null --- subscribe.c 2001/01/15 16:35:06 1.9 +++ subscribe.c 2001/01/15 16:55:45 1.10 @@ -113,7 +113,7 @@ { /* No valid password, check further. */ - if (ListConfig->allowpubsub == FALSE) + if (ListConfig->subtype == SUBSCRIPTION_ADMIN) { /* Access was unauthorized, notify the originator. */ Index: ossp-pkg/petidomo/unsubscribe.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v' 2>/dev/null --- unsubscribe.c 2001/01/15 16:35:07 1.9 +++ unsubscribe.c 2001/01/15 16:55:45 1.10 @@ -114,7 +114,7 @@ { /* No valid password, check further. */ - if (ListConfig->allowpubsub == FALSE) + if (ListConfig->subtype == SUBSCRIPTION_ADMIN) { /* Access was unauthorized, notify the originator. */