I will use this Thread as a collection of various Scripts and Hacks for the Community.

For even more you could have a look in my public github grommunio repository

And if you are IRC-User, i'm also idling in #grommunio on https://www.oftc.net

Suggestions are always welcome.

The thread is closed to keep it easy to read.
Just start a new thread with a reference to whatever.

Grommunio-Admin

Completion

apt-get|zypper install bash-completion python3-argcomplete
eval "$(register-python-argcomplete grommunio-admin --complete)"
# OR
apt-get|zypper install bash-completion grommunio-admin-api-bash-completion

ShellCheck!

zypper in ShellCheck
#OR
apt-get install shellcheck

grom_users - Return List of all Users [ optional Filter on Domain ]

grom_doms() { grommunio-admin domain list |awk '{print $2}' ; }
grom_users() {
  local doms
  if [[ "$#" -ge 1 ]]; then
    doms=$(grep "^${1}" <<< "$(grom_doms)")
  else
    doms=$(grom_doms)
  fi
  for dom in $doms; do \
    grommunio-admin user query --format json-structured | \
    jq -r '.[]|select(.username|endswith("'"${dom}"'"))|.username'
  done
}

EXMDB - man

exmdb_list_folders

exmdb_list_folders() { 
  local U SHORT RE HEXIT
  case $1 in
    "$(grep "^$1" <<< $(grom_users))") 
      U="${1}"
      shift;;
    *)return 1;;
  esac
  for arg in "$@"
  do
    case "$arg" in
      -s) SHORT=1;;
      -r) RE="-r";;
      -h) HEXIT=1;;
      *);;
    esac
  done
  grommunio-admin exmdb "${U}" folder list --format csv $RE |sed '1d' |awk -F, '{print $1";"$3}' | while read LINE; do
  if [ ${HEXIT+x} ] ; then LINE=$(echo $LINE|awk -F";" '{printf "0x%x;%s\n", $1, $2}') ; fi
  if [ ${SHORT+x} ] ; then LINE=$(echo $LINE|cut -d";" -f1) ; fi
  echo "${LINE}"
done
}

exmdb_get_permissions

_exmdb_folders_long(){ exmdb_list_folders $1 -r -h ; }
_exmdb_folders_short(){ exmdb_list_folders $1 -r -h  -s ; }

#GetFolderPermissions
exmdb_get_permissions() {
  local folders owner short
  _grom_users="${_grom_users:=$(grom_users)}"
  local owner folders user folder
  if [[ "$_grom_users" =~ $1 ]]; then
    owner="${1}"
    folders=${folders:="$(_exmdb_folders_long $owner)"}
    short=${short:="$(_exmdb_folders_short $owner)"}
    for name in $short; do
      echo $(awk "/^$name;/" <<< $folders)
      grommunio-admin exmdb "${owner}" folder permissions "${name}" ${user}
    done
  fi
}
complete -F _comp_grom_users exmdb_get_permissions

exmdb_set_stdFolders - Overwrite $_exmdb_std_folders

Example for MH that shouldn't have Full $Perms

# Default Folders
#  0x9;Oberste Ebene des Informationsspeichers
#  0xa;Gesendete Elemente
#  0xb;Gelöschte Elemente
#  0xc;Postausgang
#  0xd;Posteingang
#  0xe;Entwürfe
#  0xf;Kalender
#  0x10;Journal
#  0x11;Notizen
#  0x12;Aufgaben
_exmdb_std_folders="$(echo 0x{10..12} 0x{a..f})
exmdb_set_stdFolders() { 
  local owner user acl acls
  if [[ "$#" -ge 3 ]]; then
    owner="${1}"
    user="${2}"
    shift 2
    acls="${@}"
    grommunio-admin exmdb "${owner}" folder grant 0x9 "${user}" foldervisible
    for folder in ${_exmdb_std_folders}; do
      #hmmmm ... worked different $someday
      for acl in $acls; do
        grommunio-admin exmdb "${owner}" folder grant "${folder}" "${user}" "${acl}"
      done
    done
  fi
}
# completion
ACL="all create createsubfolder deleteany deleteowned editany editowned foldercontact folderowner foldervisible freebusydetailed freebusysimple readany sendas storeowner"
_comp_exmdb_set_stdFolders() {
  _grom_users="${_grom_users:=$(grom_users)}"
  local cur
  COMPREPLY=()
  cur="${COMP_WORDS[COMP_CWORD]}"
  case $COMP_CWORD in
    1)
      COMPREPLY=( $(compgen -W "${_grom_users}" -- ${cur}) )
      ;;
    2)
      COMPREPLY=( $(compgen -W "${_grom_users}" -- ${cur}) )
      ;;
    *)
      COMPREPLY=( $(compgen -W "\$ACL ${ACL}" -- ${cur}) )
      ;;
  esac
  return 0
}
complete -F _comp_exmdb_set_stdFolders exmdb_set_stdFolders

Cleaning

Empty "Deleted Items"

_grom_query_trashbin_count() {
  local user mdir sel
  _grom_users="${_grom_users:=$(grom_users)}"
  if [[ "$#" -eq 0 ]]; then
    for user in $_grom_users; do
      printf '%s;%s\n' "$user" "$(_grom_query_trashbin_count "${user}")"
    done
  fi
  if [[ "$#" -eq 1 ]]; then
    if [[ "$_grom_users" =~ "$1" ]]; then
      user="$1"
      mdir="$(_grom_query_maildir ${user})/exmdb/exchange.sqlite3"
      sel="select count(message_id) from messages where parent_fid=0xb;"
      echo $(sqlite3 ${mdir} "${sel}")
    fi
  fi
}

_grom_query_trashbin_ids() {
  local user mdir sel
  if [[ "$#" -eq 1 ]]; then
    _grom_users="${_grom_users:=$(grom_users)}"
    if [[ "$_grom_users" =~ "$1" ]]; then
      mdir="$(_grom_query_maildir $1)/exmdb/exchange.sqlite3"
      sel="select message_id from messages where parent_fid=0xb;"
      printf '%s ' "$(sqlite3 ${mdir} "${sel}")"
    fi
  fi
}

_grom_empty_trashbin() {
  local user msgid
  _grom_users="${_grom_users:=$(grom_users)}"
  if [[ "$#" -eq 0 ]]; then
    for user in $_grom_users; do
      _grom_empty_trashbin "${user}"
    done
  fi
  if [[ "$#" -eq 1 ]]; then
    if [[ "$_grom_users" =~ "$1" ]]; then
      user="$1"
      logger -t grom_empty_trashbin \
        "$user: $(_grom_query_trashbin_count "$user") messages to remove"
      for msgid in $(_grom_query_trashbin_ids ${user}); do
        _grom_empty_trashbin ${user} ${msgid}
      done
    fi
  fi
  if [[ "$#" -eq 2 ]]; then
    _grom_users="${_grom_users:=$(grom_users)}"
    if [[ "$_grom_users" =~ "$1" ]]; then
      user="$1"
      msgid="$2"
      (
      printf '%s: %s\n' "${user}" "${msgid}"
      /usr/libexec/gromox/delmsg -u "${user}" -f 0xb "${msgid}" 
      ) | logger -t _grom_empty_trashbin 
    fi
  fi
}

Cleanup orphaned content

/usr/libexec/gromomx/cleaner is removed in version 2.10+

and replace by gromox-mbop ... purge-datafiles

_grom_query_maildir(){
  grommunio-admin user query --filter username="${1}" maildir
}
# gromox-2.10+
grom_cleanup() {
  local maildir
  for user in $(grom_users); do
    yellow "User: ${user}"
    maildir="$(_grom_query_maildir $user)"
    printf 'purge-datafiles: %s\n' "${maildir}"
    gromox-mbop -d "${maildir}" purge-datafiles
    printf 'vacuum: %s\n' "${maildir}"
    gromox-mbop -d "${maildir}" vacuum
  done
  echo -e "$MESSAGE"
}

old version

# gromox-2.9-
grom_cleanup_old() {
  local maildir
  MESSAGE="\n\tTo really cleanup use: "$(blue "grom_cleanup")" "$(red "clean")"\n"
  SWITCH="-n";
  if [[ "$1" = "clean" ]]; then SWITCH="";MESSAGE=""; fi
  for user in $(grom_users); do
    yellow "User: ${user}:"
    maildir="$(_grom_query_maildir $user)"
    /usr/libexec/gromox/cleaner "${SWITCH}" -d "${maildir}" |grep --color=always -e "^" -e "[^ ]*[0-9](M|G)B" 
    printf 'vacuum: %s\n' "${maildir}" ;  /usr/sbin/gromox-mbop vacuum "${maildir}"
  done
  echo -e "$MESSAGE"
}

Simple Bash-Completion

# completion
_comp_grom_users() {
  _grom_users="${_grom_users:=$(grom_users)}"
  local cur
  COMPREPLY=()
  cur="${COMP_WORDS[COMP_CWORD]}"
  case $COMP_CWORD in
    1)
      COMPREPLY=( $(compgen -W "${_grom_users}" -- ${cur}) )
      compopt +o nospace
      ;;
  esac
  return 0
}
complete -F _comp_grom_users _grom_query_trashbin_count _grom_query_maildir _grom_query_trashbin_ids _grom_empty_trashbin
    8 days later
    crpb changed the title to grommunio - scripting .
    11 days later

    Ich habe die Idee mal aufgegriffen. Für gromox-1.28.73 kann man jetzt gromox-mbop vacuum /var/... machen. So lässt sich das ohne Stop des gromox-http durchführen. (Auch sonst ist das vermutlich nicht nötig—sqlite sollte doch eigentlich einen Write-Lock anlegen.)

    • crpb replied to this.

      Snippets from the Past

      Just to show how something could be handled :-)

      parse grommunio-admin exmdb mail@domain.tld folder list -r without those damn special-chars

      #!/usr/bin/env bash
      #set -x
      IFS=$'\n' fldlist=( $(grommunio-admin exmdb mbx@domain.tld folder list -r|sed 's/[^[:blank:][:alnum:]]//g;s/^[ \t]*//') )
      num=${#fldlist[@]}
      for fld in "${fldlist[@]}"; do
      ID="${fld##* }"
      NAME="${fld% *}"
      printf "%s\n" "$ID $NAME"
      done
      9 days later

      kopano2grommunio.sh

      create_k2g_migration_lists.sh

      Snippets you could use to finally be lazy

      on the old kopano-host

      # vim: filetype=bash
      #-->SSH->KOPANO-SERVER
      # allow ssh as root
      sudo -i
      # shellcheck disable=2174
      mkdir -p -m 0700 ~/.ssh/
      # install our pubkey
      curl -L https://host.tld/key.pub >> ~/.ssh/authorized_keys
      # allow ssh root-login
      sed -i 's/^.*RootLogin.*$/PermitRootLogin=yes/g' /etc/ssh/sshd_config
      systemctl restart ssh
      # allow remote mysql
      PASSWD=$(< /dev/urandom tr -dc A-Za-z0-9 | head -c"${1:-12}";echo;)
      MYSQLDFILE=$(grep -iRl bind-address /etc/mysql/  |grep -v dpkg-dist)
      sed -i 's/bind-address.*/bind-address = 0.0.0.0/g' "${MYSQLDFILE}"
      sed -i 's/mysqlx-bind-.*/^#mysqlx-bind-address = 127.0.0.1/g' "${MYSQLDFILE}"
      systemctl restart mysql
      #... if something is faulty this will break...
      #echo "CREATE USER 'gromox'@'gromi."$(dnsdomainname)"' IDENTIFIED BY '"$PASSWD"';" |mysql
      #echo "GRANT SELECT ON "$DATABASE".* TO 'gromox'@'gromi."$(dnsdomainname)"';" |mysql
      #IP=$(host gromi.$(dnsdomainname) |cut -d' ' -f4)
      #echo "GRANT SELECT ON "$DATABASE".* TO 'gromox'@"$IP";" |mysql
      #...
      # Do we need a Password?
      if ! mysql<<<"exit"&>/dev/null; then
       echo -e "\n export MYSQL_PWD=\"SECRET\" to hide this prompt.\n"
       MYSQL_PWD="${MYSQL_PWD:-"$(read -r -s -p "MYSQLPASS: " ; echo "$REPLY")"}"
       export MYSQL_PWD && echo
      fi
      DATABASE=$(mysql<<<"SHOW DATABASES"|sort|grep -E 'kopano|zarafa'|head -n1)
      # Yes! I'm to lazy to combine those commands into less...
      if mysql -V |grep -qi 'maria'; then
        mysql << MARIA
      CREATE USER
        'gromox'@'%'
      IDENTIFIED BY
        "${PASSWD}";
      GRANT ALL PRIVILEGES
        ON ${DATABASE}.*
        TO 'gromox'@'%';
      FLUSH PRIVILEGES;
      MARIA
      else
        mysql << MYSQL
      CREATE USER
        'gromox'@'%'
      IDENTIFIED WITH
      mysql_native_password BY
        "${PASSWD}";
      GRANT ALL PRIVILEGES
        ON ${DATABASE}.*
        TO 'gromox'@'%';
      FLUSH PRIVILEGES;
      MYSQL
      fi
      echo "${PASSWD}" >~/.mysql_pass_gromox
      echo "${DATABASE}" >~/.mysql_database
      cat << REM
      #######################
      #REMEMBER: $PASSWD
      #######################
      REM

      On our new grommunio-host

      ForwardAgent=yes

      zypper --non-interactive install --auto-agree-with-licenses sshfs --yes
      mkdir -p ~/import ~/bin
      # Walter's Script https://github.com/grommunio/gromox/blob/master/tools/kopano2grommunio.sh
      wget -P ~/bin/ https://raw.githubusercontent.com/grommunio/gromox/master/tools/kopano2grommunio.sh
      SCRIPT="/root/bin/kopano2grommunio.sh"
      chmod +x $SCRIPT
      # setup connection-info
      KOPANOSERVER="mail.$(dnsdomainname)"
      MYSQLPASS=$(ssh $KOPANOSERVER cat ~/.mysql_pass_gromox)
      MYSQLDATABASE=$(ssh $KOPANOSERVER cat ~/.mysql_database)
      # generate k2glist
      # new alternative for this command !!!!!!!!!!
      # take a look at https://github.com/grommunio/gromox/blob/master/tools/create_k2g_migration_lists.sh
      # thx @WaltherH
      ssh -t $KOPANOSERVER -- "for user in \$(kopano-admin -l |tail -n +5|head -n -1|awk '{print \$1}'); do EMAIL=\$(kopano-admin --details \${user} | sed -n '/address\:\s/ p'|awk '{print \$NF}'); GUID=\$(kopano-admin --details \${user} | sed -n '/GUID\:\s/ p'|awk '{print \$NF}');echo "\$EMAIL,\$GUID,1" ;done" |tee -a ~/import/k2g_list.txt
      # sed script replace stuff
      sed -i -f - <<_SED_  $SCRIPT
      /^KopanoServer/s/kopano.example.com/$KOPANOSERVER/
      /^KopanoAttachments/s/srv/var\/lib/
      /^KopanoMySqlUser/s/GrommunioUser/gromox/
      /^KopanoMySqlPWD/s/Secret_mysql_Password/$MYSQLPASS/
      s/^KopanoDB=.*/KopanoDB="$MYSQLDATABASE"/
      s|/tmp/|/root/import/|g
      /^CreateGrommunioMailbox/s/1/0/
      _SED_
      crpb changed the title to grommunio - scripting / snippets / notepad .

      nginx - activate ocsp if enabled in certificate + dhparam

      2022-09-10 rewritten it to extend admin-web and dhparam in another file_location - /etc/ssl/certs/dhparam.pem can be destroyed by some nss/ca zypper update ...

      #!/bin/bash
      #changed to a file not in /etc/ssl/certs as zypper deletes them with updates?!
      DHPARAM=/etc/nginx/dhparam.pem
      # shellcheck disable=2207
      IFS=$'\n' SSLPARAMS=($(find /usr/share/grom* -iname '*ssl*params.conf'))
      # activate dhparam
      if [ ! -f $DHPARAM ]; then
        # -dsaparam is faster and should be _safe_ enough
        openssl dhparam -dsaparam -out $DHPARAM 4096
        chmod 640 $DHPARAM
      fi
      
      # SPLIT CERT-CHAIN
      FULLCHAIN=$(</etc/grommunio-common/ssl/server-bundle.pem)
      CERTIFICATE="${FULLCHAIN%%-----END CERTIFICATE-----*}-----END CERTIFICATE-----"
      CHAIN=$(echo -e "${FULLCHAIN#*-----END CERTIFICATE-----}" | sed '/./,$!d')
      
      # Check if got an ocsp staple in our certificate
      check_ocsp () {
        openssl ocsp -issuer <(echo "$CHAIN") -cert <(echo "$CERTIFICATE") -text \
          -url "$(openssl x509 -noout -ocsp_uri -in <(echo "$CERTIFICATE"))" |& \
          grep -q "Response verify OK"
      }
      
      for conf in "${SSLPARAMS[@]:-}"; do
        sed -i -e 's/^\# ssl_dhparam \/etc/ssl_dhparam \/etc/g' \
          -e "s|/etc/ssl/certs/dhparam.pem|$DHPARAM|g" "${conf}"
        if check_ocsp; then
          if ! grep -q "^ssl_stapling" "${conf}" ; then
            cat << 'EOF' >> "${conf}"
      ssl_stapling on;
      ssl_stapling_verify on;
      EOF
          fi
        fi
      done

      Debian

      NGINX - Build missing modules

      prerequests
      mkdir -p ~/src
      cd ~/src
      apt-get build-dep nginx-full
      wget https://nginx.org/download/nginx-1.18.0.tar.gz
      tar xfvz nginx-1.18.0.tar.gz
      host traffic status
      cd ~/src/
      git clone https://github.com/vozlt/nginx-module-vts.git
      cd nginx-1.18.0/
      #Here we look for our prefix..
      nginx -V |& grep configure\ arguments |sed 's/.*prefix/--prefix/'
      #now use it...
      OPTS=$(echo $(nginx -V |& grep configure\ arguments |sed 's/.*prefix/--prefix/') --add-dynamic-module=../nginx-module-vts/)
      ./configure $OPTS
      make modules
      cp objs/ngx_http_vhost_traffic_status_module.so /usr/lib/nginx/modules/
      echo  "load_module /usr/lib/nginx/modules/ngx_http_vhost_traffic_status_module.so;" > /etc/nginx/modules-available/90-mod-vhost-traffic-status.conf
      ln -s /etc/nginx/modules-available/90-mod-vhost-traffic-status.conf /etc/nginx/modules-enabled/
      brotli
      cd ~/src/
      git clone https://github.com/google/ngx_brotli.git
      cd nginx-1.18.0/
      OPTS=$(echo $(nginx -V |& grep configure\ arguments |sed 's/.*prefix/--prefix/') --add-dynamic-module=../ngx_brotli/)
       ./configure $OPTS
      make modules
      cp objs/ngx_http_brotli_*.so /usr/lib/nginx/modules/
      cat << EOF >> /etc/nginx/modules-available/90-mod-brotli.conf
      load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
      load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so;
      EOF
      ln -s /etc/nginx/modules-available/90-mod-brotli.conf /etc/nginx/modules-enabled/
      nginx -t && nginx -s reload

      Automated version with Configs from RPMs and other sutff

      • crpb replied to this.
        8 days later
        grommunio-admin ldap + dbconf defaults
        #!/bin/sh
        #
        # This File is a demonstration of dbconf capabilities.
        # https://docs.grommunio.com/man/grommunio-admin-dbconf.html
        # https://docs.grommunio.com/man/grommunio-admin-mconf.html
        #
        # shellcheck disable=SC2016
        #
        # gro-ad-exmdb-store sizes.. 2022/08 
        mb() { printf "(%f*1024^1)/1\n" "$1"| bc ; }
        gb() { printf "(%f*1024^2)/1\n" "$1"| bc ; }
        tb() { printf "(%f*1024^3)/1\n" "$1"| bc ; }
        
        #who likes long command-chains?
        cmd=$(which grommunio-admin)
        dbset () { $cmd dbconf set "$1" "$2" "$3" "$4" ; } 
        #Set only LDAP-Auth via mconf
        $cmd mconf modify authmgr set authBackendSelection alywas_ldap
        #Set Gromox-Mailbox-Defaults - i think those are all possible values
        defaults() { dbset grommunio-admin defaults-system "$1" "$2" ; }
        defaults user.lang 'de_DE'
        defaults user.pop3_imap true
        defaults user.properties.prohibitsendquota    "$(gb 0.4)"
        defaults user.properties.prohibitreceivequota "$(gb 0.5)"
        defaults user.properties.storagequotalimit    "$(gb 0.6)"
        defaults domain.maxUser 25
        defaults user.smtp false
        defaults domain.chat true
        defaults user.changePassword false
        defaults user.privChat false
        defaults user.privVideo false
        defaults user.privFiles false
        defaults user.privArchive false
        defaults user.chat false
        
        #Now we will use dbconf for postfix-settings
        # - Setup dbconf-mechanism for postfix
        dbset grommunio-dbconf postfix commit_key 'postconf -e $ENTRY'
        #this _should_ also work  -  ¯\_(ツ)_/¯
        dbset grommunio-dbconf postfix commit_service 'systemctl reload-or-restart $SERVICE'
        #Setup dbconf-postfix-settings
        #Helper
        postconf() { dbset postfix main.cfg "$1" "$2" ; }
        # - Max Message Size - replace mb() to be postfix-compatible
        mb() { printf "(%f*1024^2)/1\n" "$1"| bc ; }
        postconf message_size_limit "$(mb 50)"
        # - various SSL/TLS-Settings
        postconf smtp_sasl_auth_enable yes
        postconf smtp_sasl_security_options noanonymous
        postconf smtp_use_tls yes
        postconf smtpd_tls_mandatory_protocols '!SSLv2,!SSLv3,!TLSv1,!TLSv1.1'
        postconf smtpd_tls_protocols '!SSLv2,!SSLv3,!TLSv1,!TLSv1.1'
        # - Relay-Host
        # postconf smtp_sasl_password_maps 'lmdb:/etc/postfix/sasl_passwd'
        # the rest via ./postfix/postfix.sh for now...
        15 days later

        grom_du (disk usage) of all users

        grommunio-admin fs du user will get that sooner or later i guess. I was still too lazy to work my way through there :P.
        FYI: Mailbox-Size differs from Disk-Usage and Disk-Usage differs on $Filesystem - (-)

        alias grom_du='grommunio-admin user query username maildir |sed 1,2d | while read -r user mdir; do printf "%s;%s;%s\n" "$(du -hs ${mdir}|cut -f1)" "$user" "$mdir"; done  |sort -h'

          Autodiscover for all those other Clients.

          WIP!

          bind9 template

          % cat ~/tmpl/srv
          ; vim:filetype=bindzone
                                 TXT              "mailconf=https://grommunio-host.domain.tld/.well-known/autoconfig/mail/config-v1.1.xml"
          $ORIGIN domain.tld.
          _autodiscover._tcp IN  SRV    0  1  443 grommunio-host.domain.tld.
          _caldav._tcp       IN  SRV    0  0  0   .
          _caldavs._tcp          TXT              "path=/dav/calendars"
          _caldavs._tcp      IN  SRV    0  1  443 grommunio-host.domain.tld.
          _carddav._tcp      IN  SRV    0  0  0   .
          _carddavs._tcp         TXT              "path=/dav/addressbooks"
          _carddavs._tcp     IN  SRV    0  1  443 grommunio-host.domain.tld.
          _imap._tcp         IN  SRV    0  1  143 grommunio-host.domain.tld.
          _imaps._tcp        IN  SRV    0  1  993 grommunio-host.domain.tld.
          _pop3._tcp         IN  SRV    0  1  110 grommunio-host.domain.tld.
          _pop3s._tcp        IN  SRV    0  1  995 grommunio-host.domain.tld.
          _sieve._tcp        IN  SRV    0  0  0   .
          ;_sieve._tcp        IN  SRV 0 1 4190  grommunio-host.domain.tld.
          _smtp._tcp         IN  SRV    0  1  25  grommunio-host.domain.tld.
          _smtps._tcp        IN  SRV    0  0  0   .
          ;_smtps._tcp        IN  SRV 0 1 465 grommunio-host.domain.tld.
          _submission._tcp   IN  SRV    0  1  587 grommunio-host.domain.tld.
          autodiscover       IN  CNAME            grommunio-host.domain.tld.

          RFC 2782
          RFC 6186
          RFC 6764

            crpb

            unfortuanetly, this only seems to work for Outlook and iOS. Neither Apple Mail or Thunderbird do seem to care about these. I know that Thunderbird looks for something called Autoconfig and Apple Mail's autodiscover mechanism seems to be even more opaque. It's such a downer, that everyone seems to cook up their own solution for this.

            • crpb replied to this.

              sbudach

              My Claws-Mail at least is happy with those imaps and submission-references.

              EDIT: Did a bit of reading on Thunderbird...
              https://wiki.mozilla.org/Thunderbird:Autoconfiguration
              https://wiki.mozilla.org/Thunderbird:Autoconfiguration:DNSBasedLookup

              Maybe there already is such an app or i think i will write my own little bottle-app to provide a backend for "TXT mailconf=uri.to.app/emaildomain.tld" which then does an SRV-Lookup and generate a config.xml with the corresponding fields...

              OR SOMETHING LIKE THAT o_0..
              Still need to test if those config.xml with "TXT mailconf=" entries even work now. Most references in the mozilla-wiki are dead...

                crpb

                Yeah… I read something about such an app. I wasn't aware, that you can invoke it as a result of a TXT DNS lookup…

                Well, each domain would just have an DNS TXT Entry Pointing to "mailconf=https://uri.to.app/dnsdomain.tld" to make it possible.
                For clarification an example with dig

                # dig +short TXT domainA.tld
                "v=spf1 mx -all"
                "mailconf=https://ac.my.app/mail/domainA.tld/config.xml"
                # dig +short TXT domainB.tld
                "v=spf1 mx -all"
                "mailconf=https://ac.my.app/mail/domainB.tld/config.xml"

                EDIT:
                And internally it should query all those SRV-Entries on "domainA|B|X.tld" and generate a config with the respective DNS-Priorities. So basically as default something like: incomingserver imap+ssl, outgoingserver submission+tls if you use that template from above.

                Nothing really test so far! Just a thought of how this could be done without all those other "A" subdomains (autoconfig|autodiscover.domain.tld) and no extra configuration needed at company-domain.tld.

                And after a bit of searching i at least found a few references. But not exactly what i was thinking about.
                https://rseichter.github.io/automx2/
                https://github.com/Monogramm/autodiscover-email-settings

                cheers!

                a month later

                BTRFS MAINTENANCE

                To not have to care so much about doing recommended regularly Maintenance-Tasks on the BTRFS Volumes you can install the Package btrfsmaintenance.

                There is also an article about disabling btrfsmaintenance but the note "Disabling automatic drive maintenance, in favor of manual maintenance, is desired." without any explanation is nor helpful at all.

                zypper refresh
                zypper install -y btrfsmaintenance
                # Let the script do most of the work on all (sub)volumes
                sed '/^BTRFS/s/\//auto/g' /etc/sysconfig/btrfsmaintenance -i
                systemctl restart btrfsmaintenance-refresh.service

                By default the Systemd-Timers btrfs.scrub and btrfs-balance are now active. I guess this enough for now.

                25 days later

                crpb To find the users and their mail directories, there is a single line command:
                echo "select maildir,username from users where maildir<>'';" | mysql -N grommunio | sort

                © 2020-2024 grommunio GmbH. All rights reserved. | https://grommunio.com | Data Protection | Legal notice