Re: [vchkpw] processing .qmail files for all users
On Wednesday 25 May 2005 17:34, Tom Collins wrote: Modifying the source to vdeliermail is also an option. If, for example, you wanted to read the headers of the message and save it in a special mailbox for the domain if it's spam (or even save it in an IMAP mailbox for the user), it would best be accomplished in vdelivermail. Forgive my opinion, but I think that this is the wrong (certainly not the best, anyways) approach. Why not call your choice of LDA, such as maildrop or procmail, from either per-user .qmail files or .qmail-default? That's going to be a much more flexible and easier to implement solution than hacking up vdelivermail. This is what we do, for every user on our system. The script we use to create accounts (which also is what's used by our web interface) sets up a .qmail file for the user, creates a number of folders we like them to have, and writes out a subscription file that the IMAP server uses. We call clamav, dspam, and spamassassin from maildrop, and filter accordingly: Spam to a filtered folder, and virii to /dev/null. :) Users can then set up their own filtering rules as well, if you choose to allow it. Cheers, -- Casey Allen Shobe | http://casey.shobe.info [EMAIL PROTECTED] | cell 425-443-4653 AIM Yahoo: SomeLinuxGuy | ICQ: 1494523 SeattleServer.com, Inc. | http://www.seattleserver.com
Re: [vchkpw] processing .qmail files for all users
On May 25, 2005, at 9:23 PM, Payal Rathod wrote: Yes this is exactly what I am asking. If there is a file .qmail-payal or payal/.qmail why would .qmail-default be seen? So my script won't run. qmail-local will process .qmail-payal. vdelivermail is not involved. But, for payal/.qmail, vdelivermail handles delivery. If qmail-local doesn't find .qmail-payal in the domain directory, it uses .qmail-default which calls vdelivermail. Vdelivermail looks the user up in the user database to find his/her home directory, and either delivers the mail directly or follows the .qmail file. -- 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
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. -- 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
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] 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] processing .qmail files for all users
On Tue, May 24, 2005 at 01:10:29PM -0700, Tom Collins wrote: On May 24, 2005, at 9:24 AM, Payal Rathod wrote: But qmail-default is not looked at when the user has a .qmail file of her own, maybe for forwarding mails or something like that. What do I do in such case? Yes it does. [...] You mean if I want to run a script like (easy one) | ifspamh [EMAIL PROTECTED] for all users I need to modify the source? See my problem is that I have few users who have their own .qmail files, probably because they have mail forwarding enabled and some do not. Can I run a script everyday so that I can have | ifspamh [EMAIL PROTECTED] for all users for that domain? With warm regards, -Payal
Re: [vchkpw] processing .qmail files for all users
On May 25, 2005, at 9:52 AM, Payal Rathod wrote: On Tue, May 24, 2005 at 01:10:29PM -0700, Tom Collins wrote: On May 24, 2005, at 9:24 AM, Payal Rathod wrote: But qmail-default is not looked at when the user has a .qmail file of her own, maybe for forwarding mails or something like that. What do I do in such case? Yes it does. [...] You mean if I want to run a script like (easy one) | ifspamh [EMAIL PROTECTED] for all users I need to modify the source? If you want the SAME string for all users in a domain, you can insert that at the top of the .qmail-default file for the domain. Qmail-local will run the email through your script before passing it to vdelivermail for local delivery. Your script could then take the message and use the appropriate exit codes to prevent the message from getting to the local user. Your script could even forward (or store) the mail in another mailbox. Modifying the source to vdeliermail is also an option. If, for example, you wanted to read the headers of the message and save it in a special mailbox for the domain if it's spam (or even save it in an IMAP mailbox for the user), it would best be accomplished in vdelivermail. I have been contacted by another user about adding such a feature, and his company may be willing to sponsor development. If there are other companies who would like to see it added, please contact me off list, and perhaps I can coordinate sponsorships to keep the costs down, and get this added to future releases. -- 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
Hi Tom On 5/25/05, Tom Collins [EMAIL PROTECTED] wrote: If you want the SAME string for all users in a domain, you can insert that at the top of the .qmail-default file for the domain. Qmail-local will run the email through your script before passing it to vdelivermail for local delivery. 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? Hope that helps and regards Flavio -- http://no-way.org/~fcu/
Re: [vchkpw] processing .qmail files for all users
On Thu, May 26, 2005 at 12:15:07AM +0200, Flavio Curti wrote: Hi Tom On 5/25/05, Tom Collins [EMAIL PROTECTED] wrote: If you want the SAME string for all users in a domain, you can insert that at the top of the .qmail-default file for the domain. Qmail-local will run the email through your script before passing it to vdelivermail for local delivery. 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? Yes this is exactly what I am asking. If there is a file .qmail-payal or payal/.qmail why would .qmail-default be seen? So my script won't run. With warm regards, -Payal Hope that helps and regards Flavio -- http://no-way.org/~fcu/
[vchkpw] processing .qmail files for all users
Hi, In a qmail + vpopmail setup, I would like to run, | /path/to/script in .qmail file for all users. Is there any eay way of doing it? With warm regards, -Payal
Re: [vchkpw] processing .qmail files for all users
Hi, On Tue, 2005-05-24 at 12:04 -0400, Payal Rathod wrote: In a qmail + vpopmail setup, I would like to run, | /path/to/script in .qmail file for all users. Is there any eay way of doing it? You can do it in the .qmail-default file. Change: | /path/to/vpopmail/vdelivermail '' bounce-no-mailbox to: | /path/to/script | /path/to/vpopmail/vdelivermail '' bounce-no-mailbox - you still have to do it with every domain thou... /Anders
Re: [vchkpw] processing .qmail files for all users
On Tue, May 24, 2005 at 06:17:46PM +0200, Anders Brander wrote: Hi, On Tue, 2005-05-24 at 12:04 -0400, Payal Rathod wrote: In a qmail + vpopmail setup, I would like to run, | /path/to/script in .qmail file for all users. Is there any eay way of doing it? You can do it in the .qmail-default file. Change: | /path/to/vpopmail/vdelivermail '' bounce-no-mailbox to: | /path/to/script | /path/to/vpopmail/vdelivermail '' bounce-no-mailbox But qmail-default is not looked at when the user has a .qmail file of her own, maybe for forwarding mails or something like that. What do I do in such case? With warm regards, -Payal
Re: [vchkpw] processing .qmail files for all users
Hi again, On Tue, 2005-05-24 at 12:24 -0400, Payal Rathod wrote: In a qmail + vpopmail setup, I would like to run, | /path/to/script in .qmail file for all users. Is there any eay way of doing it? You can do it in the .qmail-default file. Change: | /path/to/vpopmail/vdelivermail '' bounce-no-mailbox to: | /path/to/script | /path/to/vpopmail/vdelivermail '' bounce-no-mailbox But qmail-default is not looked at when the user has a .qmail file of her own, maybe for forwarding mails or something like that. Are you sure about that? What do I do in such case? Is it really a problem? /Anders
Re: [vchkpw] processing .qmail files for all users
On May 24, 2005, at 9:24 AM, Payal Rathod wrote: But qmail-default is not looked at when the user has a .qmail file of her own, maybe for forwarding mails or something like that. What do I do in such case? Yes it does. qmail-local delivers via .qmail-default to vdelivermail which parses the user's .qmail file. If you need something to happen for all users, you could consider modifying the source to vdelivermail. -- 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