Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision | ||
centos:mail_c6:horde_8 [21.02.2013 17:39. ] – Seite neu angelegt django | centos:mail_c6:horde_8 [05.08.2014 18:46. ] – Filter-Regeln (sieve) - ingo #horde #sieve #dovecot #centos7 django | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Filter-Regeln (sieve) - ingo ====== | ||
+ | Als letzte [[http:// | ||
+ | Informationen zu Installation und Konfiguration findet amn auch auf der offiziellen [[http:// | ||
+ | |||
+ | ===== Installation ===== | ||
+ | Wie auch schon bei der [[centos: | ||
+ | |||
+ | Das Programmpaket holen wir und nun erst einmal auf unseren Web-Server. | ||
+ | # pear install -a -B horde/ingo | ||
+ | |||
+ | Starting to download ingo-3.0.2.tgz (1,488,898 bytes) | ||
+ | ......................................................................done: | ||
+ | install ok: channel:// | ||
+ | |||
+ | ===== vorbereitende Konfiguration ===== | ||
+ | Die Konfiguration des Moduls **Ingo** erfolgt, wie auch bereits bei der Grundkonfiguration des Horde-Frameworks, | ||
+ | Zunächst kopieren wir uns die Vorlagedateien, | ||
+ | # cp -a / | ||
+ | |||
+ | # cp -a / | ||
+ | Anschließend legen wir noch die besagte Backup-Datei für die Konfiguration an. | ||
+ | # touch / | ||
+ | |||
+ | Zum Schluß weisen wir noch die Datei und Besitzrechte für die Konfigurationsdatei- und dessen Verzeichnis zu. | ||
+ | # chown -R root:apache / | ||
+ | |||
+ | # chmod g+w -R / | ||
+ | |||
+ | ===== Konfiguration des Backend-/ | ||
+ | Neben der Konfiguration der Anwendung selbst, müssen wir der Anwendung **Ingo** auch noch mitteilen, wie es sich zum **MDA**((**M**ail **D**elivery **S**ystem)) also unserem IMAP-Server verbinden soll. | ||
+ | |||
+ | <WRAP round tip>Die mitgelieferte Konfigurationsdatei **backends.php** lassen wir unangetastet. Die Konfiguration nehmen wir über die zuvor kopierte Datei **backends.local.php** vor.</ | ||
+ | |||
+ | Als erstes deaktivieren wir den ersten Standardeintrag und ergänzen dann den Eintrag für die Anbindung an unseren Dovecot-IMAP-Server. | ||
+ | # vim / | ||
+ | <file php / | ||
+ | /** | ||
+ | * Ingo works purely on a preferred mechanism for server selection. There are | ||
+ | * a number of properties that you can set for each backend: | ||
+ | * | ||
+ | * IMPORTANT: DO NOT EDIT THIS FILE! | ||
+ | * Local overrides MUST be placed in backends.local.php or backends.d/ | ||
+ | * If the ' | ||
+ | * use backends-servername.php. | ||
+ | * | ||
+ | * Example configuration file that enables the Sieve backend in favor of the | ||
+ | * IMAP backend: | ||
+ | * | ||
+ | * < | ||
+ | * <?php | ||
+ | * $backends[' | ||
+ | * $backends[' | ||
+ | * </ | ||
+ | * | ||
+ | * disabled: (boolean) If true, the config entry is disabled. | ||
+ | * | ||
+ | * params: (array) An array containing any additional information that the | ||
+ | | ||
+ | * | ||
+ | * preferred: (string) This is the field that is used to choose which server | ||
+ | | ||
+ | | ||
+ | | ||
+ | * | ||
+ | * script: (string) The type of script driver this server uses. Options: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * | ||
+ | * scriptparams: | ||
+ | | ||
+ | * | ||
+ | * shares: (boolean) Some drivers support sharing filter rules with other | ||
+ | | ||
+ | | ||
+ | | ||
+ | * | ||
+ | * transport: (string) The transport driver to use to store the script on the | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | |||
+ | /* IMAP Example */ | ||
+ | $backends[' | ||
+ | // ENABLED by default | ||
+ | // Django : 2013-02-04 | ||
+ | // default: ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | /* Maildrop Example */ | ||
+ | $backends[' | ||
+ | // Disabled by default | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | // Hostname of the VFS server | ||
+ | ' | ||
+ | // Name of the maildrop config file to write | ||
+ | ' | ||
+ | // The path to the .mailfilter filter file, defaults to the filters' | ||
+ | // owner' | ||
+ | // You can use the following variables: | ||
+ | // %u = name of the filters' | ||
+ | // %d = domain name of the filters' | ||
+ | // %U = the transport ' | ||
+ | // Example: | ||
+ | // '/ | ||
+ | // This would be translated into: | ||
+ | // '/ | ||
+ | // ' | ||
+ | |||
+ | // VFS: FTP example | ||
+ | // The VFS driver to use | ||
+ | ' | ||
+ | // Port of the VFS server | ||
+ | ' | ||
+ | // Specify permissions for uploaded files if necessary: | ||
+ | // ' | ||
+ | |||
+ | // VFS: SSH2 example | ||
+ | // The VFS driver to use | ||
+ | // ' | ||
+ | // Port of the VFS server | ||
+ | // ' | ||
+ | ), | ||
+ | ' | ||
+ | ' | ||
+ | // Any arguments passed to the mailbot command. The -N flag (to not | ||
+ | // include the original, quoted message content has been added with | ||
+ | // Maildrop 2.5.1/ | ||
+ | ' | ||
+ | // What path style does the IMAP server use [' | ||
+ | ' | ||
+ | // Strip ' | ||
+ | // scripts? | ||
+ | ' | ||
+ | // An array of variables to append to every generated script. | ||
+ | // Use if you need to set up specific environment variables. | ||
+ | ' | ||
+ | // Example for the $PATH variable | ||
+ | // ' | ||
+ | ) | ||
+ | ), | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | /* Procmail Example */ | ||
+ | $backends[' | ||
+ | // Disabled by default | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | // Hostname of the VFS server | ||
+ | ' | ||
+ | // Name of the procmail config file to write | ||
+ | ' | ||
+ | // The path to the .procmailrc filter file, defaults to the filters' | ||
+ | // owner' | ||
+ | // You can use the following variables: | ||
+ | // %u = name of the filters' | ||
+ | // %U = the ' | ||
+ | // Example: | ||
+ | // '/ | ||
+ | // This would be translated into: | ||
+ | // '/ | ||
+ | // ' | ||
+ | |||
+ | // If procmail needs an external command for mail delivery, you | ||
+ | // can specify it below. You can also set a prefix for the mailbox name | ||
+ | // eg. for / | ||
+ | // ' | ||
+ | // ' | ||
+ | |||
+ | // if the GNU utilities cannot be found in the path | ||
+ | // or have different names, you can specify their location below | ||
+ | // ' | ||
+ | // ' | ||
+ | // ' | ||
+ | |||
+ | // VFS: FTP example | ||
+ | // The VFS driver to use | ||
+ | ' | ||
+ | // Port of the VFS server | ||
+ | ' | ||
+ | |||
+ | // VFS: SSH2 example | ||
+ | // The VFS driver to use | ||
+ | // ' | ||
+ | // Port of the VFS server | ||
+ | // ' | ||
+ | ), | ||
+ | ' | ||
+ | ' | ||
+ | // What path style does the IMAP server use [' | ||
+ | ' | ||
+ | // An array of variables to append to every generated script. | ||
+ | // Use if you need to set up specific environment variables. | ||
+ | ' | ||
+ | // The $DEFAULT variable. If using Maildir, Ingo will use this | ||
+ | // value as the default unless you explicitly configure otherwise. | ||
+ | // ' | ||
+ | // The $DEFAULT variable. If using Maildir, Ingo will use this | ||
+ | // value as the default unless you explicitly configure otherwise. | ||
+ | // ' | ||
+ | // Example for the $PATH variable | ||
+ | // ' | ||
+ | // Example for the $VACATION_DIR variable (used to store vacation files) | ||
+ | // ' | ||
+ | ), | ||
+ | // If you need procmail to be called from .forward in the user's home | ||
+ | // directory, set the file and the content below: | ||
+ | // ' | ||
+ | // ' | ||
+ | ), | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | /* Sieve Example */ | ||
+ | * Django : 2013-02-04 | ||
+ | * Konfigurationsbeispiel für die Anbindung an unseren Dovecot-IMAP-Server | ||
+ | */ | ||
+ | $backends[' | ||
+ | // Disabled by default | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | // Hostname of the timsieved server | ||
+ | ' | ||
+ | // Login type of the server | ||
+ | ' | ||
+ | // Enable/ | ||
+ | ' | ||
+ | // Port number of the timsieved server | ||
+ | ' | ||
+ | // Name of the sieve script | ||
+ | ' | ||
+ | // Enable debugging. With Net_Sieve 1.2.0 or later, the sieve protocol | ||
+ | // communication is logged with the DEBUG level. Earlier versions | ||
+ | // print the log to the screen. | ||
+ | ' | ||
+ | ), | ||
+ | ' | ||
+ | ' | ||
+ | // If using Dovecot or any other Sieve implementation that requires | ||
+ | // folder names to be UTF-8 encoded, set this parameter to true. | ||
+ | ' | ||
+ | ), | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | |||
+ | /* sivtest Example */ | ||
+ | $backends[' | ||
+ | // Disabled by default | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | // Hostname of the timsieved server | ||
+ | ' | ||
+ | // Login type of the server | ||
+ | ' | ||
+ | // Enable/ | ||
+ | ' | ||
+ | // Port number of the timsieved server | ||
+ | ' | ||
+ | // Name of the sieve script | ||
+ | ' | ||
+ | // Location of sivtest | ||
+ | ' | ||
+ | // name of the socket we're using | ||
+ | ' | ||
+ | . uniqid(mt_rand()) . ' | ||
+ | ), | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | /* Sun ONE/JES Example (LDAP/ | ||
+ | $backends[' | ||
+ | // Disabled by default | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | // Hostname of the ldap server | ||
+ | ' | ||
+ | // Port number of the timsieved server | ||
+ | ' | ||
+ | // LDAP Protocol Version (default = 2). 3 is required for TLS. | ||
+ | ' | ||
+ | // Whether or not to use TLS. If using TLS, you MUST configure | ||
+ | // OpenLDAP (either / | ||
+ | // certificate which signed the certificate of the server to which you | ||
+ | // are connecting. | ||
+ | // | ||
+ | // TLS_CACERT / | ||
+ | // | ||
+ | // You MAY have problems if you are using TLS and your server is | ||
+ | // configured to make random referrals, since some OpenLDAP libraries | ||
+ | // appear to check the certificate against the original domain name, | ||
+ | // and not the referred-to domain. | ||
+ | // putting the following directive in the ldap.conf: | ||
+ | // | ||
+ | // TLS_REQCERT never | ||
+ | ' | ||
+ | // Bind DN (for bind and script distinguished names, %u is replaced | ||
+ | // with username, and %d is replaced with the internet domain | ||
+ | // components (e.g. " | ||
+ | ' | ||
+ | // Bind password. | ||
+ | // when bind_dn contains %u). | ||
+ | ' | ||
+ | // How to find user object. | ||
+ | ' | ||
+ | ' | ||
+ | // Attribute script is stored in. Will not touch non-Ingo scripts. | ||
+ | ' | ||
+ | ), | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | </ | ||
+ | |||
+ | Da die [[centos: | ||
+ | # vim / | ||
+ | |||
+ | <file php / | ||
+ | /** | ||
+ | * Ingo Hooks configuration file. | ||
+ | * | ||
+ | * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM | ||
+ | * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. | ||
+ | * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT. | ||
+ | * | ||
+ | * For more information please see the horde/ | ||
+ | * | ||
+ | * $Id: 1a8dc8d3f15f0e2d28118cd031b88294fcf72058 $ | ||
+ | */ | ||
+ | |||
+ | class Ingo_Hooks | ||
+ | { | ||
+ | /** | ||
+ | * Returns the username/ | ||
+ | * backend. | ||
+ | * | ||
+ | * @param string $driver | ||
+ | * | ||
+ | * @return mixed If non-array, uses Horde authentication credentials | ||
+ | (DEFAULT). Otherwise, an array with the following keys | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | public function transport_auth($driver) | ||
+ | { | ||
+ | switch ($driver) { | ||
+ | case ' | ||
+ | // // Example #1: Use full Horde username for password. | ||
+ | // return array( | ||
+ | // ' | ||
+ | // ); | ||
+ | // | ||
+ | // // Example #2: Use IMP password/ | ||
+ | // Django : 2013-02-04 | ||
+ | // Eintrag aktiviert für die Authentifizierung mit username und password | ||
+ | // gegen unseren mySQL-Datenbankserver | ||
+ | $ob = $GLOBALS[' | ||
+ | return array( | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | } | ||
+ | // | ||
+ | // // DEFAULT: Use hordeauth (identical to not defining hook at all). | ||
+ | // return true; | ||
+ | } | ||
+ | |||
+ | |||
+ | /** | ||
+ | * Set the default addresses used for the vacation module. | ||
+ | * | ||
+ | * @param string $user The username. | ||
+ | * | ||
+ | * @return array A list of vacation addresses. | ||
+ | */ | ||
+ | // public function vacation_addresses($user = null) | ||
+ | // { | ||
+ | // // Example #1: User has 2 vacation addresses. | ||
+ | // return array($user . ' | ||
+ | // } | ||
+ | |||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Konfiguration über die WEB-GUI ===== | ||
+ | Die Konfiguration der Applikation **IMP** erfolgt dann über die GUI des Web-Frameworks. Dazu rufen wir unseren angelegten VHOST im Webbrowser auf. | ||
+ | $ firefox https:// | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Mit einem Klick auf das Zahnradsysmbol {{: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Hier wählen wir den Menüpunkt **// | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Da wir die Anwendung **// | ||
+ | |||
+ | Als erstes legen wir die notwendigen Datenbanktabellen an. Hierzu klicken wir auf den Punkt **DB schema is out of date**. Die Aktion wird uns entsprechend positiv quittiert. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Um zur Konfiguration von **IMP** zu gelangen, klicken wir nun auf den Punkt **Filter (ingo)**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Auf den nun zur Verfügung stehenden Reitern, erfolgt die Konfiguration der Horde-Applikation **Ingo**. | ||
+ | |||
+ | === Rules Storage === | ||
+ | $conf[storage][driver] | ||
+ | $conf[storage][params][driverconfig] | ||
+ | $conf[storage][maxblacklist] | ||
+ | $conf[storage][maxwhitelist] | ||
+ | |||
+ | === Rules Options === | ||
+ | $conf[rules][userheader] | ||
+ | |||
+ | === Spam Filtering === | ||
+ | $conf[spam][compare] | ||
+ | $conf[spam][header] | ||
+ | $conf[spam][char] * | ||
+ | |||
+ | |||
+ | Am Ende unserer Konfigurationsarbeit, | ||
+ | {{: | ||
+ | Die erfolgreiche Sicherung wird uns entsprechend angezeigt. | ||
+ | {{ : | ||
+ | |||
+ | ====== Links ====== | ||
+ | * **[[centos: | ||
+ | * **[[centos: | ||
+ | * **[[wiki: | ||
+ | * **[[http:// | ||
+ | |||
+ | ~~DISCUSSION~~ | ||
+ | ~~AUTOTWEET: | ||