[xmail] Re: Filter attachments before mailproc.tab
Thanks Francis for the long and informative answer. I will write the script that filters the attachments and I will put it on the mailproc.tab level. I will have to write another script that will scan for all mailproc.tab and put the filter line in them. It is still not the best solution but the only one for the moment. Thank you -fred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of CLEMENT Francis Sent: 25 septembre 2008 11:37 To: 'xmail@xmailserver.org' Subject: [xmail] Re: Filter attachments before mailproc.tab Better place is mailproc.tab file in any cases as you are sure you will = run the attachment check only for the needed users/redirects (can easily = change for a user when not at all redirected to google, so only mailproc need changes for the redirect and removing the filter, ...) In fact mailproc.tab file or filters.in.tab file will depend of the = number of account needed need the filter to run. If your xmail accounts don't change too much (relatively static, major changes only when creating new accounts, ...) I think adding the script = call to each individual existing mailproc.tab is only one time consuming (a little batch that add the filter line in each user mailproc.tab = files that need the filter is not more difficult to write that the filter.in script, so no real need to do many changes by hand, so not too much = time consuming) and you server will be finally happy to not run a filters.in.tab script every time but that will do real job for some mails (depends also of = the number of mails received by these accounts). Sure, if 90% accounts need the filter, so filters.in.tab file is the = place. Sure, if only 5% accounts need the filter, but they receive 90% of the = mails your server receive, then filter.in.tab file is the right place :) It's only up to you to do the choice depending of your real situation (number of accounts affected, percent of mail they receive, ...) :) In any cases, I allways prefer reporting job at last stage as possible, = I'm then sure that it runs only when really needed. (but it's my point of vue) Francis -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de fred Envoy=E9 : jeudi 25 septembre 2008 16:20 =C0 : xmail@xmailserver.org Objet : [xmail] Filter attachments before mailproc.tab Hi everyone, =20 I have a question regarding attachments and redirects with=20 mailproc.tab. =20 Here is the problem;=20 =20 [EMAIL PROTECTED] has a mailproc which redirects to=20 [EMAIL PROTECTED] =20 If someone sends an email WITH A PROHIBITED ATTACHMENT=20 extension (such as ..exe, .bat, etc, etc) to [EMAIL PROTECTED], gmail refuses the=20 email saying the attachment is blocked, that is fine. =20 How can I block and stop the redirection of emails with such = extensions before mailproc.tab kicks in? =20 I understand that I must write a filter, that is no problem,=20 but where to place it? =20 I think the filter order is: =20 1. filters.pre-data.tab 2. filters.post-rcpt.tab 3. filters.post-data.tab 4. filters.in.tab 5. mailproc.tab =20 Of course I could place it in filters.in.tab but it would be=20 ran everytime someone receives a message, which is not efficient and I think=20 would slow down the server, I would need it run only if someone has a=20 mailproc.tab. =20 Can someone point me to the right direction? I think placing the = script inside mailproc.tab for each of my users that has one would be=20 a pain in the ass. =20 Maybe the best solution would be to place it inside=20 filters.in.tab and do a check like: =20 If(file_exists(/var/MailRoot/domains/mydomain.com/user/mailproc.tab))= { //Script here } =20 What does the gurus think? =20 Thanks in advance =20 -fred =20 =20 - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: Filter attachments before mailproc.tab
Thanks for the reply Davide. Yes I know mailproc.tab supports filters, but the problem is activating and managing the mailprocs if you have numerous users, I will just automate this task by making another script. -fred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Davide Libenzi Sent: 25 septembre 2008 15:29 To: xmail@xmailserver.org Subject: [xmail] Re: Filter attachments before mailproc.tab On Thu, 25 Sep 2008, fred wrote: Hi everyone, I have a question regarding attachments and redirects with mailproc.tab. Here is the problem; [EMAIL PROTECTED] has a mailproc which redirects to [EMAIL PROTECTED] If someone sends an email WITH A PROHIBITED ATTACHMENT extension (such as ..exe, .bat, etc, etc) to [EMAIL PROTECTED], gmail refuses the email saying the attachment is blocked, that is fine. How can I block and stop the redirection of emails with such extensions before mailproc.tab kicks in? You know that mailproc.tab supports filter? And that a filter return code can stop the current mailproc.tab processing? - Davide - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: Filter attachments before mailproc.tab
On Fri, 26 Sep 2008, fred wrote: Thanks for the reply Davide. Yes I know mailproc.tab supports filters, but the problem is activating and managing the mailprocs if you have numerous users, I will just automate this task by making another script. You know that the domain's mailproc.tab is pre-pended to the user's one? - Davide - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: Filter attachments before mailproc.tab
Better place is mailproc.tab file in any cases as you are sure you will = run the attachment check only for the needed users/redirects (can easily = change for a user when not at all redirected to google, so only mailproc need changes for the redirect and removing the filter, ...) In fact mailproc.tab file or filters.in.tab file will depend of the = number of account needed need the filter to run. If your xmail accounts don't change too much (relatively static, major changes only when creating new accounts, ...) I think adding the script = call to each individual existing mailproc.tab is only one time consuming (a little batch that add the filter line in each user mailproc.tab = files that need the filter is not more difficult to write that the filter.in script, so no real need to do many changes by hand, so not too much = time consuming) and you server will be finally happy to not run a filters.in.tab script every time but that will do real job for some mails (depends also of = the number of mails received by these accounts). Sure, if 90% accounts need the filter, so filters.in.tab file is the = place. Sure, if only 5% accounts need the filter, but they receive 90% of the = mails your server receive, then filter.in.tab file is the right place :) It's only up to you to do the choice depending of your real situation (number of accounts affected, percent of mail they receive, ...) :) In any cases, I allways prefer reporting job at last stage as possible, = I'm then sure that it runs only when really needed. (but it's my point of vue) Francis -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de fred Envoy=E9 : jeudi 25 septembre 2008 16:20 =C0 : xmail@xmailserver.org Objet : [xmail] Filter attachments before mailproc.tab Hi everyone, =20 I have a question regarding attachments and redirects with=20 mailproc.tab. =20 Here is the problem;=20 =20 [EMAIL PROTECTED] has a mailproc which redirects to=20 [EMAIL PROTECTED] =20 If someone sends an email WITH A PROHIBITED ATTACHMENT=20 extension (such as ..exe, .bat, etc, etc) to [EMAIL PROTECTED], gmail refuses the=20 email saying the attachment is blocked, that is fine. =20 How can I block and stop the redirection of emails with such = extensions before mailproc.tab kicks in? =20 I understand that I must write a filter, that is no problem,=20 but where to place it? =20 I think the filter order is: =20 1. filters.pre-data.tab 2. filters.post-rcpt.tab 3. filters.post-data.tab 4. filters.in.tab 5. mailproc.tab =20 Of course I could place it in filters.in.tab but it would be=20 ran everytime someone receives a message, which is not efficient and I think=20 would slow down the server, I would need it run only if someone has a=20 mailproc.tab. =20 Can someone point me to the right direction? I think placing the = script inside mailproc.tab for each of my users that has one would be=20 a pain in the ass. =20 Maybe the best solution would be to place it inside=20 filters.in.tab and do a check like: =20 If(file_exists(/var/MailRoot/domains/mydomain.com/user/mailproc.tab))= { //Script here } =20 What does the gurus think? =20 Thanks in advance =20 -fred =20 =20 - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]
[xmail] Re: Filter attachments before mailproc.tab
On Thu, 25 Sep 2008, fred wrote: Hi everyone, I have a question regarding attachments and redirects with mailproc.tab. Here is the problem; [EMAIL PROTECTED] has a mailproc which redirects to [EMAIL PROTECTED] If someone sends an email WITH A PROHIBITED ATTACHMENT extension (such as ..exe, .bat, etc, etc) to [EMAIL PROTECTED], gmail refuses the email saying the attachment is blocked, that is fine. How can I block and stop the redirection of emails with such extensions before mailproc.tab kicks in? You know that mailproc.tab supports filter? And that a filter return code can stop the current mailproc.tab processing? - Davide - To unsubscribe from this list: send the line unsubscribe xmail in the body of a message to [EMAIL PROTECTED] For general help: send the line help in the body of a message to [EMAIL PROTECTED]