Re: update to relaying redundancy
[EMAIL PROTECTED] wrote: guess it would be better for it to test for an opening on port 25 instead of a ping cause a server can obviously still be up (pingable) and not be running SMTP services. If you know how to do that, please let me know. If you grab a copy of netsaint (http://www.netsaint.org), you can use the check_smtp utility (and discard the rest of the package if you don't need it). From the documentation: "This plugin will check to see if it can connect to the SMTP port on the specified host. The plugin will look for the string specified by the expect argument in the first line of the response from the host (default is "220"). Specifying an optional port number on the command line will override the default port (25). A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option." Version 0.04 just came out of beta. - Tillman Hodgson
Matchup fd5
Howdy folks, I'm using a script (found on this list, although I don't have the original auythor handy) to automate stat's analysis. The script sits in cron, and is run daily. #!/bin/sh # # Mail all the qmail stats out someplace sensible. # RAWLOG=/tmp/qmail.$$.raw STATSPROGS="zoverall zdeferrals failures zsuccesses zrecipients zrhosts zrxdelay zsenders zsuids zddist" # comma space seperate all email addresses RECIPIENTS="[EMAIL PROTECTED]" # cat EOF /tmp/qmail.$$.comp X-Mailer: /bin/cat v1.0 To: $RECIPIENTS Subject: Qmail logs for `hostname` EOF # Munge the logs into an intermediary format. awk '{$1="";$2="";$3="";$4="";$5="";print}' /var/log/maillog \ | /usr/local/qmailanalog/bin/matchup $RAWLOG for i in $STATSPROGS; do /usr/local/qmailanalog/bin/$i $RAWLOG /tmp/qmail.$$.$i echo "#text/plain [$i] /tmp/qmail.$$.$i" /tmp/qmail.$$.comp done echo send | comp -use -edit mhn -file /tmp/qmail.$$.comp /dev/null # Must use leading "*", as mh renames things to "delete" them... rm -f /tmp/*qmail.$$.* It's been working fine for many months now. A few days ago, it started producing the error " matchup: fatal: unable to write fd 5: file descriptor not open". The stat's are still produced, however. The 3rd Stat's program (failures) doesn't produce any output, but that could simply be because there was no failures? - Tillman Hodgson
keep all mail (IMail == qmail, then filter)
Howdy, I'd like to be able to record all incoming and outgoing mail for a particular user on an IMail box running on NT. Since it provides no such functionality, but does allow all in-/out-going mail to be forwarded elseware, I was thinking of forwarding them all to an account on our qmail box, which would then filter (massively) the incoming mail to stick only those mails to or from the particular user into the maildir, discarding the rest. (Network traffic would be sacrificed in return for sparse disk usage). FAQ 8.2 gave me the idea that as incoming mail hits the .qmail file, I can use (g)awk to see if the username appears in the stream. If I exit, the message is bit bucketed, otherwise it drops to the next line the .qmail, which would be delivery to a Maildir. Something like: | awk '/^$/ { exit } /^[uU][sS][][eE][rR]-/ { print }' Any flaws to my thinking? Is there something better than a bare username I should be searching for? As I understand it, the envelope has already been removed by the time it hits the individual .qmail files, and parsing headers leads to gray hairs. My thinking is that thsi would catch all of the email, plus some unnecessary garbage, which is probably acceptable. TIA, -Tillman Hodgson
Re: blocking mail send/receive from a domain?
Russell Nelson wrote: Bill Parker writes: I would like to know how the qmail book is coming along, and 3.5 chapters down Howdy, Is the book going to have some content on common patches and/or (hopefully) qmail 2.0? I know there's not much information available on ver2, but I'm thinking of a situation of the book and ver2 becoming available at roughly the same time ... - Tillman Hodgson
Re: Big Mail system
Sam wrote: Stefan Osterman writes: I need some advice how to install a Qmail system that can handle 20k users scaling up to 200k users. The system should handle mulitple domains and not use the /etc/passwd file. Each Maildir should have quota whith mail notification to user, sender and maybe some other address. Incoming mail should be handled by qmail-users, it will scale. If you're ok with POP3/IMAP users logging in using their UNIX ids, you're all set. If you want users to login under their virtual domains, vchkpw won't work because it won't scale - it scans a flat file for user validation. I'm jumping into this thread, as I'm in a very similar position. I'm a little leery of using uid's, because (from my understanding) they're a signed 16-bit field, meaning that only 32K users can actually operate (on a 2.0.36 Linux system). Write a custom checkpassword checking routine, using something like GDBM to validate userid/domains. Ideally, I'd like to use the radius patch in conjunction with this. I haven't yet downloaded the patch or read the DOC's, as I'm in the middle of somewhat time-intensive DNS migration, but I'm not exactly positive where it would get it's home-dir information for use with Maildir's ... our Cistron radius server certainly doesn't have that information available to server out the way thigns stand now :-) Qmail has no builtin quota support. Write a custom script that sweeps through all the mailboxes, notifies owners which exceed their soft quota, and locks out mail delivery to mailboxes that exceed their hard quota. Modify your POP3/IMAP server to unlock mailboxes, if necessary, after mail is deleted. Would not the hard quota itself lock out delivery, or is there some "might break qmail" issue that I'm missing? I'm perfectly content with a bounce mentioning disk space, as the users are well aware of the 10Mb limit that we are currently imposing on our soon-to-be-replaced mail system. Get a separate RAID box, move all the disks there, and put it on the network. Have both machines mount the same filesystem, and use it as the mail store, using Maildirs. The machines should have only enough disk space to run the OS, plus sufficient disk space for your active mail queue. I'm not all that worried about throughput in my situation, as the current mail server is handling the load just fine. I'm looking for a solution that lets me use radius (to consolidate the user database at long last :-) for authentication, ideally for more than 32K users (we're at 10K now) and even more ideally in an automated fashion, such that adding a user to the radius database automatically adds their mail store dir. I'm not yet started on the planning for this project, so this might be more simple than it appears to me at the moment. -Tillman Hodgson
Re: running qmail-pop3d in RH's /etc/init.d/*
Or, as it's RedHat, use the chkconfig utility after creating your rc script in the /etc/rc.d/init.d directory. It handles the creation of the symlinks, by run level. Saves you a few steps, and if consistently used produces consistent results (unlike my lets-toss-something-together usual level of consistency :-) -Tillman Hodgson "Soffen, Matthew" wrote: OR What you do is add a single line to the /etc/rc.d/rc.local file. -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, March 29, 1999 11:36 AM To: Greg Cc: [EMAIL PROTECTED] Subject: Re: running qmail-pop3d in RH's /etc/init.d/* On Mon, Mar 29, 1999 at 11:27:19PM -1000, Greg wrote: yup, it is there /etc/init.d/ and it is executable, that's what's got me stuffed? i'll check out linuxconf, and it that fails, rc.local's the go... that's how I do things on my "slack" boxes, even a nong! like me, can follow that. Hey, Did you figure it out? You have to simbolically link the files in /etc/rc.d/init.d to one of the startup directories. For example, here is how I have my qmail startup script done: [kbo@webmail /]$ ls -l /etc/rc.d/*/*qmail -rwxr-xr-x 1 root root 886 Mar 22 12:12 /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc0.d/K30qmail - /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc1.d/K30qmail - /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc2.d/K30qmail - /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc3.d/S80qmail - /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc4.d/K30qmail - /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc5.d/K30qmail - /etc/rc.d/init.d/qmail lrwxrwxrwx 1 root root 22 Mar 13 12:11 /etc/rc.d/rc6.d/K30qmail - /etc/rc.d/init.d/qmail Ken Jones Inter7
qmHandle, SSI's, and permissions
Howdy! I'm running qmail 1.03 on a RedHat 5.1 (2.0.34 kernel, glibc) system, with the vchkpw single-uid package to handle our virtual domains. The package and qmail are working wonderfully :-) I'd like to set up a web page to monitor common mail stat's, essentially "qmHandle -l" and "qmHandle -s" with the idea to eventually set up a CGI-based qmHandle queue-handling facility. qmHandle works, when run as root as intended. Off course, Apache runs as nobody, as when qhHandle is run as nobody, line 16 of the perl script: @dirlist = split (/\n/, `ls -1 -R ${queue}remote`); Generates: [nobody@vmail bin]$ qmHandle -l ls: /var/qmail/queue/remote: Permission denied ls: /var/qmail/queue/local: Permission denied Naturally, this is because "nobody" does not have permissions on the queue. Any idea's on how to (safely) allow an SSI like "!--#exec cmd="/var/qmail/bin/qmHandle -l" --" to run as nobody? -Tillman Hodgson