From abf2b05474f7024cc69efcf70df01f5ad19b6816 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 12 Feb 2018 11:50:51 +0000 Subject: [PATCH] postfix: Don't ship our own configuration This is outdated and half of it is not maintained any more. Users should configure postfix themselves based on the default configuration. Signed-off-by: Michael Tremer --- config/postfix/aliases | 6 - config/postfix/body_checks | 1 - config/postfix/header_checks | 379 -------------------------- config/postfix/main.cf | 83 ------ config/postfix/master.cf | 103 ------- config/postfix/mysql-canonical.cf | 8 - config/postfix/mysql-mydestination.cf | 7 - config/postfix/mysql-virtual.cf | 8 - config/rootfiles/packages/postfix | 4 - lfs/postfix | 4 +- 10 files changed, 1 insertion(+), 602 deletions(-) delete mode 100644 config/postfix/aliases delete mode 100644 config/postfix/body_checks delete mode 100644 config/postfix/header_checks delete mode 100644 config/postfix/main.cf delete mode 100644 config/postfix/master.cf delete mode 100644 config/postfix/mysql-canonical.cf delete mode 100644 config/postfix/mysql-mydestination.cf delete mode 100644 config/postfix/mysql-virtual.cf diff --git a/config/postfix/aliases b/config/postfix/aliases deleted file mode 100644 index fbe7299cf7..0000000000 --- a/config/postfix/aliases +++ /dev/null @@ -1,6 +0,0 @@ -# Begin /etc/aliases - -MAILER-DAEMON: postmaster -postmaster: root - -# End /etc/aliases diff --git a/config/postfix/body_checks b/config/postfix/body_checks deleted file mode 100644 index e2eeacc24d..0000000000 --- a/config/postfix/body_checks +++ /dev/null @@ -1 +0,0 @@ -/^((Content-(Disposition: attachment;|Type:).*|\ +)| *)(file)?name\ *=\ *"?.*\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wmf)"?\ *$/ REJECT attachment type not allowed diff --git a/config/postfix/header_checks b/config/postfix/header_checks deleted file mode 100644 index 038470778b..0000000000 --- a/config/postfix/header_checks +++ /dev/null @@ -1,379 +0,0 @@ -# HEADER_CHECKS(5) HEADER_CHECKS(5) -# -# NAME -# header_checks - Postfix built-in header/body inspection -# -# SYNOPSIS -# header_checks = pcre:/etc/postfix/header_checks -# mime_header_checks = pcre:/etc/postfix/mime_header_checks -# nested_header_checks = pcre:/etc/postfix/nested_header_checks -# body_checks = pcre:/etc/postfix/body_checks -# -# postmap -fq "string" pcre:/etc/postfix/filename -# postmap -fq - pcre:/etc/postfix/filename $/ -# REJECT IFRAME vulnerability exploit -# -# SEE ALSO -# cleanup(8), canonicalize and enqueue Postfix message -# pcre_table(5), format of PCRE lookup tables -# regexp_table(5), format of POSIX regular expression tables -# postconf(1), Postfix configuration utility -# postmap(1), Postfix lookup table management -# postsuper(1), Postfix janitor -# postcat(1), show Postfix queue file contents -# RFC 2045, base64 and quoted-printable encoding rules -# RFC 2047, message header encoding for non-ASCII text -# -# README FILES -# Use "postconf readme_directory" or "postconf html_direc- -# tory" to locate this information. -# DATABASE_README, Postfix lookup table overview -# CONTENT_INSPECTION_README, Postfix content inspection overview -# BUILTIN_FILTER_README, Postfix built-in content inspection -# BACKSCATTER_README, blocking returned forged mail -# -# 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 -# -# HEADER_CHECKS(5) diff --git a/config/postfix/main.cf b/config/postfix/main.cf deleted file mode 100644 index a3d7c321b1..0000000000 --- a/config/postfix/main.cf +++ /dev/null @@ -1,83 +0,0 @@ -### -### main.cf for IPFire -### -queue_directory = /var/spool/postfix -command_directory = /usr/sbin -daemon_directory = /usr/lib/postfix -manpage_directory = /usr/share/man -sample_directory = /etc/postfix -html_directory = no -readme_directory = no - -sendmail_path = /usr/sbin/sendmail -newaliases_path = /usr/bin/newaliases -mailq_path = /usr/bin/mailq - -mail_owner = postfix -setgid_group = postdrop - -myhostname = ipfire.localdomain -myorigin = $myhostname - -inet_interfaces = all -#proxy_interfaces = -mydestination = $myhostname, localhost, mysql:/etc/postfix/mysql-mydestination.cf -unknown_local_recipient_reject_code = 550 - -mynetworks_style = host -mynetworks = 127.0.0.0/8 - -#relay_domains = $mydestination -#relayhost = $mydomain -#relayhost = [gateway.my.domain] -#relayhost = [mailserver.isp.tld] -#relayhost = uucphost -#relayhost = [an.ip.add.ress] -#relay_recipient_maps = hash:/etc/postfix/relay_recipients -#in_flow_delay = 1s -alias_maps = hash:/etc/aliases -alias_database = hash:/etc/aliases -recipient_delimiter = + - -mailbox_transport = cyrus -cyrus_destination_recipient_limit=1 - -header_checks = regexp:/etc/postfix/header_checks -#fast_flush_domains = $relay_domains - -smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) -#local_destination_concurrency_limit = 2 -#default_destination_concurrency_limit = 20 - -virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf -sender_canonical_maps = mysql:/etc/postfix/mysql-canonical.cf - -smtpd_sasl_type = cyrus -smtpd_sasl_auth_enable = yes -smtpd_sasl_security_options = noanonymous -smtpd_sasl_local_domain = $myhostname -broken_sasl_auth_clients = yes - -#smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd - -#content_filter=amavis:[127.0.0.1]:10024 - -smtpd_helo_required = yes -mime_header_checks=pcre:/etc/postfix/body_checks -smtpd_recipient_restrictions = - reject_invalid_hostname, - #reject_non_fqdn_hostname, - reject_non_fqdn_sender, - reject_non_fqdn_recipient, - reject_unknown_sender_domain, - reject_unknown_recipient_domain, - reject_unauth_pipelining, - permit_mynetworks, - permit_sasl_authenticated, - reject_unauth_destination, - reject_rbl_client zombie.dnsbl.sorbs.net, - reject_rbl_client opm.blitzed.org, - reject_rbl_client list.dsbl.org, - reject_rbl_client sbl.spamhaus.org, - permit - diff --git a/config/postfix/master.cf b/config/postfix/master.cf deleted file mode 100644 index 6c2395df1d..0000000000 --- a/config/postfix/master.cf +++ /dev/null @@ -1,103 +0,0 @@ -# -# Postfix master process configuration file. For details on the format -# of the file, see the Postfix master(5) manual page. -# -# ========================================================================== -# service type private unpriv chroot wakeup maxproc command + args -# (yes) (yes) (yes) (never) (100) -# ========================================================================== -smtp inet n - n - - smtpd -#submission inet n - n - - smtpd -# -o smtpd_etrn_restrictions=reject -# -o smtpd_client_restrictions=permit_sasl_authenticated,reject -#smtps inet n - n - - smtpd -# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -#submission inet n - n - - smtpd -# -o smtpd_etrn_restrictions=reject -# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes -#628 inet n - n - - qmqpd -pickup fifo n - n 60 1 pickup -cleanup unix n - n - 0 cleanup -qmgr fifo n - n 300 1 qmgr -#qmgr fifo n - n 300 1 oqmgr -tlsmgr unix - - n 1000? 1 tlsmgr -rewrite unix - - n - - trivial-rewrite -bounce unix - - n - 0 bounce -defer unix - - n - 0 bounce -trace unix - - n - 0 bounce -verify unix - - n - 1 verify -flush unix n - n 1000? 0 flush -proxymap unix - - n - - proxymap -smtp unix - - n - - smtp -# When relaying mail as backup MX, disable fallback_relay to avoid MX loops -relay unix - - n - - smtp - -o fallback_relay= -# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 -showq unix n - n - - showq -error unix - - n - - error -discard unix - - n - - discard -local unix - n n - - local -virtual unix - n n - - virtual -lmtp unix - - n - - lmtp -anvil unix - - n - 1 anvil -scache unix - - n - 1 scache -# -# ==================================================================== -# Interfaces to non-Postfix software. Be sure to examine the manual -# pages of the non-Postfix software to find out what options it wants. -# -# Many of the following services use the Postfix pipe(8) delivery -# agent. See the pipe(8) man page for information about ${recipient} -# and other message envelope options. -# ==================================================================== -# -# maildrop. See the Postfix MAILDROP_README file for details. -# Also specify in main.cf: maildrop_destination_recipient_limit=1 -# -maildrop unix - n n - - pipe - flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} -# -# The Cyrus deliver program has changed incompatibly, multiple times. -# -old-cyrus unix - n n - - pipe - flags= user=cyrus argv=/usr/cyrus/bin/deliver -r ${sender} -m ${extension} ${user} -# Cyrus 2.1.5 (Amos Gouaux) -# Also specify in main.cf: cyrus_destination_recipient_limit=1 -cyrus unix - n n - - pipe - user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m ${extension} ${user} -# -# See the Postfix UUCP_README file for configuration details. -# -uucp unix - n n - - pipe - flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) -# -# Other external delivery methods. -# -procmail unix - n n - 20 pipe - flags=R user=cyrus argv=/usr/bin/procmail -r SENDER=${sender} -t -m USER=${user} EXTENSION=${extension} /etc/procmailrc - -amavis unix - - n - 2 lmtp - -o lmtp_data_done_timeout=1200 - -o lmtp_send_xforward_command=yes - -o disable_dns_lookups=yes - -o max_use=20 - -127.0.0.1:10025 inet n - n - - smtpd - -o content_filter= - -o local_recipient_maps= - -o relay_recipient_maps= - -o smtpd_delay_reject=no - -o smtpd_restriction_classes= - -o smtpd_client_restrictions= - -o smtpd_helo_restrictions= - -o smtpd_sender_restrictions= - -o smtpd_recipient_restrictions=permit_mynetworks,reject - -o smtpd_data_restrictions=reject_unauth_pipelining - -o smtpd_end_of_data_restrictions= - -o mynetworks=127.0.0.0/8 - -o smtpd_error_sleep_time=0 - -o smtpd_soft_error_limit=1001 - -o smtpd_hard_error_limit=1000 - -o smtpd_client_connection_count_limit=0 - -o smtpd_client_connection_rate_limit=0 - -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks diff --git a/config/postfix/mysql-canonical.cf b/config/postfix/mysql-canonical.cf deleted file mode 100644 index 2f51e35ffb..0000000000 --- a/config/postfix/mysql-canonical.cf +++ /dev/null @@ -1,8 +0,0 @@ -hosts = localhost -user = root -password = mysqlfire -table = user -dbname = mail -select_field = canonical -where_field = mbox -additional_conditions = and active = '1' limit 1 diff --git a/config/postfix/mysql-mydestination.cf b/config/postfix/mysql-mydestination.cf deleted file mode 100644 index 99924241ad..0000000000 --- a/config/postfix/mysql-mydestination.cf +++ /dev/null @@ -1,7 +0,0 @@ -hosts = localhost -user = root -password = mysqlfire -dbname = mail -table = domains -select_field = domain -where_field = domain diff --git a/config/postfix/mysql-virtual.cf b/config/postfix/mysql-virtual.cf deleted file mode 100644 index d133592acd..0000000000 --- a/config/postfix/mysql-virtual.cf +++ /dev/null @@ -1,8 +0,0 @@ -hosts = localhost -user = root -password = mysqlfire -dbname = mail -table = virtual -select_field = dest -where_field = address -additional_conditions = and active = '1' diff --git a/config/rootfiles/packages/postfix b/config/rootfiles/packages/postfix index c35f38201c..a97b4907e5 100644 --- a/config/rootfiles/packages/postfix +++ b/config/rootfiles/packages/postfix @@ -13,9 +13,6 @@ etc/postfix/main.cf.proto #etc/postfix/makedefs.out etc/postfix/master.cf etc/postfix/master.cf.proto -etc/postfix/mysql-canonical.cf -etc/postfix/mysql-mydestination.cf -etc/postfix/mysql-virtual.cf etc/postfix/postfix-files etc/postfix/postfix-files.d etc/postfix/relocated @@ -99,7 +96,6 @@ usr/sbin/sendmail.postfix #usr/share/man/man5/lmdb_table.5 #usr/share/man/man5/master.5 #usr/share/man/man5/memcache_table.5 -#usr/share/man/man5/mysql_table.5 #usr/share/man/man5/nisplus_table.5 #usr/share/man/man5/pcre_table.5 #usr/share/man/man5/pgsql_table.5 diff --git a/lfs/postfix b/lfs/postfix index ade8941c30..e7c20f8686 100644 --- a/lfs/postfix +++ b/lfs/postfix @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = postfix -PAK_VER = 10 +PAK_VER = 11 DEPS = "amavisd mysql" @@ -109,8 +109,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && sh postfix-install -non-interactive ## Install configuration rm -vf /etc/postfix/main.cf.default - cp -vf $(DIR_CONF)/postfix/* /etc/postfix - mv -vf /etc/postfix/aliases /etc/aliases mkdir -p /var/lib/postfix chown postfix.root /var/lib/postfix -- 2.39.5