Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 08:44:20 -0400 (EDT)
From:      matt <matt@AIC-GW.MLINK.NET>
To:        Anand Buddhdev <arb@anand.org>
Cc:        Scott Benjamin <SBenjamin@quest.com>, questions@FreeBSD.ORG
Subject:   Re: Sendmail VS Qmail
Message-ID:  <Pine.BSF.4.10.9906170829570.1180-100000@aic-gw.mlink.net>
In-Reply-To: <19990617151526.C3177@africaonline.co.ke>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Jun 1999, Anand Buddhdev wrote:

[....]

: Some people find qmail difficult to work with, because they claim it is too
: different. Others complain about the fact that we must add new users to the
: system to use it. In my opinion, those are just silly excuses not to use
: qmail. Best thing is: try it for yourself, and see what you think. I use it
: on my personal workstation, and my ISPs mail server. It is small, fast,
: secure and easy to work with.

Well, I have a nice sh script that does things automatically, that i've
patched to adduser/rmuser... and am including in this email for those
whom are lazy yet would like to give Qmail a shot, I adore qmail to
death.. update.sh should go in /var/qmail/users. BTW, I still make
symlinks to /var/mail because some programs are stupid, or something
isn't setup right, better safe then sorry is my general view on life.
 
: -- 
: Anand

/* start update.sh */

#!/bin/sh
#
# credit to Michael <explorer@flame.org> for this script from when
# I was a total clueless Qmail newbie running Linux =)
#
cd /var/qmail/users
 
rm -f assign.sma   
cp assign assign.sma

/var/qmail/bin/qmail-pw2u < /etc/passwd > assign

echo diffs:
diff -u assign.sma assign

/var/qmail/bin/qmail-newu

/* end update.sh */

/* start adduser.patch */

--- adduser.perl        Fri Jan 15 05:26:59 1999
+++ /usr/sbin/adduser   Thu Jun 17 04:25:24 1999
@@ -545,7 +545,26 @@
        exit($? >> 8);
     }
 }
+# qmail
+sub qmail_update {
 
+       print "Updating qmail database...\n";
+       system("/var/qmail/users/update.sh");
+}
+# safety, cause i'm paranoid.
+sub saftey_blah {
+       
+       print "\nDoing chmod 700 $home/$name for security...\n";
+       system("chmod 700 $home/$name");
+       print "Creating $home/$name/Mailbox...\n";
+       system("touch $home/$name/Mailbox");
+       print "Doing chown $name:$name $home/$name/Mailbox...\n";
+       system("chown $name:$name $home/$name/Mailbox");
+       print "Doing chmod 600 $home/$name/Mailbox for security...\n";
+       system("chmod 600 $home/$name/Mailbox");
+       print "Linking $home/$name/Mailbox to /var/mail/$name...\n\n";
+       system("ln -s $home/$name/Mailbox /var/mail/$name");
+}
 # update group database
 sub new_users_group_update {
     local($e, @a);
@@ -598,7 +617,6 @@
        print eval "\"$e\"";
     }
     print "\n";
-
     local(@message_buffer_append) = ();
     if (!&confirm_yn("Add anything to default message", "no")) {
        print "Use ``.'' or ^D alone on a line to finish your message.\n";
@@ -711,9 +729,11 @@
            &new_users_pwdmkdb("$new_entry");
            &new_users_group_update;
            &new_users_passwd_update;  print "Added user ``$name''\n";
-           &new_users_sendmessage;
            &adduser_log("$name:*:$u_id:$g_id($group_login):$fullname");
            &home_create($userhome, $name, $group_login);
+           &saftey_blah;
+           &qmail_update;
+           &new_users_sendmessage;
        } else {
            $new_users_ok = 0;
        }

/* end adduser.patch */

/* start rmuser.patch */

--- rmuser.perl Wed Apr  2 09:34:57 1997
+++ /usr/sbin/rmuser    Thu Jun 17 04:25:30 1999
@@ -371,7 +371,8 @@
     print STDERR " updating databases,";
     system('/usr/sbin/pwd_mkdb', '-p', ${new_passwd_file});
     print STDERR " done.\n";
-
+    print STDERR " \nUpdating qmail database...\n";
+    system('/var/qmail/users/update.sh');
     close(MASTER_PW);          # Not useful anymore
 }

/* end rmuser.patch */

NOTICE/DISCLAIMER: these are my *personal* settings, if you don't like
		   them, don't use them. I just thought they might help
                   someone out.

Matt

--
matt@AIC-GW.MLINK.NET




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9906170829570.1180-100000>