• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

procmail/H07-May-2022-415339

COPYRIGHTH A D07-Jul-2004860 2619

GPLH A D07-Jul-200417.6 KiB341282

READMEH A D07-Jul-20044.1 KiB9170

README.sslH A D07-Jul-20041.5 KiB3420

auth-ldap.plH A D07-Jul-20045.6 KiB236183

auth-pop.plH A D07-Jul-20041.6 KiB7553

auth.plH A D07-Jul-20045.7 KiB238187

changelogH A D07-Jul-200410.7 KiB216183

custom.plH A D07-Jul-20042.8 KiB10177

funclib.cyrusH A D07-Jul-20044 KiB192174

funclib.plH A D03-May-20223.3 KiB191156

ldapextras.confH A D07-Jul-200412.1 KiB34034

ldapextras.conf.atH A D07-Jul-200413.7 KiB387360

ldapextras.plH A D07-Jul-200439.6 KiB1,208863

ldapextras.pl.atH A D07-Jul-200446.8 KiB1,359979

readme.procmailH A D07-Jul-20042.4 KiB5942

websieve.confH A D07-Jul-20046.4 KiB21280

websieve.plH A D03-May-202272.6 KiB2,5422,095

README

1Web based Cyrus IMAP user admin client.
2
3Installation:
4
5necessary files:
6
7IMAP::Admin-1.4.1.tar.gz or newer (used by funclib.pl version 2.4)
8*NOTE* : Don't use version 1.5.1 of IMAP::Admin.  There is a bug in the
9getquotaroot function that causes a timeout.
10
11perlsieve-0.4.9b.tar.gz  NOTE: Adds SSL functions - fixes scripts listing
12			 - fixed SSL connection problem
13funclib.pl (version 2.4)
14funclib.cyrus (version 1.1 - optional - uses Cyrus 2.x.x builtin perl modules)
15	      IMAP::Admin and perlsieve not required if using funclib.cyrus.
16	      NOTE:  You must have the Cyrus 2.x.x perl modules installed.
17websieve.pl (version 0.61)
18websieve.conf ( for versions 0.57+)
19readme.txt
20auth.pl (optional - change passwords on an ldap server)
21auth-pop.pl (optional - change passwords on Qualcomm poppasswd server)
22allfiles.tar.gz (all the files above)
23
24Other files:
25	websieve-test.pl: alpha version 0.59-test of websieve
26	websieve.frames.tar.gz:
27	- This is an example setup of using websieve.pl in a customized frame based menu environment.
28
29- untar,make and install the following modules (if required):
30(eg. after untaring the modules  change to the untarred directory, run 'perl Makefile.pl', then 'make', then 'make install' to complete the installation.)
31
32IMAP::Admin from Eric Estabrooks (available locally or on CPAN)
33IMAP::Sieve (available locally - from Alain Turbide, filename: perlsieve.x.x.tar.gz)
34
35Note: Version 0.4x+ of websieve requires version 0.4.x+ of IMAP::Sieve.
36
37- copy websieve.pl, websieve.conf and funclib.pl to your cgi directory
38- if using ldap for password storage you can also copy auth.pl to your cgi directory and modify the parameters at the start of the module.
39  (Alternatively you could use your own custom auth.pl or if using the Qualcomm
40poppassd daemon you can use auth-pop.pl)
41- change the execute permissions and ownerships of the
42  scripts (eg: chmod 555 websieve.pl)
43- modify websieve.conf to suit your preferences
44- to use this script you must have the timsieved daemon setup as per the
45  install instructions in the Cyrus distribution.
46
47Useage:
48
49Point your browser to websieve.pl eg: http://webhost/cgi-bin/websieve.pl.
50You will then be greeted with a login screen.  Enter your
51Cyrus UID and PASS and you should see the script entry screen
52as well as your current mail quota, acl's.
53Please note that only plain text (LOGIN) authorization is supported at this
54time.  I also recommend that you run this on an SSL enabled server
55to avoid sending passwords in the clear. If you need to run the script
56on a separate server then the mail server, please remember that the passwords are sent in clear text.  To ensure better security in such scenerio's I recommend using SSL to encrypt the session to the Imap and Sieve daemon's.  I've successfully used Stunnel in these cases.
57
58This cgi module allows full user control of sieve script creation,
59as well as acl settings for mailboxes.  It also displays the
60current available quota. The basic setting is for easy script
61creation with no scripting involved.  The advanced setting allows
62direct script access and editing. Please note that the "basic" mode does not
63use all of Sieve's features.  If you require more functionality you can use
64the "advanced" mode or you can drop me an email if you would like a particular
65feature added to "basic" mode.
66
67
68NOTE1:
69
70To use the "vacation" or "reply with" features of sieve you must
71be running deliver in LMTP mode otherwise you will not be able to
72save scripts on the server if you try to use these features.
73Please consult the Cyrus IMAP sieve docs for more info on the Sieve
74language and setting up deliver for LMTP.
75
76
77NOTE2:
78
79This is BETA software.  There probably are quite a few bugs yet
80to fix but it is mostly functional here.
81I am not responsible for any loss or damage that can occur to your
82system from the use of these scripts.  It is free software and
83you may do as you wish with it.  If you make any modifications to it
84or need changes made, let me know and I'll apply them to my source
85for others to use if possible.
86There is still a lot I want to do with it as well as clean up the
87source (It's a bit rough at this time - still learning PERL).
88
89Alain Turbide
90
91

README.ssl

1SSL encryption for remote servers with Websieve
2Method 1
3
4You can turn on SSL connections by setting the variables $useimapSSS=1 and $usesieveSSL=1 in websieve.conf.  Also ensure you set the correct SSL'ized ports for $imapport and $sieveports.  You may instead if you have more then one server enter the correct settings in hash %server_hosts in websieve.conf.
5This method uses the SSL option in the IMAP::Admin and IMAP::Sieve perl modules.
6You must also have Openssl, Net_SSLeay, and IO::Socket::SSL installed on your system.  See the IMAP::Admin SSL section for more info.
7
8
9Method 2
10
11This is an example setup on using stunnel to encrypt websieve connections
12to remote imap/sieve servers using an ssl session.
13
14
15Imap server
16
17stunnel -d imaps -r localhost:imap
18stunnel -d sieves -r localhost:sieve
19
20Websieve client
21
22stunnel -c -d localimapport -r imapserver:imaps
23stunnel -c -d localsieveport -r imapserver:sieves
24
25Where "sieves" is a tcp port of your choice since there is no standard SSL'ized
26sieve port as far as I know. Just make sure it does'nt conflict with an existing port.
27
28You also have to make sure to point websieve.conf $sieveport->localsieveport and
29$imapport->localimapport.  Those 2 ports are also arbitrary ports on the local machine of your choosing.  Again make sure they don't conflict to anything else and also restrict them (tcp wrappers - host.deny, hosts.allow) to access from the localhost only.
30
31See the Stunnel docs for more info.
32
33You can find all the required modules in directory /websieve/ssl
34

readme.procmail

1Websieve for Procmail setup.
2
3Here's what you need to do to get websieve to generate procmail rules.
4
5Copy filter.pl, auth.pl and procmail.cyrus (from the procmail subdirectory)
6to a directory of your choice.
7modify filter.pl's parameters to reflect your local settings as well as
8the location of your auth.pl, and user directory structure to store
9your user procmail rules.  Don't forget to also set the adminuid and
10adminpass of an LDAP user that has read access to the 'matchingrules'
11LDAP attribute of all users.
12You can copy "procmail.cyrus" to /etc.
13
14Create the directory structure where your users recipes will be stored.
15Remember, it must be writeable by the "cyrus" user.
16
17Setup your MTA to deliver to procmail.  This will vary if you're using
18sendmail or other MTA.  I use postfix so I'll describe that setup:
19
20Set the following parameters in the corresponding postfix config files:
21
22in main.cf:
23mailbox_transport = procmail
24
25in master.cf:
26procmail  unix	-	n	n	-	-	pipe
27     flags=R user=cyrus argv=/usr/bin/procmail -p /etc/procmail.cyrus CYUSER=${user} EXTENSION=${extension} RECIP=${recipient}
28
29
30- change the location of the procmail.cyrus file to your location setup.
31
32Set $useprocmail=1 and in websieve.conf (at the bottom in the supplied copy)
33Also set the other parameters to suit your location.
34
35Note:  IMPORTANT:  Don't forget to set the secret key in the
36X-Customfilters: line to match the one in websieve.conf
37
38Theory of Operation
39
40- when a rule is created and saved, the pseudo rulesets are saved into
41the users 'matchingrules' LDAP attribute.
42- an email is sent to the 'cyrus' user containing the user id of the user,
43and a secret key to identify the server.
44- the email is passed through the procmail.cyrus rc file and is caught by
45the first rule for the 'cyrus' user.  Upon a match it pipes the email to
46the "filter.pl" program which extracts the uid and then connects to the
47LDAP server, and extracts the pseudo code from the user's 'matchingrules'
48attribute.
49- filter.pl then converts the pseudo code to an actual procmail recipe
50file, creates the users vacation messages, reply files if needed in the
51common recipe directory.  This filter only runs when a user submits
52a change to his rules.
53
54- any emails received go through the procmail.cyrus recipe file which then
55looks for a matching user recipe file and if found processes that users
56recipes or simply calls deliver to send the mail to the user's inbox.
57
58
59