Bug 24545: Fix license statements
[koha.git] / misc / cronjobs / CONFIGURE.gmail
1 =============================
2 Installation Guide for Configuring a Koha Server to Use a Gmail Account as its SMTP Server
3 =============================
4
5 Copyright (C) 2010 Foundations Bible College (http://www.foundations.edu)
6
7 Koha is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 Koha is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20 Author: Chris Nighswonger (cnighswonger AT foundations DOT edu
21
22 Feedback/bug reports: Koha Developer's List:
23 http://lists.koha.org/mailman/listinfo/koha-devel
24
25 This document last modified: 13 February 2010
26
27 Configuration Instructions
28 =============================
29
30 To use your gmail account as an SMTP server you will need to execute the following from a shell prompt.
31
32 (These steps are taken from http://jonspriggs.posterous.com/use-gmails-smtp-gateway-using-the-command-lin)
33
34 sudo apt-get install openssl xinetd
35
36 sudo tee /usr/bin/gmail-smtp <<EOF >/dev/null
37 #!/bin/sh
38 # Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guide
39 /usr/bin/openssl s_client -connect smtp.gmail.com:465 -quiet 2>/dev/null
40 EOF
41 sudo chmod +x /usr/bin/gmail-smtp
42
43 sudo tee /etc/xinetd.d/gmail-smtp <<EOF >/dev/null
44 # default: on
45 # description: Gmail SMTP wrapper for clients without SSL support
46 # Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guide
47 service gmail-smtp
48 {
49     disable         = no
50     bind            = localhost
51     port            = 10025
52     socket_type     = stream
53     protocol        = tcp
54     wait            = no
55     user            = root
56     server          = /usr/bin/gmail-smtp
57     type            = unlisted
58 }
59 EOF
60 sudo /etc/init.d/xinetd reload
61
62 Edit Mail/Sendmail.pm and set the port to 10025. (Note: This file will be located where ever your Perl libraries are.)
63
64 Script Setup Instructions
65 =============================
66
67 After successfully executing the above steps, you will need to run the process_message_queue.pl script with the
68 following syntax:
69
70 perl process_message_queue.pl -u librarian@foo.tld -p supersecret -m LOGIN
71
72 This, of course, assumes that you have all other scripts in place and functional to generate notices.
73
74 Misc Helpful Notes
75 =============================
76
77 NOTE: In order to debug problems, you can set the debug level in Mail/Sendmail.pm to 11 which will give plenty of
78 commentary to STDOUT.