tachtler:postfix_amavis_mailzu_installieren
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:postfix_amavis_mailzu_installieren [2013/03/22 09:32] – [Postfix AMaViS MailZu Fehlerbehebung] klaus | tachtler:postfix_amavis_mailzu_installieren [2013/12/08 10:30] (aktuell) – [Postfix AMaViS MailZu deutsche Sprachdatei] klaus | ||
---|---|---|---|
Zeile 110: | Zeile 110: | ||
* **''/ | * **''/ | ||
von [[http:// | von [[http:// | ||
- | < | + | < |
... | ... | ||
# Tachtler - MailZu | # Tachtler - MailZu | ||
Zeile 126: | Zeile 126: | ||
}; | }; | ||
... | ... | ||
- | ... | + | # Tachtler - MailZu |
+ | @lookup_sql_dsn = | ||
+ | ( [' | ||
+ | @storage_sql_dsn = @lookup_sql_dsn; | ||
... | ... | ||
# Tachtler - MailZu | # Tachtler - MailZu | ||
Zeile 642: | Zeile 645: | ||
// Allow users to view quarantined Viruses (Dangerous) | // Allow users to view quarantined Viruses (Dangerous) | ||
// Virues are treated like Banned files and are placed | // Virues are treated like Banned files and are placed | ||
+ | // in the Pending Requests and require Admin release | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Allow users to search by Mailid | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | include_once(' | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | |||
+ | Abschließend die **komplette Konfigurationsdatei**: | ||
+ | <code php> | ||
+ | <?php | ||
+ | /** | ||
+ | * This file sets all the configuration options | ||
+ | * All configuration options, such as colors, | ||
+ | * text sizes, email addresses, etc. | ||
+ | * are set in this file. | ||
+ | * @author Samuel Tran < | ||
+ | * @author Brian Wong < | ||
+ | * @author Jeremy Fowler < | ||
+ | * @version 04-03-07 | ||
+ | * @package MailZu | ||
+ | */ | ||
+ | / | ||
+ | * MailZu | ||
+ | * Version 0.8 * | ||
+ | * http:// | ||
+ | * * | ||
+ | / | ||
+ | /** | ||
+ | * Please refer to readme.html and LICENSE for any additional information | ||
+ | * | ||
+ | * Copyright (C) 2003 - 2007 MailZu | ||
+ | * This program is free software; you can redistribute it and/or modify it | ||
+ | * under the terms of the GNU General Public License as published by the | ||
+ | * Free Software Foundation; either version 2 of the License, or (at your option) | ||
+ | * any later version. | ||
+ | * | ||
+ | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
+ | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
+ | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
+ | * | ||
+ | * You should have received a copy of the GNU General Public License along with | ||
+ | * this program; if not, write to the | ||
+ | * Free Software Foundation, Inc. | ||
+ | * 59 Temple Place | ||
+ | * Suite 330 | ||
+ | * Boston, MA | ||
+ | * 02111-1307 | ||
+ | * USA | ||
+ | */ | ||
+ | |||
+ | / | ||
+ | /* Instructions | ||
+ | ************************************************** | ||
+ | * + All words (string values) must * | ||
+ | * be enclosed in quotation marks * | ||
+ | * Numbers must not * | ||
+ | * * | ||
+ | * + Default values are * | ||
+ | * given in square brackets [] * | ||
+ | / | ||
+ | |||
+ | /********** | ||
+ | * Amavisd-new Settings | ||
+ | * | ||
+ | * The following settings must correspond to your amavisd-new setup | ||
+ | * | ||
+ | * | ||
+ | ***********/ | ||
+ | |||
+ | // Amavisd-new AM.PDP port | ||
+ | // Since the port number can not be stored in the database | ||
+ | // all instances of amavisd-new must use the same AM.PDP port | ||
+ | $conf[' | ||
+ | |||
+ | // Database type to be used by PEAR [mysql] | ||
+ | /* Options are: | ||
+ | mysql -> MySQL | ||
+ | pgsql -> PostgreSQL | ||
+ | ibase -> InterBase | ||
+ | msql -> Mini SQL | ||
+ | mssql -> Microsoft SQL Server | ||
+ | oci8 -> Oracle 7/8/8i | ||
+ | odbc -> ODBC (Open Database Connectivity) | ||
+ | sybase -> SyBase | ||
+ | ifx -> Informix | ||
+ | fbsql -> FrontBase | ||
+ | */ | ||
+ | $conf[' | ||
+ | |||
+ | // Database user who can access the amavisd database | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Password for above user to access the amavisd database | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Name of database | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Database host specification (hostname[: | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // If using the bytea or BLOB mail_text quarantine type set to | ||
+ | // True. Since amavisd-2.4.4. | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | /********** | ||
+ | * Authentication Settings | ||
+ | * | ||
+ | * Choose your authentication method ($conf[' | ||
+ | * Then fill in the necessary auth information for corresponding method | ||
+ | * | ||
+ | ***********/ | ||
+ | // Available authentication methods | ||
+ | /* Options are: | ||
+ | ldap -> Standard LDAP server, e.g. OpenLDAP | ||
+ | ad -> MS Active Directory | ||
+ | sql -> PHP PEAR compatible database | ||
+ | exchange | ||
+ | imap -> IMAP protocol | ||
+ | */ | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | |||
+ | /*** LDAP Authentication Settings ***/ | ||
+ | // List of LDAP servers | ||
+ | $conf[' | ||
+ | // if set to true, LDAP connection over SSL (PHP 4.0.4 minimum) | ||
+ | // if set to false or not set, unencrypted LDAP connection on port 389 | ||
+ | $conf[' | ||
+ | |||
+ | // LDAP base dn, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // LDAP attribute used for the RDN to identify a person | ||
+ | // For instance if the DN for a given user is uid=joesmith, | ||
+ | // the attribute would be ' | ||
+ | $conf[' | ||
+ | |||
+ | // Container where all users are kept, e.g. ' | ||
+ | // If you have users in multiple containers, leave this option blank. | ||
+ | // In this particular case you will need to allow anonymous binding | ||
+ | // or specify a search user/ | ||
+ | // | ||
+ | $conf[' | ||
+ | |||
+ | // LDAP attribute used as login, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // LDAP attribute used as name for the welcome message, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // LDAP mail attribute(s) used as the final recipient address | ||
+ | // Could be the actual mail attribute or another attribute | ||
+ | // (in the latter case look for the " | ||
+ | $conf[' | ||
+ | |||
+ | // If $conf[' | ||
+ | // corresponding ' | ||
+ | // Leave blank for anonymous binding. | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | |||
+ | /*** Active Directory Authentication Settings ***/ | ||
+ | // List of AD Domain controllers | ||
+ | $conf[' | ||
+ | // if set to true, LDAP connection over SSL (PHP 4.0.4 minimum) | ||
+ | // if set to false or not set, unencrypted LDAP connection on port 389 | ||
+ | $conf[' | ||
+ | |||
+ | // AD base dn, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // AD domain, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // AD attribute used to identify a person | ||
+ | $conf[' | ||
+ | |||
+ | // AD attribute used as login, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // AD attribute used as name for the welcome message, e.g. ' | ||
+ | $conf[' | ||
+ | |||
+ | // AD mail attribute(s) used as the final recipient address | ||
+ | // Could be the actual mail attribute or another attribute | ||
+ | // (in the latter case look for the " | ||
+ | // $conf[' | ||
+ | // For accounts with multiple email address aliases use proxyAddresses | ||
+ | $conf[' | ||
+ | |||
+ | // If $conf[' | ||
+ | // corresponding ' | ||
+ | // Ad does not support anonymous bind | ||
+ | $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | |||
+ | /*** Database Authentication Settings ***/ | ||
+ | // Database type to be used by PEAR | ||
+ | /* Options are: | ||
+ | mysql -> MySQL | ||
+ | pgsql -> PostgreSQL | ||
+ | ibase -> InterBase | ||
+ | msql -> Mini SQL | ||
+ | mssql -> Microsoft SQL Server | ||
+ | oci8 -> Oracle 7/8/8i | ||
+ | odbc -> ODBC (Open Database Connectivity) | ||
+ | sybase -> SyBase | ||
+ | ifx -> Informix | ||
+ | fbsql -> FrontBase | ||
+ | */ | ||
+ | $conf[' | ||
+ | |||
+ | // Database host specification (hostname[: | ||
+ | $conf[' | ||
+ | |||
+ | // Database user who can access the auth database | ||
+ | $conf[' | ||
+ | |||
+ | // Password for above user to auth database | ||
+ | $conf[' | ||
+ | |||
+ | // Name for auth database | ||
+ | $conf[' | ||
+ | |||
+ | // Name for auth table that contains usernames and passwords | ||
+ | $conf[' | ||
+ | |||
+ | // Name of the Username field of the SQL table | ||
+ | $conf[' | ||
+ | |||
+ | // Name of the password field of the SQL table | ||
+ | $conf[' | ||
+ | |||
+ | // Name of the 'first name' or 'full name' field of the SQL table | ||
+ | // This is used for the welcome message | ||
+ | // If such a field does not exist, leave it blank | ||
+ | $conf[' | ||
+ | |||
+ | // Name of the 'mail address' | ||
+ | $conf[' | ||
+ | |||
+ | // Hash configuration | ||
+ | // true = passwords are md5 encrypted in database | ||
+ | // false = passwords are cleartext in database | ||
+ | $conf[' | ||
+ | |||
+ | |||
+ | /*** Exchange 5.5 Authentication Settings ***/ | ||
+ | // Exchange 5.5 server host and IMAP port (e.g.: 10.1.1.20: | ||
+ | $conf[' | ||
+ | |||
+ | // Exchange' | ||
+ | $conf[' | ||
+ | |||
+ | // Exchange default NT domain | ||
+ | $conf[' | ||
+ | |||
+ | |||
+ | /*** IMAP Authentication Settings ***/ | ||
+ | // List of IMAP servers and ports (e.g.: 10.1.1.20: | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // IMAP type | ||
+ | /* Options are: | ||
+ | imap -> default | ||
+ | imaptls | ||
+ | imapssl | ||
+ | imapcert -> use the Secure Socket Layer to encrypt the session, | ||
+ | do not validate certificates from TLS/SSL server, needed if server uses self-signed certificates | ||
+ | */ | ||
+ | // Tachtler | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Domain name part of the email address, (e.g.: example.com) | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | |||
+ | /** | ||
+ | * End of Authentication Settings | ||
+ | */ | ||
+ | |||
+ | /*** Permission listings ****/ | ||
+ | /* The items you put in the admin lists | ||
+ | * must be the same as the login ID. | ||
+ | * Example: | ||
+ | * If you login as ' | ||
+ | * conf[' | ||
+ | * | ||
+ | * OR | ||
+ | * | ||
+ | * If you login as ' | ||
+ | * conf[' | ||
+ | * ' | ||
+ | * ); | ||
+ | * | ||
+ | */ | ||
+ | |||
+ | // List of Super Admins | ||
+ | // Super Admins can do anything mail admins can plus | ||
+ | // change settings | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // List of Mail Admins | ||
+ | // Mail Admins can see other users' spam and attachments | ||
+ | // and can perform any action on them | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // User login restriction (Does not affect admins) | ||
+ | // If set to true, users will not be able to login. This is if you do | ||
+ | // not want users to view their quarantine, yet only have admins to | ||
+ | // view quarantines. | ||
+ | $conf[' | ||
+ | |||
+ | // User restriction exemption | ||
+ | // List of users still allowed to login even if | ||
+ | // $conf[' | ||
+ | // | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | /********** | ||
+ | * Miscellaneous Settings | ||
+ | * | ||
+ | * The following settings must correspond to your amavisd-new setup | ||
+ | * | ||
+ | ***********/ | ||
+ | |||
+ | // Image to appear at the top of each page [' | ||
+ | // Leave this string empty if you are not going to use an image | ||
+ | // Specifiy link as ' | ||
+ | $conf[' | ||
+ | |||
+ | // Welcome message show at login page [' | ||
+ | $conf[' | ||
+ | |||
+ | // The full url to the root directory of MailZu | ||
+ | // Please do not include the trailing slash | ||
+ | // Tachtler | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // How to send email [' | ||
+ | /* Options are: | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | */ | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // SMTP email host address [] | ||
+ | // This is only required if emailType is SMTP | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // SMTP port [25] | ||
+ | // This is only required if emailType is SMTP | ||
+ | $conf[' | ||
+ | |||
+ | // Path to sendmail ['/ | ||
+ | // This only needs to be set if the emailType is ' | ||
+ | $conf[' | ||
+ | |||
+ | // Path to qmail ['/ | ||
+ | // This only needs to be set if the emailType is ' | ||
+ | $conf[' | ||
+ | |||
+ | // Support for recipient delimiters | ||
+ | // Enter the character used as a delimiter for your site | ||
+ | // or leave empty | ||
+ | // $conf[' | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // The email addresses of the support staff and/or administrator | ||
+ | // An email is sent to these addresses when a user reports an error | ||
+ | // or clicks the "Email Administrator" | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Email admin upon Release Request | ||
+ | // When users try to release a banned file a request is sent to an | ||
+ | // admin. Admins can always look at ' | ||
+ | // interface regardless. | ||
+ | // | ||
+ | // $conf[' | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Show the "Email Administrator" | ||
+ | // If you have a large userbase, you may not want users to have the | ||
+ | // capability to just email the admin | ||
+ | // Note: The " | ||
+ | // of this option. This link is only visible if a fatal error occurs | ||
+ | // with releasing attachments. Default is 1 (show link). | ||
+ | // | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Site Quarantine Summary display toggle. | ||
+ | // Enable and display the "Site Quarantine Summary" | ||
+ | // Viewing the site summary may be an expensive database query. | ||
+ | // Large sites may want to turn this off. | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Show Site Quarantine in search only mode if set to 1. | ||
+ | // No message is displayed when clicking on 'Site quarantine' | ||
+ | // Keep the default for for large sites. | ||
+ | // $conf[' | ||
+ | // Tachtler | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // The default language code. This must be included in the language list in | ||
+ | // langs.php | ||
+ | // Tachtler | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Display the choice for language selection during the login screen if set to 1 | ||
+ | // Otherwise set it to 0 | ||
+ | // Default is 1 | ||
+ | $conf[' | ||
+ | |||
+ | // If you are running PHP in safe mode, set this value to 1. | ||
+ | // This toggles if we use the included Pear DB and Mail_Mime libraries included | ||
+ | // with this distribution | ||
+ | $conf[' | ||
+ | |||
+ | // View time in 12 or 24 hour format [12] | ||
+ | // Only acceptable values are 12 and 24 (if an invalid number is set, 12 hour | ||
+ | // time will be used) | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Title of application [' | ||
+ | // Will be used for page titles and in ' | ||
+ | $conf[' | ||
+ | |||
+ | // If we should log system activity or not [0] | ||
+ | // Can be 0 (for no) and 1 (for yes) | ||
+ | $conf[' | ||
+ | |||
+ | // If we should log additional debug information | ||
+ | $conf[' | ||
+ | |||
+ | // Directory/ | ||
+ | // Specify as / | ||
+ | $conf[' | ||
+ | |||
+ | // Maximum number of messages displayed per page | ||
+ | // Tachtler | ||
+ | // default: $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Allow users to view quarantined Bad Header messages | ||
+ | // Bad headers are treated like spam and released | ||
+ | // $conf[' | ||
+ | $conf[' | ||
+ | |||
+ | // Allow users to view quarantined Viruses (Dangerous) | ||
+ | // Virues are treated like Banned files and are placed | ||
// in the Pending Requests and require Admin release | // in the Pending Requests and require Admin release | ||
// $conf[' | // $conf[' | ||
Zeile 670: | Zeile 1174: | ||
gekennzeichnet sind: | gekennzeichnet sind: | ||
- | Hier de notwendigen Konfigurationen von **''/ | + | Hier de notwendigen Konfigurationen von **''/ |
<code perl> | <code perl> | ||
# | # | ||
- | # Tachtler | ||
- | # default: # | ||
use strict; | use strict; | ||
Zeile 692: | Zeile 1194: | ||
' | ' | ||
); | ); | ||
- | |||
# Set this to 1 if you are using the new database schema | # Set this to 1 if you are using the new database schema | ||
Zeile 698: | Zeile 1199: | ||
# have the foreign key references between the tables and use | # have the foreign key references between the tables and use | ||
# time_iso as a real date type instead of a string. | # time_iso as a real date type instead of a string. | ||
+ | # Tachtler | ||
+ | # default: my($new_dd) = 1; # 1 or undef | ||
my($new_dd) = undef; # 1 or undef | my($new_dd) = undef; # 1 or undef | ||
Zeile 717: | Zeile 1220: | ||
# MySQL | # MySQL | ||
# Tachtler | # Tachtler | ||
+ | # default: # | ||
+ | # default: # | ||
my($new_interval) = '7 day'; | my($new_interval) = '7 day'; | ||
my($new_partial_interval) = '1 hour'; | my($new_partial_interval) = '1 hour'; | ||
Zeile 726: | Zeile 1231: | ||
##### END OF CONFIGURATION SECTION ###### | ##### END OF CONFIGURATION SECTION ###### | ||
- | ... | ||
- | </ | ||
- | Der Aufruf des Scripts, welches ein Perl-Script ist, muss mit einem Parameter für die Angabe des Datenbank-Typs, hier [[http://www.mysql.de/|MySQL]] erfolgen, was auch eine Abfrage wie nachfolgend dargestellt zeigt: | + | # Options array |
- | <code> | + | my(%opt); |
- | # / | + | |
- | Usage: | + | my(@modules); |
- | | + | my(@missing); |
- | | + | |
+ | my(@dsn) = split(/:/,$storage_sql_dsn[0],-1); | ||
+ | push(@modules, ' | ||
+ | |||
+ | for my $m (@modules) { | ||
+ | local($_) = $m; | ||
+ | $_ .= /^auto::/ ? '.al' : '.pm' | ||
+ | s[::][/]g; | ||
+ | eval { require $_ } or push(@missing, $m); | ||
+ | } | ||
+ | |||
+ | die "ERROR: MISSING module(s): | ||
+ | |||
+ | sub build_queries($) { | ||
+ | my($dbtype) = shift; | ||
+ | # Return a hash of queries to be run | ||
+ | my(%query) = ( | ||
+ | # Old schema queries | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | " | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | " | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | # New schema queries | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | # Generic queries | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | ); | ||
+ | |||
+ | if ($dbtype eq ' | ||
+ | $query{' | ||
+ | # New schema queries | ||
+ | $query{' | ||
+ | ' | ||
+ | " | ||
+ | | ||
+ | ' | ||
+ | " | ||
+ | ' | ||
+ | } | ||
+ | |||
+ | if ($dbtype eq ' | ||
+ | # New schema queries | ||
+ | $query{' | ||
+ | ' | ||
+ | " | ||
+ | $query{' | ||
+ | ' | ||
+ | " | ||
+ | ' | ||
+ | |||
+ | # Old schema queries | ||
+ | $query{' | ||
+ | 'LEFT JOIN msgrcpt USING(mail_id) ' . | ||
+ | 'WHERE msgrcpt.mail_id IS NULL'; | ||
+ | $query{' | ||
+ | ' | ||
+ | ' | ||
+ | $query{' | ||
+ | 'LEFT JOIN msgs USING(mail_id) ' . | ||
+ | 'WHERE msgs.mail_id IS NULL'; | ||
+ | } | ||
+ | |||
+ | my(%post_query) = ( | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | # Order of execution IS IMPORTANT! | ||
+ | my(@query_order) = qw (del_d_flag del_partial_msg del_msgs_mail_ids | ||
+ | | ||
+ | | ||
+ | ); | ||
+ | |||
+ | @query_order = qw (del_d_flag_new del_partial_msg_new | ||
+ | | ||
+ | ) if $new_dd; | ||
+ | |||
+ | my(@post_query_order); | ||
+ | push(@post_query_order, | ||
+ | |||
+ | return (\%query, | ||
+ | } | ||
+ | |||
+ | |||
+ | sub usage { | ||
+ | print "Usage:\n"; | ||
+ | print " | ||
+ | print " | ||
+ | print "\tThe database configuration parameter is REQUIRED!\n\n"; | ||
+ | print " | ||
+ | "\tand ' | ||
+ | exit; | ||
+ | } | ||
+ | |||
+ | sub main { | ||
+ | Getopt:: | ||
+ | GetOptions(\%opt, | ||
+ | ) or exit(1); | ||
+ | usage if $opt{help}; | ||
+ | usage if not $opt{database}; | ||
+ | my($dbh) = connect_to_sql(@storage_sql_dsn); | ||
+ | my($query, | ||
+ | my($sth_ref) = prepare_queries($dbh, | ||
+ | my($result) = exec_queries($dbh, | ||
+ | | ||
+ | ); | ||
+ | print " | ||
+ | $dbh-> | ||
+ | } | ||
+ | |||
+ | sub exec_queries($$$$$) { | ||
+ | my($dbh, | ||
+ | my($affected); | ||
+ | |||
+ | $dbh-> | ||
+ | eval { | ||
+ | foreach (@$query_o) { | ||
+ | if ($opt{verbose}) { | ||
+ | print " | ||
+ | print $query-> | ||
+ | } | ||
+ | $affected = $sth_ref-> | ||
+ | print " | ||
+ | } | ||
+ | }; | ||
+ | if ($@ ne '' | ||
+ | $dbh-> | ||
+ | print "There was an error executing a query! $@\n" . | ||
+ | "No records modified by database maintenance\n" | ||
+ | " | ||
+ | return undef | ||
+ | } else { | ||
+ | $dbh-> | ||
+ | } | ||
+ | |||
+ | eval { | ||
+ | foreach (@$p_query_o) { | ||
+ | if ($opt{verbose}) { | ||
+ | print " | ||
+ | print $p_query-> | ||
+ | } | ||
+ | $affected = $sth_ref-> | ||
+ | print " | ||
+ | } | ||
+ | }; | ||
+ | if ($@ ne '' | ||
+ | print "There was an error executing an optional query! $@\n" . | ||
+ | return undef | ||
+ | } | ||
+ | |||
+ | return 1; | ||
+ | |||
+ | } | ||
+ | |||
+ | sub connect_to_sql(@) { | ||
+ | my(@sql_dsn) = @_; | ||
+ | my($dsn, $username, $password) = @sql_dsn; | ||
+ | print " | ||
+ | print " | ||
+ | my($dbh) = DBI-> | ||
+ | # | ||
+ | | ||
+ | if ($dbh) { | ||
+ | print " | ||
+ | } else { | ||
+ | die " | ||
+ | } | ||
+ | $dbh; | ||
+ | } | ||
- | The database configuration parameter is REQUIRED! | + | sub prepare_queries($$$) { |
+ | my($dbh) = shift; | ||
+ | my($query) = shift; | ||
+ | my($p_query) = shift; | ||
+ | my(%sths); | ||
+ | foreach my $query_set ($query, $p_query) { | ||
+ | foreach (keys %$query) { | ||
+ | $sths{$_} = $dbh-> | ||
+ | } | ||
+ | } | ||
+ | \%sths | ||
+ | } | ||
- | Possible parameters for the ' | + | main; |
- | and ' | + | |
</ | </ | ||
Zeile 775: | Zeile 1488: | ||
===== Postfix AMaViS MailZu deutsche Sprachdatei ===== | ===== Postfix AMaViS MailZu deutsche Sprachdatei ===== | ||
- | Unter nachfolgenden Link auf mein Repository --> [[http:// | + | Unter nachfolgenden Link auf mein Repository --> [[http:// |
* **'' | * **'' | ||
* **'' | * **'' | ||
Zeile 824: | Zeile 1537: | ||
===== Postfix AMaViS MailZu Patch 2.7.0 ===== | ===== Postfix AMaViS MailZu Patch 2.7.0 ===== | ||
- | Ab der Version | + | **Ab der [[http:// |
+ | |||
+ | Die Datei, welche " | ||
+ | * **''/ | ||
+ | |||
+ | Der **" | ||
+ | heruntergeladen werden: | ||
+ | * **[[http:// | ||
+ | |||
+ | :!: **HINWEIS** - **In nachfolgende Datei, wurde von mir der oben genannte " | ||
+ | |||
+ | * **{{: | ||
===== Postfix AMaViS MailZu Fehlerbehebung ===== | ===== Postfix AMaViS MailZu Fehlerbehebung ===== | ||
Zeile 847: | Zeile 1571: | ||
// Tachtler | // Tachtler | ||
$content_type=''; | $content_type=''; | ||
+ | </ | ||
+ | |||
+ | ==== mail_id mit ' | ||
+ | |||
+ | Seitdem Postfix auch e-Mail-ID' | ||
+ | |||
+ | :!: **HINWEIS** Nachfolgende Code-Zeilen lösen dieses Problem! | ||
+ | |||
+ | Die Programmdatei von [[http:// | ||
+ | * **'' | ||
+ | Die Veränderungen sind **ab Zeile 260** durchzuführen: | ||
+ | |||
+ | **Vorher** (nur relevanter Ausschnitt): | ||
+ | < | ||
+ | ... | ||
+ | // Get mail_id and recipient email address | ||
+ | $temp = preg_split('/ | ||
+ | $mail_id = $temp[0]; | ||
+ | $recip_email = $temp[1]; | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | **Nachher** (nur relevanter Ausschnitt): | ||
+ | < | ||
+ | ... | ||
+ | // Get mail_id and recipient email address | ||
+ | // Tachtler | ||
+ | // default: $temp = preg_split('/ | ||
+ | // default: $mail_id = $temp[0]; | ||
+ | // default: $recip_email = $temp[1]; | ||
+ | $help_recip_email = array_reverse(explode(' | ||
+ | $recip_email = $help_recip_email[0]; | ||
+ | $help_mail_id = explode(' | ||
+ | $mail_id = $help_mail_id[0]; | ||
+ | ... | ||
</ | </ | ||
tachtler/postfix_amavis_mailzu_installieren.1363941143.txt.gz · Zuletzt geändert: 2013/03/22 09:32 von klaus