This file is indexed.

config is in opensmtpd 5.4.1p1-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# Copyright (C) 2013 Ryan Kavanagh <rak@debian.org>
# Distributed under the ISC license, as documented in opensmtpd's
# debian/copyright file

set -e
. /usr/share/debconf/confmodule

getalias () {
    sed -n "s/^${1}\s*:\s*\([^\s*#.*]*\)\s*#\?.*/\1/p" /etc/aliases
}

db_fget opensmtpd/mailname seen
# Have we previously configured this variable?
if [ "${RET}" = "true" ]; then
    # Update the debconf value if it has changed
    if [ -f "/etc/mailname" ]; then
        db_set opensmtpd/mailname `cat /etc/mailname`
    else
        # The user has cleared out mailname; set our value to the empty string
        # accordingly
        db_set opensmtpd/mailname ""
    fi
else
    if [ -f "/etc/mailname" ]; then
        # If the user previously created a mailname file, default to its value
        db_set opensmtpd/mailname `cat /etc/mailname`
    else
        # Otherwise, default to our FQDN
        # /etc/mailname and opensmtpd/mailname are both empty
        # Default to the FQDN
        MAILNAME=`hostname --fqdn 2> /dev/null`
        # Something when wrong; resort to localdomain
        if [ ! $? ]; then
            MAILNAME="localdomain"
        fi
        # Update our DB with this default for when we prompt the user
        db_set opensmtpd/mailname "${MAILNAME}"
    fi
fi

db_fset opensmtpd/mailname changed false
# Set the changed flag if this gets reconfigured so that we can update
# /etc/mailname accordingly in postinst
( db_input high opensmtpd/mailname && \
  db_fset opensmtpd/mailname changed true ) || true
db_go || true

# Update the debconf value if it has changed
db_fget opensmtpd/root_address seen
if [ "${RET}" = "false" ]; then
    # This is the first time configuring this question; we mark it as such so
    # that we know to create the postmaster alias to root
    db_fset opensmtpd/root_address first true
fi
if [ -f "/etc/aliases" ]; then
    db_set opensmtpd/root_address $(getalias "root")
else
    # The user has cleared out aliases; set our value to the empty string
    # accordingly
    db_set opensmtpd/root_address ""
fi

db_fset opensmtpd/root_address changed false
( db_input high opensmtpd/root_address  && \
  db_fset opensmtpd/root_address changed true ) || true
db_go || true