/[smecontribs]/rpms/smeserver-mailsorting/contribs7/smeserver-mailsorting-1.2-sortOrder.patch
ViewVC logotype

Annotation of /rpms/smeserver-mailsorting/contribs7/smeserver-mailsorting-1.2-sortOrder.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sun Mar 22 09:03:18 2009 UTC (15 years, 2 months ago) by dungog
Branch: MAIN
CVS Tags: smeserver-mailsorting-1_2-40_el4_sme, smeserver-mailsorting-1_2-39_el4_sme, smeserver-mailsorting-1_2-38_el4_sme, smeserver-mailsorting-1_2-32_el4_sme, smeserver-mailsorting-1_2-35_el4_sme, HEAD
maildrop filterorder

1 dungog 1.1 diff -urN smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.mailfilter/00setup smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.mailfilter/00setup
2     --- smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.mailfilter/00setup 1970-01-01 10:00:00.000000000 +1000
3     +++ smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.mailfilter/00setup 2009-03-22 19:53:56.000000000 +1100
4     @@ -0,0 +1,16 @@
5     +{
6     + # vim: ft=perl:
7     +
8     + use esmith::AccountsDB;
9     + our $adb = esmith::AccountsDB->open_ro or die "Couldn't open AccountsDB";
10     +
11     + $user = $adb->get($USERNAME) or die "No user $USERNAME in AccountsDB";
12     + %props = $user->props;
13     +
14     + our $zarafa1 = $props{zarafa} || 'disabled1';
15     + our $zarafa2 = ${'zarafa-server'}{GlobalForward} || 'disabled2';
16     + our $EmailForward = $props{EmailForward} || '';
17     + our $ForwardAddress = $props{ForwardAddress} || '';
18     +
19     + $OUT = '';
20     +}
21     diff -urN smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.mailfilter/90default smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.mailfilter/90default
22     --- smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.mailfilter/90default 2009-03-22 18:45:23.000000000 +1100
23     +++ smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.mailfilter/90default 2009-03-22 19:34:40.000000000 +1100
24     @@ -1,5 +1,36 @@
25     {
26     + if ($qmail{FilterOrder})
27     + {
28     +
29     + # honour EmailForward
30     + my $EmailForward = $props{EmailForward} || '';
31     + my $ForwardAddress = $props{ForwardAddress} || '';
32     +
33     + if ($EmailForward eq 'forward')
34     + {
35     + $OUT .= "\n";
36     + $OUT .= "log \"--- forward mail ---------------- \"\n";
37     + $OUT .= "to \"!$ForwardAddress\"";
38     + }
39     + elsif ($EmailForward eq 'both')
40     + {
41     + $OUT .= "\n";
42     + $OUT .= "log \"--- to the inbox and forward ----- \"\n";
43     + $OUT .= "cc Maildir\n";
44     + $OUT .= "to \"!$ForwardAddress\"";
45     + }
46     + else
47     + {
48     + $OUT .= "\n";
49     + $OUT .= "log \"--- to the inbox ----------------- \"\n";
50     + $OUT .= "to Maildir";
51     + }
52     +
53     + }
54     + else
55     + {
56     $OUT .= "\n";
57     $OUT .= "log \"--- to the inbox ----------------- \"\n";
58     - $OUT .= "to Maildir\n";
59     + $OUT .= "to Maildir\n";
60     + }
61     }
62     diff -urN smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.procmailrc/00setup smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.procmailrc/00setup
63     --- smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.procmailrc/00setup 2009-03-22 18:45:23.000000000 +1100
64     +++ smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.procmailrc/00setup 2009-03-22 19:34:40.000000000 +1100
65     @@ -9,6 +9,8 @@
66    
67     our $zarafa1 = $props{zarafa} || 'disabled1';
68     our $zarafa2 = ${'zarafa-server'}{GlobalForward} || 'disabled2';
69     + our $EmailForward = $props{EmailForward} || '';
70     + our $ForwardAddress = $props{ForwardAddress} || '';
71    
72     $OUT = '';
73     }
74     diff -urN smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.qmail/50Filter smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.qmail/50Filter
75     --- smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.qmail/50Filter 1970-01-01 10:00:00.000000000 +1000
76     +++ smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.qmail/50Filter 2009-03-22 19:34:40.000000000 +1100
77     @@ -0,0 +1,29 @@
78     +{
79     + if ($qmail{FilterOrder})
80     + {
81     + if ($USERNAME)
82     + {
83     + return "# Procmail/Maildrop disabled for admin"
84     + if ($USERNAME eq 'admin');
85     + }
86     +
87     + if ($props{MailFilter})
88     + {
89     + my $MailFilter = $props{MailFilter} || 'on';
90     +
91     + return '# Procmail/Maildrop disabled for this user'
92     + if ($MailFilter eq 'bypass');
93     + }
94     +
95     + if ($qmail{FilterType})
96     + {
97     + return '| /usr/bin/procmail ~/.procmailrc ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;'
98     + if ($qmail{FilterType} eq 'procmail');
99     +
100     + return '| /usr/bin/maildrop ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;'
101     + if ($qmail{FilterType} eq 'maildrop' );
102     + }
103     +
104     + return '# Procmail/Maildrop disabled for all users'
105     + }
106     +}
107     diff -urN smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.qmail/76Filter smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.qmail/76Filter
108     --- smeserver-mailsorting-1.2.orig/root/etc/e-smith/templates-user/.qmail/76Filter 2009-03-22 18:45:23.000000000 +1100
109     +++ smeserver-mailsorting-1.2/root/etc/e-smith/templates-user/.qmail/76Filter 2009-03-22 19:34:40.000000000 +1100
110     @@ -1,4 +1,10 @@
111     {
112     + if ($qmail{FilterOrder})
113     + {
114     + return '# qmail FilterOrder enabled'
115     + }
116     + else
117     + {
118     if ($USERNAME)
119     {
120     return "# Procmail/Maildrop disabled for admin"
121     @@ -23,4 +29,5 @@
122     }
123    
124     return '# Procmail/Maildrop disabled for all users'
125     + }
126     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed