From 9995186d635bd688051110036f152ca7046b673b Mon Sep 17 00:00:00 2001 From: Matan Horovitz Date: Sun, 16 Oct 2022 22:14:17 +0300 Subject: [PATCH] Auto updating environment - Sun Oct 16 10:14:17 PM IDT 2022 --- environment | 12 --- main.cf | 216 +++++++++------------------------------------------- profile | 1 + rootfs | 8 +- 4 files changed, 43 insertions(+), 194 deletions(-) diff --git a/environment b/environment index 7e8ed78..3e704a6 100644 --- a/environment +++ b/environment @@ -3,15 +3,3 @@ # # Syntax: simple "KEY=VAL" pairs on separate lines # -### Environment Variables ### -export SCRIPTS="/home/shmick/Scripts" -export GIT_PORT="64278" -# ###BackBlaze B2### -export B2_ACCOUNT_ID=8582a42a3b99 #Master Key -export B2_ACCOUNT_KEY=00041845e8dd29d7e3d091d77bb8a631ee71332be7 #Master Application ID -#export B2_ACCOUNT_ID=0008582a42a3b990000000003 -#export B2_ACCOUTN_KEY=K000Zlz7MtKzu2LG0VZlYkeUitGeuHM -export RESTIC_PASSWORD='f$774$#je4%U8vp8ov*UsZMHqL$m3Smh#fEbbt7hyULQxfnnWmSiS5MEndzVWT$$n^@s$P*o4vV*^rgv3jvvrv@y35VppU$$y*vnG5V@botU&4$39Y6t9HSb3Z548M!4' -#export RESTIC_REPOSITORY="b2:Gerbil-TK" #Seperate buckets so not neccesarily -#export DOCKER_HOST="unix:///run/user/$UID/podman/podman.sock" -export CLOUDFLARE_API_TOKEN="0dFNYA8qtzVhVtGi4nEb7_aclTOdGthYm5Q7N05n" diff --git a/main.cf b/main.cf index af01634..944fd37 100644 --- a/main.cf +++ b/main.cf @@ -1,15 +1,11 @@ -# -# ----------------------------------------------------------------------- -# NOTE: Many parameters have already been added to the end of this file -# by config.postfix. So take care that you don't uncomment -# and set a parameter without checking whether it has been added -# to the end of this file. -# ----------------------------------------------------------------------- -# # Global Postfix configuration file. This file lists only a subset # of all parameters. For the syntax, and for a complete parameter # list, see the postconf(5) manual page (command: "man 5 postconf"). # +# TIP: use the command "postconf -n" to view main.cf parameter +# settings, "postconf parametername" to view a specific parameter, +# and "postconf 'parametername=value'" to set a specific parameter. +# # For common configuration examples, see BASIC_CONFIGURATION_README # and STANDARD_CONFIGURATION_README. To find these documents, use # the command "postconf html_directory readme_directory", or go to @@ -35,7 +31,7 @@ # # The level below is what should be used with new (not upgrade) installs. # -compatibility_level = 3.6 +compatibility_level = 3.7 # SOFT BOUNCE # @@ -60,13 +56,13 @@ queue_directory = /var/spool/postfix # The command_directory parameter specifies the location of all # postXXX commands. # -command_directory = /usr/sbin +command_directory = /usr/bin # The daemon_directory parameter specifies the location of all Postfix # daemon programs (i.e. programs listed in the master.cf file). This # directory must be owned by root. # -daemon_directory = /usr/lib/postfix/bin/ +daemon_directory = /usr/lib/postfix/bin # The data_directory parameter specifies the location of Postfix-writable # data files (caches, random numbers). This directory must be owned @@ -137,7 +133,7 @@ mail_owner = postfix # # Note: you need to stop/start Postfix when this parameter changes. # -inet_interfaces = 192.168.0.66 +#inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost @@ -255,11 +251,14 @@ unknown_local_recipient_reject_code = 550 # You can specify the list of "trusted" network addresses by hand # or you can let Postfix do it for you (which is the default). # -# By default (mynetworks_style = subnet), Postfix "trusts" SMTP -# clients in the same IP subnetworks as the local machine. -# On Linux, this works correctly only with interfaces specified -# with the "ifconfig" command. +# By default (mynetworks_style = host), Postfix "trusts" only +# the local machine. # +# Specify "mynetworks_style = subnet" when Postfix should "trust" +# SMTP clients in the same IP subnetworks as the local machine. +# On Linux, this works correctly only with interfaces specified +# with the "ifconfig" or "ip" command. +# # Specify "mynetworks_style = class" when Postfix should "trust" SMTP # clients in the same IP class A/B/C networks as the local machine. # Don't do this with a dialup site - it would cause Postfix to "trust" @@ -286,17 +285,19 @@ unknown_local_recipient_reject_code = 550 # #mynetworks = 168.100.3.0/28, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks -#mynetworks = lmdb:/etc/postfix/network_table +#mynetworks = hash:/etc/postfix/network_table # The relay_domains parameter restricts what destinations this system will -# relay mail to. See the smtpd_recipient_restrictions description in -# postconf(5) for detailed information. +# relay mail to. See the smtpd_relay_restrictions and +# smtpd_recipient_restrictions descriptions in postconf(5) for detailed +# information. # # By default, Postfix relays mail -# - from "trusted" clients (IP address matches $mynetworks) to any destination, +# - from "trusted" clients (IP address matches $mynetworks, or is +# SASL authenticated) to any destination, # - from "untrusted" clients to destinations that match $relay_domains or # subdomains thereof, except addresses with sender-specified routing. -# The default relay_domains value is $mydestination. +# The default relay_domains value is empty. # # In addition to the above, the Postfix SMTP server by default accepts mail # that Postfix is final destination for: @@ -316,7 +317,7 @@ unknown_local_recipient_reject_code = 550 # list this system as their primary or backup MX host. See the # permit_mx_backup restriction description in postconf(5). # -#relay_domains = $mydestination +#relay_domains = # INTERNET OR INTRANET @@ -351,7 +352,7 @@ unknown_local_recipient_reject_code = 550 # In the left-hand side, specify an @domain.tld wild-card, or specify # a user@domain.tld address. # -#relay_recipient_maps = lmdb:/etc/postfix/relay_recipients +#relay_recipient_maps = hash:/etc/postfix/relay_recipients # INPUT RATE CONTROL # @@ -406,9 +407,10 @@ unknown_local_recipient_reject_code = 550 # "postfix reload" to eliminate the delay. # #alias_maps = dbm:/etc/aliases -#alias_maps = lmdb:/etc/aliases -#alias_maps = lmdb:/etc/aliases, nis:mail.aliases +#alias_maps = hash:/etc/aliases +#alias_maps = hash:/etc/aliases, nis:mail.aliases #alias_maps = netinfo:/aliases +alias_maps = hash:/etc/postfix/aliases # The alias_database parameter specifies the alias database(s) that # are built with "newaliases" or "sendmail -bi". This is a separate @@ -417,8 +419,9 @@ unknown_local_recipient_reject_code = 550 # #alias_database = dbm:/etc/aliases #alias_database = dbm:/etc/mail/aliases -#alias_database = lmdb:/etc/aliases -#alias_database = lmdb:/etc/aliases, lmdb:/opt/majordomo/aliases +#alias_database = hash:/etc/aliases +#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases +alias_database = $alias_maps # ADDRESS EXTENSIONS (e.g., user+foo) # @@ -575,7 +578,6 @@ unknown_local_recipient_reject_code = 550 # #smtpd_banner = $myhostname ESMTP $mail_name #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) -smtpd_banner = $myhostname ESMTP # PARALLEL DELIVERY TO THE SAME DESTINATION # @@ -648,7 +650,7 @@ debugger_command = # sendmail_path: The full pathname of the Postfix sendmail command. # This is the Sendmail-compatible mail posting interface. # -sendmail_path = /usr/sbin/sendmail +sendmail_path = /usr/bin/sendmail # newaliases_path: The full pathname of the Postfix newaliases command. # This is the Sendmail-compatible command to build alias databases. @@ -664,11 +666,11 @@ mailq_path = /usr/bin/mailq # commands. This must be a group name with a numerical group ID that # is not shared with other accounts, not even with the Postfix account. # -setgid_group = maildrop +setgid_group = postdrop # html_directory: The location of the Postfix HTML documentation. # -html_directory = /usr/share/doc/packages/postfix-doc/html +html_directory = no # manpage_directory: The location of the Postfix on-line manual pages. # @@ -677,153 +679,11 @@ manpage_directory = /usr/share/man # sample_directory: The location of the Postfix sample configuration files. # This parameter is obsolete as of Postfix 2.1. # -sample_directory = /usr/share/doc/packages/postfix-doc/samples +sample_directory = /etc/postfix # readme_directory: The location of the Postfix README files. # -readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES - -############################################################ -# -# before changing values manually consider editing -# /etc/sysconfig/postfix -# and run -# config.postfix -# -# if you miss a feature of config.postfix then just send a -# mail to chris@computersalat.de -# patches for new feature(s) are also welcome :) -# -############################################################ - -biff = no -content_filter = -delay_warning_time = 1h -disable_dns_lookups = no -disable_mime_output_conversion = no -disable_vrfy_command = yes -inet_interfaces = 192.168.0.66 -inet_protocols = all -masquerade_classes = envelope_sender, header_sender, header_recipient -masquerade_domains = -masquerade_exceptions = root -mydestination = $myhostname, localhost.$mydomain, localhost -myhostname = localhost -mynetworks_style = subnet -relayhost = - -alias_maps = lmdb:/etc/aliases -canonical_maps = lmdb:/etc/postfix/canonical -relocated_maps = lmdb:/etc/postfix/relocated -sender_canonical_maps = lmdb:/etc/postfix/sender_canonical -transport_maps = lmdb:/etc/postfix/transport -mail_spool_directory = /var/mail -message_strip_characters = \0 -defer_transports = -mailbox_command = -mailbox_transport = -mailbox_size_limit = 0 -message_size_limit = 0 -strict_8bitmime = no -strict_rfc821_envelopes = no -smtpd_delay_reject = yes -smtpd_helo_required = no - -smtpd_client_restrictions = - -smtpd_helo_restrictions = - -smtpd_sender_restrictions = lmdb:/etc/postfix/access - -smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination - - -############################################################ -# SASL stuff -############################################################ -smtp_sasl_auth_enable = no -smtp_sasl_security_options = -smtp_sasl_password_maps = -smtpd_sasl_auth_enable = no -# cyrus : smtpd_sasl_type = cyrus -# smtpd_sasl_path = smtpd -# dovecot : smtpd_sasl_type = dovecot -# smtpd_sasl_path = private/auth -smtpd_sasl_type = cyrus -smtpd_sasl_path = smtpd -############################################################ -# TLS stuff -############################################################ -#tls_append_default_CA = no -relay_clientcerts = -#tls_random_source = dev:/dev/urandom - -smtp_use_tls = no -#smtp_tls_loglevel = 0 -smtp_enforce_tls = no -smtp_tls_CAfile = -smtp_tls_CApath = -smtp_tls_cert_file = -smtp_tls_key_file = -#smtp_tls_policy_maps = lmdb:/etc/postfix/tls_policy -#smtp_tls_session_cache_timeout = 3600s -smtp_tls_session_cache_database = - -smtpd_use_tls = no -#smtpd_tls_loglevel = 0 -smtpd_tls_CAfile = -smtpd_tls_CApath = -smtpd_tls_cert_file = -smtpd_tls_key_file = -smtpd_tls_ask_ccert = no -smtpd_tls_exclude_ciphers = RC4 -smtpd_tls_received_header = no -############################################################ -# OpenDKIM -############################################################ -#smtpd_milters = unix:/run/opendkim/opendkim.sock -#non_smtpd_milters = $smtpd_milters -#milter_default_action = accept -#milter_protocol = 2 -############################################################ -# Start MySQL from postfixwiki.org -############################################################ -relay_domains = $mydestination lmdb:/etc/postfix/relay -relay_recipient_maps = hash:/etc/postfix/relay_recipients -#virtual_alias_domains = -virtual_alias_maps = lmdb:/etc/postfix/virtual -#virtual_uid_maps = static:303 -#virtual_gid_maps = static:303 -#virtual_minimum_uid = 303 -#virtual_mailbox_base = /srv/maildirs -#virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf -#virtual_mailbox_limit = 0 -#virtual_mailbox_limit_inbox = no -#virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf -## For dovecot LMTP replace 'virtual' with 'lmtp:unix:private/dovecot-lmtp' -#virtual_transport = virtual -## Additional for quota support -#virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf -#virtual_mailbox_limit_override = yes -### Needs Maildir++ compatible IMAP servers, like Courier-IMAP -#virtual_maildir_filter = yes -#virtual_maildir_filter_maps = lmdb:/etc/postfix/vfilter -#virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later. -#virtual_maildir_limit_message_maps = lmdb:/etc/postfix/vmsg -#virtual_overquota_bounce = yes -#virtual_trash_count = yes -#virtual_trash_name = ".Trash" -############################################################ -# End MySQL from postfixwiki.org -############################################################ -# Rewrite reject codes -############################################################ -#unknown_address_reject_code = 550 -#unknown_client_reject_code = 550 -#unknown_hostname_reject_code = 550 -#unverified_recipient_reject_code = 550 -#soft_bounce = yes -############################################################ -#debug_peer_list = example.com -#debug_peer_level = 3 - +readme_directory = /usr/share/doc/postfix +inet_protocols = ipv4 +shlib_directory = /usr/lib/postfix +meta_directory = /etc/postfix diff --git a/profile b/profile index 7640ca8..7a84e6b 100644 --- a/profile +++ b/profile @@ -57,6 +57,7 @@ export B2_ACCOUNT_KEY=00041845e8dd29d7e3d091d77bb8a631ee71332be7 #Master Applica #export B2_ACCOUTN_KEY=K000Zlz7MtKzu2LG0VZlYkeUitGeuHM export RESTIC_PASSWORD='f$774$#je4%U8vp8ov*UsZMHqL$m3Smh#fEbbt7hyULQxfnnWmSiS5MEndzVWT$$n^@s$P*o4vV*^rgv3jvvrv@y35VppU$$y*vnG5V@botU&4$39Y6t9HSb3Z548M!4' #export RESTIC_REPOSITORY="b2:Gerbil-TK" #Seperate buckets so not neccesarily +export RESTIC_CACHE_DIR='/var/tmp/restic' ### Shmick's Environment Variables export SCRIPTS="/home/shmick/Scripts" ### Aliases ### diff --git a/rootfs b/rootfs index f5e453d..ef2815c 100644 --- a/rootfs +++ b/rootfs @@ -48,11 +48,11 @@ TIMELINE_CLEANUP="yes" # limits for timeline cleanup TIMELINE_MIN_AGE="1800" -TIMELINE_LIMIT_HOURLY="10" -TIMELINE_LIMIT_DAILY="10" +TIMELINE_LIMIT_HOURLY="5" +TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_WEEKLY="0" -TIMELINE_LIMIT_MONTHLY="10" -TIMELINE_LIMIT_YEARLY="10" +TIMELINE_LIMIT_MONTHLY="0" +TIMELINE_LIMIT_YEARLY="0" # cleanup empty pre-post-pairs