From 27b8cc241c27a45a15ec78f8ceb8e597cdde2d45 Mon Sep 17 00:00:00 2001 From: ms Date: Sat, 29 Sep 2007 15:28:16 +0000 Subject: [PATCH] Postfix-Konfiguration funktioniert. libidn hinzugefuegt. !!!Build kann Fehler erzeugen!!! git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@929 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/mysql/my.cnf | 22 ++ config/postfix/access | 374 -------------------------- config/postfix/aliases | 5 +- config/postfix/canonical | 266 ------------------ config/postfix/generic | 234 ---------------- config/postfix/main.cf | 8 +- config/postfix/master.cf | 2 +- config/postfix/relocated | 163 ----------- config/postfix/transport | 272 ------------------- config/postfix/virtual | 279 ------------------- config/rootfiles/common/libidn | 67 +++++ config/rootfiles/packages/postfix | 6 - doc/packages-list.txt | 2 +- lfs/cups | 1 + lfs/libidn | 77 ++++++ lfs/mysql | 2 +- lfs/openmailadmin | 7 +- lfs/php | 17 +- make.sh | 1 + src/initscripts/init.d/networking/red | 25 +- src/paks/openmailadmin/install.sh | 4 + src/paks/openmailadmin/uninstall.sh | 0 src/paks/openmailadmin/update.sh | 4 + src/paks/postfix/install.sh | 2 + 24 files changed, 225 insertions(+), 1615 deletions(-) create mode 100644 config/mysql/my.cnf delete mode 100644 config/postfix/access delete mode 100644 config/postfix/canonical delete mode 100644 config/postfix/generic delete mode 100644 config/postfix/relocated delete mode 100644 config/postfix/transport delete mode 100644 config/postfix/virtual create mode 100644 config/rootfiles/common/libidn create mode 100644 lfs/libidn create mode 100644 src/paks/openmailadmin/install.sh create mode 100644 src/paks/openmailadmin/uninstall.sh create mode 100644 src/paks/openmailadmin/update.sh diff --git a/config/mysql/my.cnf b/config/mysql/my.cnf new file mode 100644 index 0000000000..207df906eb --- /dev/null +++ b/config/mysql/my.cnf @@ -0,0 +1,22 @@ +[client] +password = mysqlfire +port = 3306 +socket = /var/run/mysql/mysql.sock + +[mysqld] +port = 3306 +socket = /var/run/mysql/mysql.sock +datadir = /srv/mysql + +[mysql.server] +user=mysql +basedir=/var/lib + +[mysqld_safe] +log-error=/var/log/mysqld.log +#pid-file=/var/run/mysqld/mysqld.pid + +[mysql] +no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates diff --git a/config/postfix/access b/config/postfix/access deleted file mode 100644 index 79946780b9..0000000000 --- a/config/postfix/access +++ /dev/null @@ -1,374 +0,0 @@ -# ACCESS(5) ACCESS(5) -# -# NAME -# access - Postfix access table format -# -# SYNOPSIS -# postmap /etc/postfix/access -# -# postmap -q "string" /etc/postfix/access -# -# postmap -q - /etc/postfix/access as the lookup key for such addresses. The value is -# specified with the smtpd_null_access_lookup_key parameter -# in the Postfix main.cf file. -# -# EMAIL ADDRESS EXTENSION -# When a mail address localpart contains the optional recip- -# ient delimiter (e.g., user+foo@domain), the lookup order -# becomes: user+foo@domain, user@domain, domain, user+foo@, -# and user@. -# -# HOST NAME/ADDRESS PATTERNS -# With lookups from indexed files such as DB or DBM, or from -# networked tables such as NIS, LDAP or SQL, the following -# lookup patterns are examined in the order as listed: -# -# domain.tld -# Matches domain.tld. -# -# The pattern domain.tld also matches subdomains, but -# only when the string smtpd_access_maps is listed in -# the Postfix parent_domain_matches_subdomains con- -# figuration setting. Otherwise, specify .domain.tld -# (note the initial dot) in order to match subdo- -# mains. -# -# net.work.addr.ess -# -# net.work.addr -# -# net.work -# -# net Matches the specified IPv4 host address or subnet- -# work. An IPv4 host address is a sequence of four -# decimal octets separated by ".". -# -# Subnetworks are matched by repeatedly truncating -# the last ".octet" from the remote IPv4 host address -# string until a match is found in the access table, -# or until further truncation is not possible. -# -# NOTE 1: The information in the access map should be -# in canonical form, with unnecessary null characters -# eliminated. Address information must not be -# enclosed with "[]" characters. -# -# NOTE 2: use the cidr lookup table type to specify -# network/netmask patterns. See cidr_table(5) for -# details. -# -# net:work:addr:ess -# -# net:work:addr -# -# net:work -# -# net Matches the specified IPv6 host address or subnet- -# work. An IPv6 host address is a sequence of three -# to eight hexadecimal octet pairs separated by ":". -# -# Subnetworks are matched by repeatedly truncating -# the last ":octetpair" from the remote IPv6 host -# address string until a match is found in the access -# table, or until further truncation is not possible. -# -# NOTE 1: the truncation and comparison are done with -# the string representation of the IPv6 host address. -# Thus, not all the ":" subnetworks will be tried. -# -# NOTE 2: The information in the access map should be -# in canonical form, with unnecessary null characters -# eliminated. Address information must not be -# enclosed with "[]" characters. -# -# NOTE 3: use the cidr lookup table type to specify -# network/netmask patterns. See cidr_table(5) for -# details. -# -# IPv6 support is available in Postfix 2.2 and later. -# -# ACCEPT ACTIONS -# OK Accept the address etc. that matches the pattern. -# -# all-numerical -# An all-numerical result is treated as OK. This for- -# mat is generated by address-based relay authoriza- -# tion schemes. -# -# REJECT ACTIONS -# 4NN text -# -# 5NN text -# Reject the address etc. that matches the pattern, -# and respond with the numerical three-digit code and -# text. 4NN means "try again later", while 5NN means -# "do not try again". -# -# REJECT optional text... -# Reject the address etc. that matches the pattern. -# Reply with $reject_code optional text... when the -# optional text is specified, otherwise reply with a -# generic error response message. -# -# DEFER_IF_REJECT optional text... -# Defer the request if some later restriction would -# result in a REJECT action. Reply with "450 optional -# text... when the optional text is specified, other- -# wise reply with a generic error response message. -# -# This feature is available in Postfix 2.1 and later. -# -# DEFER_IF_PERMIT optional text... -# Defer the request if some later restriction would -# result in a an explicit or implicit PERMIT action. -# Reply with "450 optional text... when the optional -# text is specified, otherwise reply with a generic -# error response message. -# -# This feature is available in Postfix 2.1 and later. -# -# OTHER ACTIONS -# restriction... -# Apply the named UCE restriction(s) (permit, reject, -# reject_unauth_destination, and so on). -# -# DISCARD optional text... -# Claim successful delivery and silently discard the -# message. Log the optional text if specified, oth- -# erwise log a generic message. -# -# Note: this action currently affects all recipients -# of the message. -# -# This feature is available in Postfix 2.0 and later. -# -# DUNNO Pretend that the lookup key was not found. This -# prevents Postfix from trying substrings of the -# lookup key (such as a subdomain name, or a network -# address subnetwork). -# -# This feature is available in Postfix 2.0 and later. -# -# FILTER transport:destination -# After the message is queued, send the entire mes- -# sage through the specified external content filter. -# The transport:destination syntax is described in -# the transport(5) manual page. More information -# about external content filters is in the Postfix -# FILTER_README file. -# -# Note: this action overrides the main.cf con- -# tent_filter setting, and currently affects all -# recipients of the message. -# -# This feature is available in Postfix 2.0 and later. -# -# HOLD optional text... -# Place the message on the hold queue, where it will -# sit until someone either deletes it or releases it -# for delivery. Log the optional text if specified, -# otherwise log a generic message. -# -# Mail that is placed on hold can be examined with -# the postcat(1) command, and can be destroyed or -# released with the postsuper(1) command. -# -# Note: use "postsuper -r" to release mail that was -# kept on hold for a significant fraction of $maxi- -# mal_queue_lifetime or $bounce_queue_lifetime, or -# longer. -# -# Note: this action currently affects all recipients -# of the message. -# -# This feature is available in Postfix 2.0 and later. -# -# PREPEND headername: headervalue -# Prepend the specified message header to the mes- -# sage. When this action is used multiple times, the -# first prepended header appears before the second -# etc. prepended header. -# -# Note: this action does not support multi-line mes- -# sage headers. -# -# Note: this action must be used before the message -# content is received; it cannot be used in -# smtpd_end_of_data_restrictions. -# -# This feature is available in Postfix 2.1 and later. -# -# REDIRECT user@domain -# After the message is queued, send the message to -# the specified address instead of the intended -# recipient(s). -# -# Note: this action overrides the FILTER action, and -# currently affects all recipients of the message. -# -# This feature is available in Postfix 2.1 and later. -# -# WARN optional text... -# Log a warning with the optional text, together with -# client information and if available, with helo, -# sender, recipient and protocol information. -# -# This feature is available in Postfix 2.1 and later. -# -# REGULAR EXPRESSION TABLES -# This section describes how the table lookups change when -# the table is given in the form of regular expressions. For -# a description of regular expression lookup table syntax, -# see regexp_table(5) or pcre_table(5). -# -# Each pattern is a regular expression that is applied to -# the entire string being looked up. Depending on the appli- -# cation, that string is an entire client hostname, an -# entire client IP address, or an entire mail address. Thus, -# no parent domain or parent network search is done, -# user@domain mail addresses are not broken up into their -# user@ and domain constituent parts, nor is user+foo broken -# up into user and foo. -# -# Patterns are applied in the order as specified in the ta- -# ble, until a pattern is found that matches the search -# string. -# -# Actions are the same as with indexed file lookups, with -# the additional feature that parenthesized substrings from -# the pattern can be interpolated as $1, $2 and so on. -# -# TCP-BASED TABLES -# This section describes how the table lookups change when -# lookups are directed to a TCP-based server. For a descrip- -# tion of the TCP client/server lookup protocol, see tcp_ta- -# ble(5). This feature is not available up to and including -# Postfix version 2.2. -# -# Each lookup operation uses the entire query string once. -# Depending on the application, that string is an entire -# client hostname, an entire client IP address, or an entire -# mail address. Thus, no parent domain or parent network -# search is done, user@domain mail addresses are not broken -# up into their user@ and domain constituent parts, nor is -# user+foo broken up into user and foo. -# -# Actions are the same as with indexed file lookups. -# -# EXAMPLE -# The following example uses an indexed file, so that the -# order of table entries does not matter. The example per- -# mits access by the client at address 1.2.3.4 but rejects -# all other clients in 1.2.3.0/24. Instead of hash lookup -# tables, some systems use dbm. Use the command "postconf -# -m" to find out what lookup tables Postfix supports on -# your system. -# -# /etc/postfix/main.cf: -# smtpd_client_restrictions = -# check_client_access hash:/etc/postfix/access -# -# /etc/postfix/access: -# 1.2.3 REJECT -# 1.2.3.4 OK -# -# Execute the command "postmap /etc/postfix/access" after -# editing the file. -# -# BUGS -# The table format does not understand quoting conventions. -# -# SEE ALSO -# postmap(1), Postfix lookup table manager -# smtpd(8), SMTP server -# postconf(5), configuration parameters -# transport(5), transport:nexthop syntax -# -# README FILES -# Use "postconf readme_directory" or "postconf html_direc- -# tory" to locate this information. -# SMTPD_ACCESS_README, built-in SMTP server access control -# DATABASE_README, Postfix lookup table overview -# -# LICENSE -# The Secure Mailer license must be distributed with this -# software. -# -# AUTHOR(S) -# Wietse Venema -# IBM T.J. Watson Research -# P.O. Box 704 -# Yorktown Heights, NY 10598, USA -# -# ACCESS(5) diff --git a/config/postfix/aliases b/config/postfix/aliases index 07d432a9fd..fbe7299cf7 100644 --- a/config/postfix/aliases +++ b/config/postfix/aliases @@ -1,7 +1,6 @@ # Begin /etc/aliases -MAILER-DAEMON postmaster -postmaster root +MAILER-DAEMON: postmaster +postmaster: root -root LOGIN # End /etc/aliases diff --git a/config/postfix/canonical b/config/postfix/canonical deleted file mode 100644 index 6f75508c39..0000000000 --- a/config/postfix/canonical +++ /dev/null @@ -1,266 +0,0 @@ -# CANONICAL(5) CANONICAL(5) -# -# NAME -# canonical - Postfix canonical table format -# -# SYNOPSIS -# postmap /etc/postfix/canonical -# -# postmap -q "string" /etc/postfix/canonical -# -# postmap -q - /etc/postfix/canonical . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 0.6.14 + +THISAPP = libidn-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 040f012a45feb56168853998bb87ad4d + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/lfs/mysql b/lfs/mysql index 465b2f9bf7..410dad6c45 100644 --- a/lfs/mysql +++ b/lfs/mysql @@ -93,7 +93,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make testdir=/tmp/mysql install rm -rf /tmp/mysql cd /usr/lib && ln -v -sf mysql/libmysqlclient{,_r}.so* . - install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf + install -v -m644 $(DIR_SRC)/config/mysql/my.cnf /etc/my.cnf mkdir -p /srv/mysql mysql_install_db --user=mysql --force chgrp -v mysql /srv/mysql{,/test,/mysql} diff --git a/lfs/openmailadmin b/lfs/openmailadmin index 4ab2a7ce02..272f2d67d4 100644 --- a/lfs/openmailadmin +++ b/lfs/openmailadmin @@ -40,11 +40,14 @@ DEPS = "cyrusimap postfix" # Top-level Rules ############################################################################### -objects = $(DL_FILE) +objects = $(DL_FILE) \ + adodb502.tgz $(DL_FILE) = $(DL_FROM)/$(DL_FILE) +adodb502.tgz = $(DL_FROM)/adodb502.tgz $(DL_FILE)_MD5 = c56bc9c41f9dd25da9dbf1b63a470333 +adodb502.tgz_MD5 = 850fe353400df5af006985a88620936d install : $(TARGET) @@ -82,5 +85,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) /srv/web/openmailadmin/inc cp -fv $(DIR_SRC)/config/openmailadmin/mail.dump \ /srv/web/openmailadmin/ + tar xfz $(DIR_DL)/adodb502.tgz -C /srv/web/openmailadmin + ln -svf adodb5 /srv/web/openmailadmin/adodb chown nobody.nobody /srv/web/openmailadmin/ -Rv @$(POSTBUILD) diff --git a/lfs/php b/lfs/php index 10218029d8..e996a13194 100644 --- a/lfs/php +++ b/lfs/php @@ -36,11 +36,13 @@ TARGET = $(DIR_INFO)/$(THISAPP) # Top-level Rules ############################################################################### -objects = $(DL_FILE) +objects = $(DL_FILE) idn-0.1.tgz $(DL_FILE) = $(DL_FROM)/$(DL_FILE) +idn-0.1.tgz = $(DL_FROM)/idn-0.1.tgz $(DL_FILE)_MD5 = 55c97a671fdabf462cc7a82971a656d2 +idn-0.1.tgz_MD5 = ef8635ec22348325a76abd2abddca4a1 install : $(TARGET) @@ -72,7 +74,8 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + @rm -rf $(DIR_APP) $(DIR_SRC)/idn-* $(DIR_SRC)/package.xml && \ + cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c cd $(DIR_APP) && ./configure --prefix=/usr \ --sysconfdir=/etc \ @@ -118,7 +121,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install cd $(DIR_APP) && install -v -m644 php.ini-recommended /etc/php.ini - grep -v libphp5.so < /etc/httpd/conf/httpd.conf > /etc/httpd/conf/httpd.conf.bak + -grep -v libphp5.so < /etc/httpd/conf/httpd.conf > /etc/httpd/conf/httpd.conf.bak mv -f /etc/httpd/conf/httpd.conf.bak /etc/httpd/conf/httpd.conf - @rm -rf $(DIR_APP) + cd $(DIR_SRC) && tar xfz $(DIR_DL)/idn-0.1.tgz + -rm -f $(DIR_SRC)/package.xml + cd $(DIR_SRC)/idn-* && phpize + cd $(DIR_SRC)/idn-* && ./configure --prefix=/usr --with-idn + cd $(DIR_SRC)/idn-* && make + cd $(DIR_SRC)/idn-* && make install + @rm -rf $(DIR_APP) $(DIR_SRC)/idn-* $(DIR_SRC)/package.xml @$(POSTBUILD) diff --git a/make.sh b/make.sh index 32b5b77068..10dec87441 100755 --- a/make.sh +++ b/make.sh @@ -346,6 +346,7 @@ buildipfire() { ipfiremake curl ipfiremake python ipfiremake libnet + ipfiremake libidn ipfiremake libjpeg ipfiremake libpng ipfiremake libtiff diff --git a/src/initscripts/init.d/networking/red b/src/initscripts/init.d/networking/red index 30cb864c3e..40ef339d4b 100644 --- a/src/initscripts/init.d/networking/red +++ b/src/initscripts/init.d/networking/red @@ -150,11 +150,15 @@ case "${1}" in eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings) - boot_mesg "Bringing up the PPPoE interface on ${DEVICE}..." - ip addr add 1.1.1.1/24 broadcast 1.1.1.255 dev ${DEVICE} - [ -c "/dev/ppp" ] || mknod /dev/ppp c 108 0 + if [ "$TYPE" == "pppoe" ]; then + boot_mesg "Bringing up the PPPoE interface on ${DEVICE}..." + ip addr add 1.1.1.1/24 broadcast 1.1.1.255 dev ${DEVICE} + else + boot_mesg "Bringing up the PPP via ${TYPE} on ${COMPORT}..." + fi + ### ### ### Configuring the pppd ### ### ### @@ -210,9 +214,15 @@ case "${1}" in fi fi - ### When using plugin the device has to be the last option + ### When using pppoe-plugin the device has to be the last option # [ "${METHOD}" == "PPPOE_PLUGIN" ] && PLUGOPTS+=" ${DEVICE}" + + if [ "$TYPE" == "modem" ]; then + PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /etc/ppp/dialer" + elif [ "$TYPE" == "serial" ]; then + PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /bin/true" + fi ### Standard PPP options we always use # @@ -221,6 +231,7 @@ case "${1}" in PPP_STD_OPTIONS+=" mru ${MTU} noaccomp nodeflate nopcomp novj novjccomp" PPP_STD_OPTIONS+=" nobsdcomp user ${USERNAME} lcp-echo-interval 20" PPP_STD_OPTIONS+=" lcp-echo-failure 3 ${AUTH}" + [ "${TYPE}" eq "pppoe" ] || PPP_STD_OPTIONS+=" lock modem crtscts user ${USERNAME}" ### Debugging # @@ -232,8 +243,10 @@ case "${1}" in ### PPPoE invocation # - PPPOE_CMD="/usr/sbin/pppoe -p /var/run/ppp-ipfire.pid.pppoe -I ${DEVICE}" - PPPOE_CMD+=" -T 80 -U $PPPOE_SYNC $ACNAME $SERVICENAMEOPT" + if [ "${TYPE}" == "pppoe" ]; then + PPPOE_CMD="/usr/sbin/pppoe -p /var/run/ppp-ipfire.pid.pppoe -I ${DEVICE}" + PPPOE_CMD+=" -T 80 -U $PPPOE_SYNC $ACNAME $SERVICENAMEOPT" + fi ### Run everything # diff --git a/src/paks/openmailadmin/install.sh b/src/paks/openmailadmin/install.sh new file mode 100644 index 0000000000..a47a7831dc --- /dev/null +++ b/src/paks/openmailadmin/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash +. /opt/pakfire/lib/functions.sh + +extract_files diff --git a/src/paks/openmailadmin/uninstall.sh b/src/paks/openmailadmin/uninstall.sh new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/paks/openmailadmin/update.sh b/src/paks/openmailadmin/update.sh new file mode 100644 index 0000000000..a47a7831dc --- /dev/null +++ b/src/paks/openmailadmin/update.sh @@ -0,0 +1,4 @@ +#!/bin/bash +. /opt/pakfire/lib/functions.sh + +extract_files diff --git a/src/paks/postfix/install.sh b/src/paks/postfix/install.sh index 4613405377..6a0227da4c 100644 --- a/src/paks/postfix/install.sh +++ b/src/paks/postfix/install.sh @@ -3,5 +3,7 @@ extract_files +postalias /etc/aliases + # Set postfix's hostname postconf -e "myhostname=$(hostname -f)" -- 2.39.2