Giter Club home page Giter Club logo

vpopmail's People

Contributors

brunonymous avatar patriceduh avatar sagredo-dev avatar semhoun avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vpopmail's Issues

Future of your vpopmail

Hi, great job there!
I'm planning to pull my latest modifications of vpopmail that you can find at notes.sagredo.eu. Do you have plans to mantain this vpopmail distribution in the long term? Can the actual situation be considered stable? If yes, is it possible to release a tag, so that we can download from that point?

Thanks for any answer

postmaster pwd too short, but domain is created anyway

If I try to create a domain and enter a pwd with less than 12 characters the postmaster user is not added, but the domain folder is created anyway on disk.
I think that it would be great if the error message will suggest the minimum lenght allowed, just to avoid try and errors to those who didn't looked at the code.

Thanks for your work!

New release

Hi, just wanted to inform that I'm publishing a new release in my fork to let my users download my vpopmail package. If you prefer I will link directly to your future release when ready.

History with proper git attribution

I took the freedom to take my import of the SVN history and rebase all your changes on top of that. Afterwards I did some small modifications to your history:

  • use my original commit messages and dates for my patches
  • change the authorship and commit message of some other patches, mainly those ones you picked from my Gentoo branch
  • reflect these other contributors in the changelog as I don't want to take credit for their work
  • combine your commit 9adce61 into 3328286 where that file was missed

You can find all that at https://github.com/DerDakon/vpopmail/tree/brunonymous-main

In case you want to switch your project to the new history please ping me, I can then give you instructions to switch the git history over.

Min pwd length at configure time

I think that most domain administrators will be annoyed by a so long minimum allowed length for passwords, because they want to enter a 1 char pwd when they are testing their installation. In addition, weak pwd like 123456789123 are still possible. It's better to enforce qmailadmin, which is under end users control, in my opinion.

I'm patching vpopmail to let the admin set the minimum length at configure time as follows. I hope it can be of interest :)

diff -ruN vpopmail-original/configure.in vpopmail/configure.in
--- vpopmail-original/configure.in      2022-04-04 12:54:54.633524194 +0200
+++ vpopmail/configure.in       2022-04-04 18:05:56.425408645 +0200
@@ -1703,6 +1703,38 @@
 
 #----------------------------------------------------------------------
 
+# Enable min password length
+AC_MSG_CHECKING(whether min pwd length has been defined)
+AC_ARG_ENABLE(min-pwd-length,
+      [  --enable-min-pwd-length=NUMBER      Minimum password length (default 12).],
+      min_pwd_length=$enableval,
+         min_pwd_length=12
+)
+
+  if test $min_pwd_length = "yes"
+  then
+      AC_MSG_RESULT(yes)
+      minpwdlength=12
+  else 
+      if test $min_pwd_length = "no"
+      then
+          AC_MSG_RESULT(no)
+          minpwdlength=1
+      else
+          if ! test $min_pwd_length = ""
+          then
+              AC_MSG_RESULT(yes)
+              minpwdlength=$enableval
+          else
+              AC_MSG_ERROR([Unable to set minimum password length. Please specify --enable-min-pwd-length=NUMBER.])
+          fi
+      fi
+  fi
+
+AC_DEFINE_UNQUOTED(MIN_PW_CLEAR_PASSWD,$minpwdlength,Minimum password length)
+
+#----------------------------------------------------------------------
+
 AC_MSG_CHECKING(whether any discontinued --enable commands have been used)
 
 AC_ARG_ENABLE(mysql-logging, [],
@@ -2096,6 +2128,19 @@
     ;;
 esac
 
+
+case $min_pwd_length in
+  yes*)
+    echo "   Min. pwd length = 12 (default)  --enable-min-pwd-length=NUMBER"
+    ;;
+  no*)
+    echo "   Min. pwd length = 1   --disable-min-pwd-length"
+    ;;
+  *)
+    echo "   Min. pwd length = $minpwdlength   --enable-min-pwd-length=NUMBER"
+    ;;
+esac
+
 
 if test "$USE_SQL" = 1
 then
diff -ruN vpopmail-original/vpopmail.c vpopmail/vpopmail.c
--- vpopmail-original/vpopmail.c        2022-04-04 12:54:54.642524164 +0200
+++ vpopmail/vpopmail.c 2022-04-04 18:07:01.778189168 +0200
@@ -2867,6 +2867,8 @@
 
 /* Convert error flag to text */
 char *verror(int va_err) {
+  char *buf = malloc(MAX_BUFF);
+
   switch (va_err) {
     case VA_SUCCESS:
       return ("Success");
@@ -2965,7 +2967,8 @@
     case VA_CANNOT_DELETE_CATCHALL:
       return ("can't delete catchall account");
     case VA_PASSWD_TOO_SHORT:
-      return ("password too short (min=12)");
+      snprintf(buf, MAX_BUFF, "%s%d%s", "password too short (min=", MIN_PW_CLEAR_PASSWD, ")");
+      return (buf);
     default:
       return ("Unknown error");
   }
diff -ruN vpopmail-original/vpopmail.h vpopmail/vpopmail.h
--- vpopmail-original/vpopmail.h        2022-04-04 12:54:54.642524164 +0200
+++ vpopmail/vpopmail.h 2022-04-04 18:16:26.713290652 +0200
@@ -44,10 +44,10 @@
 #define MAX_PW_GECOS 64
 #if defined(MD5_PASSWORDS) || defined(SHA512_PASSWORDS)
 #define MAX_PW_CLEAR_PASSWD 128
-#define MIN_PW_CLEAR_PASSWD 12
+/* #define MIN_PW_CLEAR_PASSWD 12 */
 #else
 #define MAX_PW_CLEAR_PASSWD 8
-#define MIN_PW_CLEAR_PASSWD 8
+/* #define MIN_PW_CLEAR_PASSWD 8 */
 #endif
 #define MAX_PW_DIR 160
 #define MAX_PW_QUOTA 20`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.