| 1 | HOW TO CONFIGURE SQUIRREL-MAIL WITH RUSSIAN APACHE |
| 2 | -------------------------------------------------- |
| 3 | |
| 4 | This text is available in Russian at |
| 5 | http://www.mricon.com/SM/russian_apache.html |
| 6 | |
| 7 | This howto is for people who are using Russian Apache and |
| 8 | who use charsets other than koi8-r for their source documents. |
| 9 | If you _do_ use KOI8-R as default encoding for all your source |
| 10 | documents, you don't need to do anything. Otherwise, here's |
| 11 | a very simple way to make this work. |
| 12 | |
| 13 | The general idea is to tell Russian Apache that everything |
| 14 | residing in the squirrel-mail directory is in koi8-r. This |
| 15 | way all input submitted by users will be automagically |
| 16 | converted by mod_charset from anything into koi8-r. |
| 17 | Squirrel-Mail will then correctly stamp it with |
| 18 | "Charset=koi8-r" and send off without any additional |
| 19 | conversion. |
| 20 | |
| 21 | There are two equally efficient ways to do it: |
| 22 | |
| 23 | |
| 24 | 1. THE HTTPD.CONF WAY. |
| 25 | ----------------------- |
| 26 | |
| 27 | In your httpd.conf, add the following declaration for the |
| 28 | server that handles the squirrel-mail: |
| 29 | |
| 30 | <Directory /path/to/your/squirrel-mail> |
| 31 | CharsetSourceEnc koi8-r |
| 32 | </Directory> |
| 33 | |
| 34 | Warning: If you use CharsetByExtension elsewhere, it will |
| 35 | override the CharsetSourceEnc directive. In that case you will |
| 36 | have to put this directive instead of the above: |
| 37 | |
| 38 | <Directory /path/to/your/squirrel-mail> |
| 39 | CharsetByExtension koi8-r .php |
| 40 | </Directory> |
| 41 | |
| 42 | It is advised to use the CharsetSourceEnc declaration instead |
| 43 | of the other one. Use the CharsetByExtension only if the |
| 44 | other fails. |
| 45 | |
| 46 | 2. THE .HTACCESS WAY (PREFERRED). |
| 47 | ---------------------------------- |
| 48 | |
| 49 | Create a .htaccess file in your squirrel-mail directory. In it, |
| 50 | simply put this line: |
| 51 | |
| 52 | CharsetSourceEnc koi8-r |
| 53 | |
| 54 | That's it. Note the warning about the ChatsetByExtension directive |
| 55 | in the previous section. If you used CharsetByExtension declaration |
| 56 | elsewhere and it's active for this server, then you will have to |
| 57 | put this line in your .htaccess instead: |
| 58 | |
| 59 | CharsetByExtension koi8-r .php |
| 60 | |
| 61 | But again, this is only if the CharsetSourceEnc fails. |
| 62 | |
| 63 | I mark this method "Preferred" simply because you don't have to |
| 64 | restart your server if you use .htaccess. However, if you've |
| 65 | specified "AllowOverride None" in your Server config, then you |
| 66 | will have to go with "the httpd.conf way". |
| 67 | |
| 68 | |
| 69 | If you have any questions or problems, please address them to |
| 70 | the squirrelmail-list@lists.sourceforge.net to have them |
| 71 | promptly answered. ;) |
| 72 | |
| 73 | -- |
| 74 | Konstantin Riabitsev (a.k.a. Graf) |
| 75 | graf@relhum.org |