<commit_before>#!/bin/bash

chown -R postfix:postfix /etc/postfix
chown -R vmail:vmail /srv/vmail

if [ ! -z $LOGGLY_TOKEN ]; then
  cat > /etc/rsyslog.d/22-loggly.conf <<EOF
$template LogglyFormat, "<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [$LOGGLY_TOKEN@$LOGGLY_UID tag=\"mail\"] %msg%\n"
*.* @@logs-01.loggly.com:514;LogglyFormat
EOF
fi

if [ ! -z $MAILGUN_SMTP_PASSWORD ]; then
  postconf -e \
    smtp_sasl_password_maps="static:$MAILGUN_SMTP_USERNAME:$MAILGUN_SMTP_PASSWORD" \
    relayhost="[smtp.mailgun.org]:587"
fi

exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
<commit_msg>One more time<commit_after>#!/bin/bash

chown -R postfix:postfix /etc/postfix
chown -R vmail:vmail /srv/vmail

if [ ! -z $LOGGLY_TOKEN ]; then
  mkdir -p /etc/rsyslog.d
  tee /etc/rsyslog.d/22-loggly.conf <<EOF
$template LogglyFormat, "<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [$LOGGLY_TOKEN@$LOGGLY_UID tag=\"mail\"] %msg%\n"
*.* @@logs-01.loggly.com:514;LogglyFormat
EOF
fi

if [ ! -z $MAILGUN_SMTP_PASSWORD ]; then
  postconf -e \
    smtp_sasl_password_maps="static:$MAILGUN_SMTP_USERNAME:$MAILGUN_SMTP_PASSWORD" \
    relayhost="[smtp.mailgun.org]:587"
fi

exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf

{'fraction_non_alphanumeric': 0.1708955223880597, 'fraction_numerical': 0.020895522388059702, 'mean_word_length': 4.805194805194805, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4510970', 'n_tokens_mistral': 609, 'n_tokens_neox': 582, 'n_words': 91}