From owner-freebsd-questions Thu Jun 17 5:44:29 1999 Delivered-To: freebsd-questions@freebsd.org Received: from aic-gw.mlink.net (aic-gw.mlink.net [209.104.118.65]) by hub.freebsd.org (Postfix) with SMTP id C878615494 for ; Thu, 17 Jun 1999 05:44:22 -0700 (PDT) (envelope-from matt@AIC-GW.MLINK.NET) Received: (qmail 1220 invoked by uid 1000); 17 Jun 1999 12:44:20 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 17 Jun 1999 12:44:20 -0000 Date: Thu, 17 Jun 1999 08:44:20 -0400 (EDT) From: matt To: Anand Buddhdev Cc: Scott Benjamin , questions@FreeBSD.ORG Subject: Re: Sendmail VS Qmail In-Reply-To: <19990617151526.C3177@africaonline.co.ke> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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