| 1 |
Installation instructions for og2list
|
| 2 |
-------------------------------------
|
| 3 |
|
| 4 |
0) Currently this only works with MySQL as database backend and Exim
|
| 5 |
(http://exim.org/) or Postfix (http://posrfix.org) as MTA. Exim
|
| 6 |
needs to have MySQL support compiled in. For testing, you can instead
|
| 7 |
of MySQL support use a provided script. See mail-in.html for details.
|
| 8 |
|
| 9 |
See the exim.INSTALL and postfix.INSTALL guides for help.
|
| 10 |
|
| 11 |
The required version of MySQL is 4.1 and up.
|
| 12 |
|
| 13 |
Installation instructions for exim with MySQL support can be found
|
| 14 |
here: http://civicspacelabs.org/home/node/16713
|
| 15 |
|
| 16 |
The current install instructions assume that your exim will handle
|
| 17 |
the mail for only one Drupal site.
|
| 18 |
|
| 19 |
The Perl files used might also work with other MTAs.
|
| 20 |
|
| 21 |
1) Enable the module in the Drupal module selection screen.
|
| 22 |
This will also install the database tables. Note that the perl
|
| 23 |
scripts do not support database prefixes, so oglist doesn't as well.
|
| 24 |
|
| 25 |
There is only one setting on administer » settings » og2list
|
| 26 |
There you can set forbidden mailing list names.
|
| 27 |
|
| 28 |
You will also need the following modules:
|
| 29 |
- og.module
|
| 30 |
- og_forum.module
|
| 31 |
- forum.module
|
| 32 |
- taxonomy.module
|
| 33 |
- optionally upload.module
|
| 34 |
|
| 35 |
Make sure a vocabulary for the forum does exist.
|
| 36 |
You can check for it on administer » forums.
|
| 37 |
|
| 38 |
Make sure you observe the installation instructions for og.module.
|
| 39 |
Enable it at administer » settings » og.
|
| 40 |
|
| 41 |
Assign appropriate permissions for the newly installed modules on
|
| 42 |
administer » access control.
|
| 43 |
|
| 44 |
You should now be able to create a group in "create content" » group.
|
| 45 |
There should be field for a mailing list address on that form.
|
| 46 |
|
| 47 |
Note: og2list.module needs to have a higher weight in the system
|
| 48 |
table than both og.module and upload.module. If you install og2list
|
| 49 |
after og and don't change the weight of upload module, you shoudl
|
| 50 |
be safe.
|
| 51 |
|
| 52 |
3) Create a new user "og2list". Add this user to the trusted users at
|
| 53 |
the top of your exim.conf file. Put the Perl files and the
|
| 54 |
mail.conf from the package into this user's home directory.
|
| 55 |
|
| 56 |
4) Edit the file mail.conf to match your needs.
|
| 57 |
$mail_domain = "localhost"; <== this should be the domain
|
| 58 |
you use for sending mail.
|
| 59 |
$dbase = ""; <== name of your Drupal database
|
| 60 |
$dbhost = "localhost"; <== name of your database server
|
| 61 |
$dbuser = ""; <== name of your database user
|
| 62 |
$dbauth = ""; <== the user's password for your database server
|
| 63 |
|
| 64 |
5) Extract the documentation for mail-in.pl by running
|
| 65 |
|
| 66 |
pod2html mail-in.pl > mail-in.html
|
| 67 |
|
| 68 |
Read it, configure your Exim mail server accordingly, or ask your
|
| 69 |
systems administrator to do it for you..
|
| 70 |
|
| 71 |
6) Set up a cron job that accesses the file mail-out.pl in regular
|
| 72 |
intervalls.
|
| 73 |
|
| 74 |
Example:
|
| 75 |
*/2 * * * * /home/og2list/mail-out.pl
|
| 76 |
|
| 77 |
The user that executes the script needs permissions to read the
|
| 78 |
configuration file and to set an arbitrary envelope-sender when
|
| 79 |
sending mails. For Exim this means the user has to be listed
|
| 80 |
as "trusted user" in exim.conf (see 3)). It is best to let the
|
| 81 |
cronjob belong to the user you created in step 3.
|
| 82 |
|
| 83 |
7) Make sure your Drupal cron job runs often enough. The cronjob will
|
| 84 |
take the mail that Exim put into the og2list database tables and make
|
| 85 |
Drupal nodes and comments from it.
|
| 86 |
|
| 87 |
Make sure that no unauthorized people can access cron.php and start
|
| 88 |
cronjobs that might confuse our own runnign cronjobs. You can do so
|
| 89 |
by only allowing your own server to access cron.php in the
|
| 90 |
.htaccess file:
|
| 91 |
|
| 92 |
<Files cron.php>
|
| 93 |
Order deny,allow
|
| 94 |
Deny from all
|
| 95 |
Allow from 123.456.78.90
|
| 96 |
</Files>
|
| 97 |
|
| 98 |
Fill in the IP address from the server that is allowed to access
|
| 99 |
cron.php.
|
| 100 |
|
| 101 |
8) If you want to use og2list with mailcommand, you will need to
|
| 102 |
install that, too. In administer » settings » mailcommand,
|
| 103 |
define a mail address that points to the address you want to use
|
| 104 |
for subscriptions by mail (example:
|
| 105 |
administration@mail.doma.in). Exclude that mail adress from og2list
|
| 106 |
usage as described in 2). Execute the following SQL statement:
|
| 107 |
|
| 108 |
insert into og2list_groups (nid, recipient) values (0, 'administration');
|
| 109 |
|
| 110 |
'administration' is the local part of the chosen administration address.
|
| 111 |
|
| 112 |
Debugging - or what to do if something does not work
|
| 113 |
----------------------------------------------------
|
| 114 |
|
| 115 |
A) No mail is recieved by the group
|
| 116 |
|
| 117 |
0) Make sure exim is running and is the MTA for the domain you
|
| 118 |
are trying to send to.
|
| 119 |
|
| 120 |
1) Check in your exim configuration that mail for the domain you are
|
| 121 |
trying to send to is accepted.
|
| 122 |
|
| 123 |
2) Make sure you created an organic group with a mailing list.
|
| 124 |
|
| 125 |
3) Make sure you are an approved member of the group you are trying to
|
| 126 |
send to. That means the mail address you are sending from has to
|
| 127 |
match the one used for your Drupal account.
|
| 128 |
|
| 129 |
4) Check you exim log for anomalities.
|
| 130 |
|
| 131 |
5) Try to debug from the commandline according to the documentation in
|
| 132 |
mail-in.pl (-d switch):
|
| 133 |
|
| 134 |
./mail-in.pl -d -f sender -t recipient < some_mail.txt
|
| 135 |
|
| 136 |
sender is an email address of a member of the group which has the
|
| 137 |
local email 'recipient'. Test mails can be found in the testmails
|
| 138 |
directory.
|
| 139 |
|
| 140 |
B) No mail is sent to subscribers
|
| 141 |
|
| 142 |
0) Check that your Drupal cronjob is running. Try accessing your
|
| 143 |
installation's cron.php file from your browser.
|
| 144 |
|
| 145 |
1) Make sure that the group's mailing list is not disabled.
|
| 146 |
|
| 147 |
2) Check if exim is running.
|
| 148 |
|
| 149 |
3) Do the settings in mail.conf match your database and exim
|
| 150 |
configuration?
|
| 151 |
|
| 152 |
4) Try to run mail-out.pl from the commandline. An error message
|
| 153 |
should be printed. Show it to your system administrator.
|
| 154 |
|
| 155 |
5) Check you exim log for anomalities.
|
| 156 |
|
| 157 |
|