aboutsummaryrefslogtreecommitdiffstats
path: root/mail/vpopmail/files/patch-vpalias.c
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2007-10-09 21:27:24 +0800
committerroam <roam@FreeBSD.org>2007-10-09 21:27:24 +0800
commit52fb778857b295733430a8fa11a82420649e7cb9 (patch)
tree45c3a473602ada857a4009e2f0ef7f5cf677475f /mail/vpopmail/files/patch-vpalias.c
parent2fb876869e27bf1f9c1aec839292f7fec5d0acec (diff)
downloadfreebsd-ports-gnome-52fb778857b295733430a8fa11a82420649e7cb9.tar.gz
freebsd-ports-gnome-52fb778857b295733430a8fa11a82420649e7cb9.tar.zst
freebsd-ports-gnome-52fb778857b295733430a8fa11a82420649e7cb9.zip
Update vpopmail to 5.4.20 after a long delay, mostly due to wondering
how to handle the database upgrade and the SpamAssassin patch partial integration. There are several important changes that may affect your vpopmail installation and may need you to handle manually: - THE MYSQL CONNECTION INFORMATION IS NO LONGER DEFINED AT COMPILE-TIME! The WITH_MYSQL_{USER,PASSWD,SERVER,DB} variables should NOT be defined when you build the port; place that information in the vpopmail.mysql file after vpopmail has been installed! - the default domain is also no longer defined at compile time - you need to place it in the defaultdomain file after the installation. - the defaultdomain and vpopmail.mysql files are no longer blindly removed on deinstallation, they are only removed if they have not been modified - in vpopmail 5.4.18, the database schema was changed - some fields were extended from 64 to 96 characters. If you do not apply those changes to your database, as explained in the vpopmail/doc/UPGRADE file, your vpopmail installation may silently fail or lose the trailing portions of domain names and usernames. - in vpopmail 5.4.19, the upstream authors integrated large parts of Alex Dupre's SpamAssassin support, without the SPAM_THRESHOLD part. If you use vpopmail along with the SpamAssassin FreeBSD port support, take extra care to ensure that your installation still processes e-mail messages in the same way. - vpopmail 5.4.19 added support for maildrop as a mail delivery agent. This is available in the FreeBSD port if WITH_MAILDROP is defined. There is also a new user-limit flag for maildrop delivery. - vpopmail 5.4.19 added support for MySQL connections via Unix sockets instead of TCP sockets to the server. To do that, change the second value (the port number) in vpopmail.mysql to the full pathname of the MySQL socket (e.g. /tmp/mysql.sock). - vpopmail 5.4.20 extended the LDAP support; please see README.ldap for more information, and specify the LDAP connection information in the vpopmail/etc/vpopmail.ldap file after the installation.
Diffstat (limited to 'mail/vpopmail/files/patch-vpalias.c')
-rw-r--r--mail/vpopmail/files/patch-vpalias.c116
1 files changed, 0 insertions, 116 deletions
diff --git a/mail/vpopmail/files/patch-vpalias.c b/mail/vpopmail/files/patch-vpalias.c
deleted file mode 100644
index 7d5d5f5b8968..000000000000
--- a/mail/vpopmail/files/patch-vpalias.c
+++ /dev/null
@@ -1,116 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vpalias.c ./vpalias.c
---- ../../vendor/vpopmail/vpalias.c Wed Oct 4 13:19:16 2006
-+++ ./vpalias.c Wed Oct 4 17:14:57 2006
-@@ -160,6 +160,7 @@
- {
- char *tmpstr;
- char Dir[156];
-+ char *p;
- uid_t uid;
- gid_t gid;
- int i;
-@@ -174,8 +175,10 @@
- return(-1);
- }
- strncat(Dir, "/.qmail-", sizeof(Dir)-strlen(Dir)-1);
-- for(i=0;alias[i]!=0;++i) if ( alias[i] == '.' ) alias[i] = ':';
-- strncat(Dir, alias, sizeof(Dir)-strlen(Dir)-1);
-+ i = strlen(Dir);
-+ for (p = alias; (i < (int)sizeof(Dir) - 1) && (*p != '\0'); p++)
-+ Dir[i++] = (*p == '.' ? ':' : *p);
-+ Dir[i] = '\0';
- return(unlink(Dir));
- }
-
-@@ -192,8 +195,8 @@
- gid_t gid;
- int countit;
- struct stat mystat;
-- char filename[500];
-- int i, j, len;
-+ char filename[500], **new_names;
-+ int i, j, len, cnt_names;
-
- if ( domain == NULL ) {
- verrori=VA_NULL_POINTER;
-@@ -226,27 +229,8 @@
- * Its only a few bytes...
- */
-
-- if (mydir!=NULL) closedir(mydir);
-- if ( (mydir = opendir(Dir)) == NULL ) return(NULL);
--
-- while ((mydirent=readdir(mydir))!=NULL) {
-- if ( strncmp(mydirent->d_name,".qmail-", 7) == 0 &&
-- strcmp(mydirent->d_name, ".qmail-default") != 0 ) {
-- max_names++;
-- }
-- }
--
-- /* Now we know about how many aliases there may be.
-- * Allocate a buffer for them
-- */
--
-- if (mydir!=NULL) {
-- closedir(mydir);
-- /* this is static and hence must be nulled incase max_names == 0 below */
-- mydir = NULL;
-- }
--
-- if (max_names == 0) return NULL;
-+ max_names = 100; /* some kind of default... */
-+ num_names = 0;
-
- names = malloc( max_names * sizeof(char *));
- memset(names, 0, max_names * sizeof(char *));
-@@ -258,7 +242,7 @@
- strcmp(mydirent->d_name, ".qmail-default") != 0 ) {
-
- countit=0;
-- sprintf(filename, "%s/%s", Dir, mydirent->d_name);
-+ snprintf(filename, sizeof(filename), "%s/%s", Dir, mydirent->d_name);
-
- if(!lstat(filename, &mystat) && S_ISLNK(mystat.st_mode)) {
- /* It is a mailing list */
-@@ -274,18 +258,39 @@
- }
-
- if(countit) {
-+ if (num_names == max_names) {
-+ // reallocate the array
-+ cnt_names = 2 * max_names;
-+ new_names = realloc( names, cnt_names * sizeof(char *) );
-+ if (new_names == NULL) {
-+ for(i = 0; i < num_names; i++)
-+ free(names[i]);
-+ free(names);
-+ return(NULL);
-+ }
-+
-+ // Okay, looks like we allocated enough memory
-+ names = new_names;
-+ max_names = cnt_names;
-+ }
- sprintf(filename, "%s", mydirent->d_name );
- len = strlen( filename ) - 7;
- names[ num_names ] = malloc( len + 1 );
- for(i=7,j=0; j<=len; i++,j++) {
-- names[num_names][j] = filename[i];
- if( ':' == filename[i] ) {
- names[num_names][j] = '.';
-- }
-+ } else {
-+ names[num_names][j] = filename[i];
-+ }
- }
- num_names++;
- }
- }
-+ }
-+ if (num_names < max_names) {
-+ new_names = realloc( names, num_names * sizeof(char *) );
-+ if (new_names != NULL)
-+ names = new_names;
- }
-
- if (mydir!=NULL) {