Ignore:
Timestamp:
04/26/18 17:32:02 (7 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
gcc484, master, perl-5.22
Children:
dd97a57
Parents:
a1525ed
Message:

improved logging. auth and tls support. qmail-submission on port 587 (requires both tls and auth to relay mails from the internet)

Location:
npl/mailserver/netqmail_conf
Files:
9 added
11 edited

Legend:

Unmodified
Added
Removed
  • npl/mailserver/netqmail_conf/netqmail_conf.build

    ra1525ed rcd8630b  
    1 12
     144
  • npl/mailserver/netqmail_conf/netqmail_conf.md5

    ra1525ed rcd8630b  
    1 a83917f02f1e85d479845f7320f0dae7  ./netqmail_conf.pkg
     14a3ea1f245ba89dbd4c44d7b173fa573  ./netqmail_conf.pkg
    22f4f9e3673e49bd56810ee75e666f51a0  ./netqmail_conf.SlackBuild
    3 645660c303d54a7f7bb3a8e353d1c2da  ./netqmail_conf.SlackBuild.log.gz
    4 2a672ffe56f6e7145f57531c29299a81  ./root/etc/postinst.d/post.qmail_conf
     39051cc6545cbb773b6a114d4d6015b3e  ./netqmail_conf.SlackBuild.log.gz
     45bdd6ee187432550f75b30b467f6d2c3  ./root/etc/postinst.d/post.qmail_conf
    55efed79f2f7840be05415132dd99e005a  ./root/etc/qmail.permissions
    66a781066c2d8b2e42e4eae0cd0545391b  ./root/etc/qmail.rc.config
     
    881dcca23355272056f04fe8bf20edfce0  ./root/home/system/qmail/control/concurrencyincoming.new
    99d41d8cd98f00b204e9800998ecf8427e  ./root/home/system/qmail/control/defaultdomain.new
     10919d117956d3135c4c683ff021352f5c  ./root/home/system/qmail/control/maxrcpt.new
    10112909a2c64757ce93daa60e3cfc653ef1  ./root/home/system/qmail/control/qmqpservers.new
    1112d41d8cd98f00b204e9800998ecf8427e  ./root/home/system/qmail/control/rcpthosts.new
     13063221b732091cd47898d4f4de0d3a86  ./root/home/system/qmail/control/relaylimits.new
     147f06a0bdfe40105eb7150c89ca23fe0a  ./root/home/system/qmail/control/softlimit.new
     156d7fce9fee471194aa8b5b6e47267f03  ./root/home/system/qmail/control/spfbehavior.new
    1216d41d8cd98f00b204e9800998ecf8427e  ./root/home/system/qmail/control/virtualdomains.new
    1317d41d8cd98f00b204e9800998ecf8427e  ./root/home/system/qmail/queue/lock/sendmutex
    14180f343b0931126a20f133d67c2b018a3b  ./root/home/system/qmail/queue/lock/tcpto
    15 18b654d9240fe02239158602ca741e11  ./root/home/system/qmail/tcp.smtp.new
     195e6055ce99316030e416d8f7243e99cd  ./root/home/system/qmail/tcp.smtp.new
     200361f8191be2fc0c7a64208973181e81  ./root/home/system/qmail/tcp.submission.new
    1621c373bf047e4be7894e0eb539ecade81e  ./root/home/system/qmail/users/assign.new
    1722a85ddde2346842cfb84c449322334cf6  ./root/usr/bin/syn3-dagent
    1823997aa1db669e5946bc88187056e5983e  ./root/var/qmail/bin/qmailctl
    19 f111ffdeddc4e3608dcfe1a23aea575e  ./root/var/qmail/rc
    20 834dad5113515d0f00981fdc1d07fa84  ./root/var/qmail/supervise/qmail-send/log/run
    21 3af893d1db453aa180125cb7678d9f4c  ./root/var/qmail/supervise/qmail-send/run
    22 f43900d79a0aacb5e0d71b0bb6c06fea  ./root/var/qmail/supervise/qmail-smtpd/log/run
    23 dbafd2aadce02c19799a16ed00fc01dd  ./root/var/qmail/supervise/qmail-smtpd/run
     24d219929668d14245324a90cc8889a953  ./root/var/qmail/bin/rcptcheck-overlimit.sh
     25b6d113884ec042aa912297837d7e1711  ./root/var/qmail/rc
     26d2264d4a1eb480b446148386491d6d96  ./root/var/qmail/supervise/qmail-send/log/run
     27ce8344b9f086b8d80deedd97999af4a2  ./root/var/qmail/supervise/qmail-send/run
     28664eb748dcf70763bbb8af153a60f4fc  ./root/var/qmail/supervise/qmail-smtpd/log/run
     29d1b75635cf714be5a03ae4b559eabff7  ./root/var/qmail/supervise/qmail-smtpd/run
     300c00964a4500bb13bcba905b59954802  ./root/var/qmail/supervise/qmail-submission/log/run
     3100df93e4a56a546880039677deb50a30  ./root/var/qmail/supervise/qmail-submission/run
  • npl/mailserver/netqmail_conf/root/etc/postinst.d/post.qmail_conf

    ra1525ed rcd8630b  
    3737
    3838
     39# logging via syslog in /var/log/maillog from now on
     40rm -rf /var/log/qmail/
     41
     42
    3943# permissions
    4044. /etc/qmail.permissions
    4145qmail_permissions
    42 cd /var/log/qmail
    43 chown -R qmaill.nofiles .
    44 chgrp root .
    45 chmod -R og-wrx .
    46 chmod g+rx .
     46
    4747
    4848#stuff
     
    6161#regenerate cdb
    6262tcprules /etc/qmail/tcp.smtp.cdb /etc/qmail/tcp.smtp.tmp < /etc/qmail/tcp.smtp
     63tcprules /etc/qmail/tcp.submission.cdb /etc/qmail/tcp.submission.tmp < /etc/qmail/tcp.submission
     64
     65
     66#TLS configuration
     67if ! [ -e /var/qmail/control/dh1024.pem ]; then
     68    openssl dhparam -out /var/qmail/control/dh1024.pem.tmp 1024 || exit 1
     69    chown qmaild /var/qmail/control/dh1024.pem.tmp || exit 1
     70    chmod 400 /var/qmail/control/dh1024.pem.tmp || exit 1
     71    mv /var/qmail/control/dh1024.pem.tmp /var/qmail/control/dh1024.pem || exit 1
     72fi
     73
     74
     75
    6376
    6477#enable scripts (x is disble to prevent starting up after first installation of binary)
    65 chmod +x /service/qmail-smtpd/run /service/qmail-send/run /service/qmail-send/log/run /service/qmail-smtpd/log/run
     78chmod +x /service/qmail-smtpd/run /service/qmail-send/run /service/qmail-send/log/run /service/qmail-smtpd/log/run /service/qmail-submission/run /service/qmail-submission/log/run
  • npl/mailserver/netqmail_conf/root/home/system/qmail/tcp.smtp.new

    ra1525ed rcd8630b  
    2020192.168.:allow,RELAYCLIENT="",QMAILQUEUE="bin/qmail-qmqpc"
    212110.:allow,RELAYCLIENT="",QMAILQUEUE="bin/qmail-qmqpc"
    22 :allow,QMAILQUEUE="bin/qmail-qmqpc"
     22:allow,QMAILQUEUE="bin/qmail-qmqpc",CHKUSER_WRONGRCPTLIMIT="3"
  • npl/mailserver/netqmail_conf/root/var/qmail/rc

    ra1525ed rcd8630b  
    11#!/bin/sh
    2 exec env - PATH="/var/qmail/bin:$PATH" qmail-start ''  splogger qmail
     2
     3# Using stdout for logging
     4# Using control/defaultdelivery from qmail-local to deliver messages by default
     5
     6# DKIM signign
     7#exec env - PATH="/var/qmail/bin:$PATH" \
     8#QMAILREMOTE=/var/qmail/bin/spawn-filter  \
     9#FILTERARGS=/var/qmail/bin/dk-filter \
     10#qmail-start "`cat /var/qmail/control/defaultdelivery`"
     11
     12exec env - PATH="/var/qmail/bin:$PATH" \
     13qmail-start "`cat /var/qmail/control/defaultdelivery`"
  • npl/mailserver/netqmail_conf/root/var/qmail/supervise/qmail-send/log/run

    ra1525ed rcd8630b  
    11#!/bin/sh
    2 exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-send
     2exec /usr/bin/setuidgid qmaill logger -t qmail-send -p mail.info
  • npl/mailserver/netqmail_conf/root/var/qmail/supervise/qmail-send/run

    ra1525ed rcd8630b  
    11#!/bin/sh
     2exec 2>&1
     3
    24#dynamic update of hostname
    35hostname -f > /var/qmail/control/me
  • npl/mailserver/netqmail_conf/root/var/qmail/supervise/qmail-smtpd/log/run

    ra1525ed rcd8630b  
    11#!/bin/sh
    2 exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-smtpd
     2exec /usr/bin/setuidgid qmaill logger -t qmail-smtpd -p mail.info
  • npl/mailserver/netqmail_conf/root/var/qmail/supervise/qmail-smtpd/run

    ra1525ed rcd8630b  
    11#!/bin/sh
     2
     3exec 2>&1
     4
     5##### OUD
     6# QMAILDUID=`id -u qmaild`
     7# NOFILESGID=`id -g qmaild`
     8# MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
     9# LOCAL=`head -1 /var/qmail/control/me`
     10# if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
     11#     echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
     12#     echo /var/qmail/supervise/qmail-smtpd/run
     13#     exit 1
     14# fi
     15# if [ ! -f /var/qmail/control/rcpthosts ]; then
     16#     echo "No /var/qmail/control/rcpthosts!"
     17#     echo "Refusing to start SMTP listener because it'll create an open relay"
     18#     exit 1
     19# fi
     20# exec /usr/bin/softlimit -m 150000000 /usr/bin/tcpserver -v -R -l "$LOCAL" -x /etc/qmail/tcp.smtp.cdb -c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /usr/bin/rblsmtpd -r cbl.abuseat.org -r bl.spamcop.net /usr/bin/fixcrio /var/qmail/bin/qmail-smtpd 2>&1
     21######
     22
    223QMAILDUID=`id -u qmaild`
    324NOFILESGID=`id -g qmaild`
    425MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
     26SOFTLIMIT=`cat /var/qmail/control/softlimit`
    527LOCAL=`head -1 /var/qmail/control/me`
    6 if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
    7     echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
    8     echo /var/qmail/supervise/qmail-smtpd/run
    9     exit 1
    10 fi
    11 if [ ! -f /var/qmail/control/rcpthosts ]; then
    12     echo "No /var/qmail/control/rcpthosts!"
    13     echo "Refusing to start SMTP listener because it'll create an open relay"
    14     exit 1
    15 fi
    16 exec /usr/bin/softlimit -m 150000000 /usr/bin/tcpserver -v -R -l "$LOCAL" -x /etc/qmail/tcp.smtp.cdb -c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /usr/bin/rblsmtpd -r cbl.abuseat.org -r bl.spamcop.net /usr/bin/fixcrio /var/qmail/bin/qmail-smtpd 2>&1
     28
     29# This enables greetdelay for qmail-smtpd
     30export SMTPD_GREETDELAY=20
     31export DROP_PRE_GREET=1
     32
     33# This enables chkuser
     34export CHKUSER_START=ALWAYS
     35
     36# DKIM - SURBL configuration
     37# DKIMQUEUE and SURBLQUEUE are front-ends of qmail-queue
     38#export SURBL=1                               # Comment out to enable SURBL filtering
     39#export QMAILQUEUE=/var/qmail/bin/surblqueue  # executes surblfilter
     40#export SURBLQUEUE=/var/qmail/bin/qmail-dkim  # executes qmail-dkim afer sublfilter
     41#export DKIMQUEUE=/var/qmail/bin/simscan      # simscan is executed after qmail-dkim
     42# DKIM verification. Use carefully
     43#export DKIMVERIFY="FGHKLMNOQRTVWjp"
     44# This is to avoid verification of outgoing messages
     45#export RELAYCLIENT_NODKIMVERIFY=1
     46
     47# This turns off TLS on port 25
     48# export DISABLETLS="1"
     49
     50# Requires that authenticated user and 'mail from' are identical
     51#export FORCEAUTHMAILFROM="1"
     52
     53# rcptcheck-overlimit. Limits the number of emails sent by relayclients
     54export RCPTCHECK=/var/qmail/bin/rcptcheck-overlimit.sh
     55export RCPTCHECKRELAYCLIENT="1"
     56
     57# This enables simscan debug
     58#export SIMSCAN_DEBUG=4
     59
     60exec /usr/bin/softlimit -m "$SOFTLIMIT" \
     61    /usr/bin/tcpserver -v -H -R -l "$LOCAL" \
     62    -x /etc/qmail/tcp.smtp.cdb -c "$MAXSMTPD" \
     63    -u "$QMAILDUID" -g "$NOFILESGID" 0 25 \
     64    /var/qmail/bin/qmail-smtpd 2>&1
Note: See TracChangeset for help on using the changeset viewer.