RE: Building very large Qmail instalations...
Could you, or anyone else who would care to join this discussion, please be more specific re: "Suns filesystems and qmails file operations"? We are load balancing a pair of Sun E250's sharing one disk array via NFS. All Maildirs are on the NFS share. So far (roughly 10,000 mailboxes) I don't notice any real problems. But I would be very interested in more detail regarding these two issues (Sun filesystems and qmail file operations) in case I do begin to notice I/O issues on the NFS server. Can you give a detailed explanation or perhaps point me to some appropriate docs for more detail? Thanks, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Toens Bueker Sent: Wednesday, June 28, 2000 7:32 AM To: [EMAIL PROTECTED] Subject: Re: Building very large Qmail instalations... Importance: High The problem - in this case - is Suns filesystem and qmails file operations. You didn't mention the number of disks in your A1000 - but maybe you should add some and spread the load between them. My suggestion, though, would be to dump the E450 and grab a reasonable sized Intel box (maybe dual PII 500) with FreeBSD on it. With FreeBSD, ffs and softupdates your i/o headaches should be gone. By Töns -- Linux. The dot in /.
load balancing two qmail servers using nfs
I've got two qmail servers running inside a load balancer. They both access the same /var/mail/username/Maildir directories on an NFS server. They also share many of the same configuration files in /var/qmail/control on the NFS server. The files they share are local symbolic links to the shared volume on the NFS server. A few hours after bringing up the second qmail server, the first one, which had been running fine for two weeks, quit working. The errors I am getting in the syslog file on the failing server are "Can't_connect_to_SMTP_server" and "Can't_chdir_to_Maidir". Anyone have any success with this configuration or have any idea what could be causing the first server to loose its way? Running qmail and NFS on Solaris 2.7 (first server and NFS server) and 2.8 (second qmail server). The first server (the one failing) responds to connections on port 25 but can't send or deliver and is not spawning any qmail processes. The second server is now doing all the work. Thanks, Mike
RE: load balancing two qmail servers using nfs
Both servers are NIS clients from the same master, which happens to be the NFS server. So the user information is identical across all machines involved. The tcpserver init scripts on the second machine were copied from the first machine, and so are also identical. Both good points, but not the problem, I'm afraid. Thanks, Mike -Original Message- From: chuck [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 24, 2000 12:10 PM To: Mike Denka Cc: [EMAIL PROTECTED] Subject: Re: load balancing two qmail servers using nfs Mike, You might make sure that the UID/GIDs map the same on both servers and the NFS machine. i.e.- If the qmaild user is user 500 on the first server, but is a different UID number on the second server or the NFS machine you might have problems. Also, what do your tcpserver init scripts look like for both servers? They should be identical. Regards, Charles Werbick The Wirehouse Mike Denka writes: Hmmm . . . that's a good thought. I really hadn't considered using rsync since NFS seems to be working fine at least in terms of handling large mail volumes. But rsync would have some distinct advantages. However, I don't think that is the source of my problems because I had access problems getting to the control files when first setting up the server and the error messages in /var/log/syslog are pretty clear (e.g., "Can't_read_control", or something to that affect). Thanks for the rsyinc tip. I will try it out. Meanwhile, any other thoughts on why the second server suddenly cannot make smtp connections to the outside world or chdir to Mailbox? Mike -Original Message- From: steve j. kondik [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 24, 2000 12:39 AM To: [EMAIL PROTECTED] Subject: Re: load balancing two qmail servers using nfs you might consider using rsync to sync your conffiles, instead of sharing them over nfs. this would eliminate alot of problems and latency i'd think. On 06/24/00 @ 12:11AM, Mike Denka wrote: I've got two qmail servers running inside a load balancer. They both access the same /var/mail/username/Maildir directories on an NFS server. They also share many of the same configuration files in /var/qmail/control on the NFS server. The files they share are local symbolic links to the shared volume on the NFS server. A few hours after bringing up the second qmail server, the first one, which had been running fine for two weeks, quit working. The errors I am getting in the syslog file on the failing server are "Can't_connect_to_SMTP_server" and "Can't_chdir_to_Maidir". Anyone have any success with this configuration or have any idea what could be causing the first server to loose its way? Running qmail and NFS on Solaris 2.7 (first server and NFS server) and 2.8 (second qmail server). The first server (the one failing) responds to connections on port 25 but can't send or deliver and is not spawning any qmail processes. The second server is now doing all the work. Thanks, Mike -- Steve J. Kondik [EMAIL PROTECTED] Stargate Industries, LLC - Network Operations Center
RE: qmail hanging - best way to restart
The problem with the soft kill is that, as you say in your message, it takes some time for all connections to come to a graceful conclusion and then you're still often left with some that hang. Unfortunately our mail server is in production offering both smtp and pop services for thousands of customers. When our mail server hangs, people start screaming. We need to un-hinge it and get it back up and running again. I would love to understand what is causing smtp and pop to hang up. But, meanwhile, I need to quickly kill qmail and tcpserver and get them started again. Sounds like pkill without the "-u 0" is the answer. My original question was why this startup script would kill only the root owned processes. BTW, I would be interested in a discussion of the political and theoretical issues involved in stopping qmail outright, since, until I can figure out why qmail is hanging on our system, I must apparently stop it outright to get it up and running again. And political and theoretical rammifications must be taken into consideration (even if they are overridden by necessity). Thanks, Mike -Original Message- From: Mark Mentovai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 13, 2000 3:38 PM To: [EMAIL PROTECTED] Subject: RE: qmail hanging - best way to restart Mike Denka wrote, among other things: /usr/bin/pkill -f -u 0 qmail-smtpd /usr/bin/pkill -f -u 0 qmail-send /usr/bin/pkill -f -u 0 qmail-lspawn /usr/bin/pkill -f -u 0 qmail-rspawn /usr/bin/pkill -f -u 0 qmail-clean /usr/bin/pkill -f -u 0 splogger I'll spare the discussion of the merits of stopping qmail outright (as you are attempting to do) vs. letting it stop. That's a more theoretical and political issue. -u 0 is your answer to your euid==0 question. Check the man page. The -u option to pkill restricts it to processes with a certain effective UID. Take it out. Actually, you're killing too many unnecessary things and too few necessary things. To hard-stop the SMTP server, send a SIGTERM to tcpserver and qmail-smtpd. To hard-stop qmail, send a SIGTERM to qmail-send and all delivery programs (qmail-remote, qmail-local, and any local delivery agent like procmail). pkill isn't portable. Assuming you're OK with that, and that you'll continue to launch qmail as you have been (without supervise from daemontools), AND that you want to hard-stop qmail, you should do the following: # Stop delivering mail, deliveries in progress will continue pkill -TERM -u qmails qmail-send # Stop accepting SMTP connections, open connections will remain pkill -TERM -u qmaild tcpserver If left alone long enough, deliveries and SMTP connections would then finish. This is what I refer to as a soft stop. For a hard stop, possibly after sleeping for a while to give deliveries a fair chance: # Stop local deliveries in progress - don't specify -u due to setuid # Messages will remain in queue pkill -TERM '(qmail-local|procmail)' # Stop remote deliveries in progress # Messages will remain in queue pkill -TERM -u qmailr qmail-remote # Stop SMTP connections in progress # MTAs will queue mail and try again. MUAs should do the same, but # may warn the user. pkill -TERM -u qmaild qmail-smtpd Mark -- Do not reply directly to this e-mail address -- Mark Mentovai GGN NOC System Administrator
qmail hanging - best way to restart
We are having some problems with qmail hanging and no longer responding to POP requests or smtp requests. Restarting all qmail processes and qmail-popup resolves the problem. I notice that when I stop qmail, the /etc/init.d/qmail stop script does not stop all processes, only those whose effective uids are 0 (root). Therefore several processes remain running and I must wait for them to terminate to restart. This can be quite a long time (sometimes the processes seem to be hung and never terminate naturally). Two questions: 1) anyone else notice this problem with both qmail pop and qmail smtp hanging (on Solaris 7 running on an E250 with 512 MB RAM - using tcpserver to fork the processes - note: this does NOT seem to be related to the previous thread on Solaris 7 problems - that thread mentioned thousands of qmail processes stalling, I never have more than 40 or 50). 2) Is there any reason that qmail processes whose effective uid is not 0 shouldn't be killed when stopping and restarting? Thanks, Mike
RE: qmail hanging - best way to restart
I don't use a supervisor unless it's hidden in the default configuration, but this is my startup script: #!/sbin/sh # # Start qmail # case "$1" in 'start') if [ -f /var/qmail/rc ]; then csh -cf '/var/qmail/rc ' fi if [ -f /var/qmail/bin/qmail-smtpd -a -f /usr/local/bin/tcpserver -a -f /etc/tcp.smtp.cdb ]; then /usr/local/bin/tcpserver -R -c 100 -x/etc/tcp.smtp.cdb -u 32004 -g 1000 0 smtp /var/qmail/bin/qmail-smtpd fi ;; 'stop') /usr/bin/pkill -f -u 0 qmail-smtpd /usr/bin/pkill -f -u 0 qmail-send /usr/bin/pkill -f -u 0 qmail-lspawn /usr/bin/pkill -f -u 0 qmail-rspawn /usr/bin/pkill -f -u 0 qmail-clean /usr/bin/pkill -f -u 0 splogger ;; *) echo "Usage: $0 { start | stop }" exit 1 ;; esac exit 0 -Original Message- From: Dave Kelly [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 13, 2000 1:12 PM To: [EMAIL PROTECTED] Subject: RE: qmail hanging - best way to restart What does your 'qmail start' script look like? If you converted to the most recent supervise from an older version, and didn't convert things into the 'run' file correctly, you could see this behaviour. -D -Original Message----- From: Mike Denka [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 13, 2000 3:04 PM To: [EMAIL PROTECTED] Subject: qmail hanging - best way to restart We are having some problems with qmail hanging and no longer responding to POP requests or smtp requests. Restarting all qmail processes and qmail-popup resolves the problem. I notice that when I stop qmail, the /etc/init.d/qmail stop script does not stop all processes, only those whose effective uids are 0 (root). Therefore several processes remain running and I must wait for them to terminate to restart. This can be quite a long time (sometimes the processes seem to be hung and never terminate naturally). Two questions: 1) anyone else notice this problem with both qmail pop and qmail smtp hanging (on Solaris 7 running on an E250 with 512 MB RAM - using tcpserver to fork the processes - note: this does NOT seem to be related to the previous thread on Solaris 7 problems - that thread mentioned thousands of qmail processes stalling, I never have more than 40 or 50). 2) Is there any reason that qmail processes whose effective uid is not 0 shouldn't be killed when stopping and restarting? Thanks, Mike
virtualdomains question
We are an isp who has used sendmail for many years and we are converting to qmail. In sendmail we have traditionally used the virtual user table to allow customers to use a commonly used mailbox like 'webmaster', for example, at their domain. In the virtusertable on sendmail, if you put only [EMAIL PROTECTED] in the virtusertable, then any other mailbox address for that domain, [EMAIL PROTECTED] for example, will automatically default to fred@ our default domain. With qmail's virtual user processing, there is no local delivery if 'fred' is not specified in either the virtual user table itself or in the dot qmail file in the delivery address specified for the virtual domain. I'm wondering if there is some way to imitate sendmail's default behavior in qmail's virtualdomains file or some other qmail control file that I don't know about yet. It is very important for us to be able to deliver local mail to [EMAIL PROTECTED] to [EMAIL PROTECTED] by default - i.e. without having to create a .qmail-anyuser file in the delivery mailbox for customers.domain for each potential recipient. The reason is that in one virtual domain case we have literally thousands of such recipients and only a handful of special delivery cases that will have .qmail files. Is there a simple way to do this? Thanks, Mike
RE: qmail aliases
Turns out that the solution to this problem was to make sure that the ampersand, '', is in front of each line followed by each additional recipient address. Thanks to Jim Gilliver for the solution and Ruben van der Leij for an explanation. However the documentation makes it sound as though the '' is optional if the first character of the recipient address is alphabetic. It would be helpful if this were clarified somewhere in the docs. Thanks, Mike -Original Message- From: Anand Buddhdev [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 25, 2000 10:31 PM To: Mike Denka Cc: [EMAIL PROTECTED] Subject: Re: qmail aliases On Tue, Jan 25, 2000 at 03:51:50PM -0800, Mike Denka wrote: dot-qmail man page. But I'm still missing something: it seems that to alias root, for example, you put the real address you want root's mail to go to into the file ~/alias/.qmail-root, right? But what if you want root's mail to go to several recipients? Then the implied solution is to put multiple addresses, one per line, in the ~alias/.qmail-root file. However Correct. we have done this and only the first address on the first line gets the mail addressed to root. The remaining recipients do not receive mail from root. Can someone point us in the right direction to force aliases to work for multiple recipients? This should work, but since it's not, you need to look at the qmail logfile, to see what qmail is doing. That might give you a clue about why the other recipients are not receiving the mail. If you still can't make sense of the log, make the relevant lines of out of the log available - someone may be able to help. -- See complete headers for more info
qmail aliases
Hi, I'm new to the list and to qmail. We are a medium sized ISP with about 10,000 customers and are switching from sendmail for performance reasons. I have one simple alias question. I have searched all the faqs and all the literature that I can stomach in one sitting. I have read and re-read the dot-qmail man page. But I'm still missing something: it seems that to alias root, for example, you put the real address you want root's mail to go to into the file ~/alias/.qmail-root, right? But what if you want root's mail to go to several recipients? Then the implied solution is to put multiple addresses, one per line, in the ~alias/.qmail-root file. However we have done this and only the first address on the first line gets the mail addressed to root. The remaining recipients do not receive mail from root. Can someone point us in the right direction to force aliases to work for multiple recipients? Thanks very much, Mike