[vchkpw] forwarding mails
Hi, How in the world am I suppossed to forward mails in qmail+vpopmail setup? # pwd /home/vpopmail/domains/example.net # echo "&[EMAIL PROTECTED]" > .qmail-rp This does not work. Neither this does, # echo "&[EMAIL PROTECTED]" > rp/.qmail With warm regards, -Payal
Re: [vchkpw] forwarding mails
Payal Rathod wrote: Hi, How in the world am I suppossed to forward mails in qmail+vpopmail setup? # pwd /home/vpopmail/domains/example.net # echo "&[EMAIL PROTECTED]" > .qmail-rp This does not work. Neither this does, # echo "&[EMAIL PROTECTED]" > rp/.qmail With warm regards, -Payal Use valias. Or qmailadmin from http://inter7.com/?page=qmailadmin To forward mail for [EMAIL PROTECTED] to two different external addresses: # /home/vpopmail/bin/valias -i [EMAIL PROTECTED] [EMAIL PROTECTED] # /home/vpopmail/bin/valias -i [EMAIL PROTECTED] [EMAIL PROTECTED] valias works by putting a .qmail-aliens file in the relevant domain directory. (Check the permissions on the dot-qmail files you already made, and be sure that owner=vpopmail, group=vchkpw.) Then they might work as you expect. Rick
Re: [vchkpw] forwarding mails
Payal Rathod wrote: Hi, How in the world am I suppossed to forward mails in qmail+vpopmail setup? # pwd /home/vpopmail/domains/example.net # echo "&[EMAIL PROTECTED]" > .qmail-rp This does not work. Neither this does, # echo "&[EMAIL PROTECTED]" > rp/.qmail With warm regards, -Payal What are perms and ownership of the .qmail- files? What do the logs say? I have mine scripted to be 644 and vpopmail:vchkpw at creation. I use valias for forwards mostly, though I still have a few .qmail files around for accounts that have mail 'copied' to other accounts. DAve
Re: [vchkpw] processing .qmail files for all users
On Wed, May 25, 2005 at 11:11:22PM -0700, Tom Collins wrote: > On May 25, 2005, at 3:15 PM, Flavio Curti wrote: > >Isn't the problem that if you have a .qmail in the doman directory > >(like .qmail-fcu) the mail is never seen by vpopmail or the script, > >because qmail-local will do the delivery itself? > > You're right. I was assuming that the OP was only talking about user > accounts with Maildirs. I also assume that he doesn't have any > .qmail-alias files that do direct Maildir delivery instead of > forwarding to the appropriate account. It is she ;) Sorry to be annoying, but I just cannot get a clear idea. e.g. below, #pwd /home/vpopmail/domains/example.net Now if I make a .qmail-default file there with, | /path/to/script and I have .qmail-rp and rp/.qmail with &[EMAIL PROTECTED] which .qmail-* file will be used for user rp? Will my script be used or not? With warm regards, -Payal
Re: [vchkpw] processing .qmail files for all users
On May 26, 2005, at 8:57 AM, Payal Rathod wrote: Sorry to be annoying, but I just cannot get a clear idea. e.g. below, #pwd /home/vpopmail/domains/example.net Now if I make a .qmail-default file there with, | /path/to/script and I have .qmail-rp and rp/.qmail with &[EMAIL PROTECTED] which .qmail-* file will be used for user rp? .qmail-rp. qmail-local will find and use that file before it uses .qmail-default. Will my script be used or not? Your script will not be used. If you didn't have a .qmail-rp, and you did have the vdelivermail line in .qmail-default AFTER your script, qmail-local would process the .qmail-default file, run your script first, then vdelivermail. vdelivermail would find rp/.qmail (assuming you created an rp user with vadduser) and forward the message to [EMAIL PROTECTED] Note that your script won't be able to alter the contents of the message -- qmail-local passes a fresh copy of the message to each program in the .qmail-default (or any .qmail) file. Read the man page 'qmail-command' to learn how your script's exit codes can alter the behavior of qmail-local. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com
Re: [vchkpw] processing .qmail files for all users
Payal Rathod wrote: On Wed, May 25, 2005 at 11:11:22PM -0700, Tom Collins wrote: On May 25, 2005, at 3:15 PM, Flavio Curti wrote: Isn't the problem that if you have a .qmail in the doman directory (like .qmail-fcu) the mail is never seen by vpopmail or the script, because qmail-local will do the delivery itself? You're right. I was assuming that the OP was only talking about user accounts with Maildirs. I also assume that he doesn't have any .qmail-alias files that do direct Maildir delivery instead of forwarding to the appropriate account. It is she ;) Sorry to be annoying, but I just cannot get a clear idea. e.g. below, #pwd /home/vpopmail/domains/example.net Now if I make a .qmail-default file there with, | /path/to/script and I have .qmail-rp and rp/.qmail with &[EMAIL PROTECTED] which .qmail-* file will be used for user rp? Will my script be used or not? Hi, With only .qmail-default .qmail-default will be used With .qmail-default and rp/.qmail Both .qmail-default and rp/.qmail will be used With .qmail-default and .qmail-rp Only .qmail-rp will be used With .qmail-default, .qmail-rp and rp/.qmail Only .qmail-rp will be used. HPH, Regards, Rick
Re: [vchkpw] processing .qmail files for all users
On Thu, May 26, 2005 at 09:21:37AM -0700, Tom Collins wrote: > >&[EMAIL PROTECTED] > >which .qmail-* file will be used for user rp? > > .qmail-rp. qmail-local will find and use that file before it uses > .qmail-default. Thanks Rick and Tom for the patience shown here. > If you didn't have a .qmail-rp, and you did have the vdelivermail line > in .qmail-default AFTER your script, qmail-local would process the > .qmail-default file, run your script first, then vdelivermail. > vdelivermail would find rp/.qmail (assuming you created an rp user > with vadduser) and forward the message to [EMAIL PROTECTED] Well, I have always created users with vadduser. Now, my question is what will be the contents of .qmail default if, - rp/.qmail is present - and if rp/.qmail is not present and I want to execute my script. With warm regards, -Payal
Re: [vchkpw] forwarding mails
> Payal Rathod wrote: > > How in the world am I suppossed to forward mails > in qmail+vpopmail setup? >> # pwd >> /home/vpopmail/domains/example.net > > > > # echo "&[EMAIL PROTECTED]" > .qmail-rp > > > > This does not work. This is the correct format. With the right permissions no reason why it shouldn't work. > > Neither this does, > > # echo "&[EMAIL PROTECTED]" > rp/.qmail ( scratches head.. ) > What are perms and ownership of the .qmail- files? >--- DAve <[EMAIL PROTECTED]> wrote: >I have mine scripted to be 644 and vpopmail:vchkpw >at creation. They work tickety-boo as below, -rw--- vpopmail vchkpw .qmail-rp If it's really giving you grief, why not use qmailadmin to set them? HTH Chris. __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/
Re: [vchkpw] processing .qmail files for all users
On May 26, 2005, at 9:48 AM, Payal Rathod wrote: Now, my question is what will be the contents of .qmail default if, - rp/.qmail is present - and if rp/.qmail is not present and I want to execute my script. .qmail-default: |/path/to/your/script |/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox Your script will be executed before mail is delivered to any user in the domain (defined as a user entry in the vpasswd file or database backend). -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com
Re: [vchkpw] vpopmail authentications failing randomly
On Tuesday 24 May 2005 9:25 pm, Matt Simerson wrote: > Problem: vpopmail authentications failing randomly If you haven't yet, you might want to increase the maximum number of mysql connections allowed in the /etc/my.cnf file like: max_connections=500 The max connections should be high enough to cover the max smtp, pop, imap, local concurrency and web mail. Ken Jones
Re: [vchkpw] vpopmail authentications failing randomly
SOLVED! Read on On May 25, 2005, at 1:37 PM, Tom Collins wrote: On May 24, 2005, at 7:25 PM, Matt Simerson wrote: So, I turned to vmysql.c and noticed a timeout setting there that affects the mysql connection timeout. I bumped it up from 2 to 5, and it has reduced the failure frequency but it's still happening fairly regularly. There are some slow queries in MySQL, but only 15 from the last day, so that doesn't even closely correspond with 300 "no found" errors. So, anyone got ideas on how to debug this issue further? Thanks for taking such a detailed look at this problem. I think you've nailed it right there -- the server (or MySQL) gets bogged down to the point where it can't answer the query in under 5 seconds. Vpopmail times out and its only option is to reply that the login failed. Increasing that timeout to 10 or even 15 seconds shouldn't have a negative impact -- it will make vpopmail more tolerant of slow responses. -- Tom Collins - [EMAIL PROTECTED] I would love to believe that this issue was that simple. Last night while running the buildworld, the system was very heavily loaded. During that time, I had the timeout raised to 5 seconds and was running my test script which runs one query every second. The queries that failed were failing much sooner than the 5 second timeout. Further, the other program that I was accessing MySQL with never once failed, and it never took more than a second or two to return the results either. Further still is that the timeout value that I altered in vmysql.c ONLY affects the MySQL connection timeout (MYSQL_OPT_CONNECT_TIMEOUT) which is only used in mysql_real_connect. Since it's always connecting to MySQL in well under 5 seconds, that certainly is not the problem, and raising it to any arbitrarily higher number isn't going to help. As Matt B pointed out in his post where he saw this issue previously, vpopmail is successfully connecting to the MySQL server, and in 99.9% of the cases (even where authentication failure occurs), successfully switching to the vpopmail database correctly. Today I added a new data point to the mix. I upgraded another mail server for a different client, also FreeBSD. Previously using MySQL 3.x. Fairly moderate load, but a much more busy server that's been happily busy since I build it for him, two years ago. I also upgraded this box to MySQL 4.0 w/linuxthreads. I began getting the failed authentications in the logs again. He complained that qmailadmin wasn't working correctly (while I was still compiling) and sure enough, when the system was under moderate load, I was getting Apache errors in the log file: vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[5]: Commands out of sync; You can't run this command now vmysql: sql error[3]: MySQL server has gone away I didn't bother to read the qmailadmin source and understand it's error messages, I just compiled a new mysql-server w/o linuxthreads, installed it and all the MySQL problems went away. It may simply be coincidence that this fixes the problem on two different systems, but it's a happy coincidence for me. Matt