~ubuntu-branches/ubuntu/dapper/postfix/dapper-security

« back to all changes in this revision

Viewing changes to conf/postfix-script

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-12-07 15:39:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051207153911-hutf07z6i8ty25z5
Tags: 2.2.6-1
* New upstream.
  - the *SQL clients did not uniformly choose the database host from
    the available pool
  - raise the "policy violation" flag when a client request exceeds
    a concurrency or rate limit.
  - don't do smtpd_end_of_data_restrictions after the transaction
    failed due to, e.g., a write error.
  - two messages could get the same message ID due to a race
    condition. This time window was increased when queue file creation
    was postponed from MAIL FROM until the first accepted RCPT TO.  The
    window is closed again.
  - the queue manager did not write a per-recipient defer logfile record
    when the delivery agent crashed after the initial handshake with the
    queue manager, and before reporting the delivery status to the queue
    manager.
  - moved code around from one place to another to make REDIRECT, FILTER,
    HOLD and DISCARD access(5) table actions work in
    smtpd_end_of_data_restrictions.  PREPEND will not be fixed; it must
    be specified before the message content is received.
* Updated Italian translations.  Closes: #336925
* Swedish translations.  Closes: #339746
* Switch to libdb4.3.  Closes: #336488
* Add Replaces: mail-transport-agent.  Closes: #325624
* Merge changes from ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                $FATAL the Postfix mail system is already running
91
91
                exit 1
92
92
        }
93
 
        $config_directory/postfix-script check || {
94
 
                $FATAL Postfix integrity check failed!
95
 
                exit 1
96
 
        }
 
93
        if [ -f $queue_directory/quick-start ]
 
94
        then
 
95
                rm -f $queue_directory/quick-start
 
96
        else
 
97
                $config_directory/postfix-script check-fatal || {
 
98
                        $FATAL Postfix integrity check failed!
 
99
                        exit 1
 
100
                }
 
101
                # Foreground this so it can be stopped. All inodes are cached.
 
102
                $config_directory/postfix-script check-warn
 
103
        fi
97
104
        $INFO starting the Postfix mail system
98
105
        $daemon_directory/master &
99
106
        ;;
108
115
        kill -9 `sed 1q pid/master.pid`
109
116
        ;;
110
117
 
 
118
quick-stop)
 
119
 
 
120
        $config_directory/postfix-script stop
 
121
        touch $queue_directory/quick-start
 
122
        ;;
 
123
 
111
124
stop)
112
125
 
113
126
        $daemon_directory/master -t 2>/dev/null && {
151
164
 
152
165
check)
153
166
 
 
167
        $config_directory/postfix-script check-fatal || exit 1
 
168
        $config_directory/postfix-script check-warn
 
169
        exit 0
 
170
        ;;
 
171
 
 
172
check-fatal)
 
173
        # This command is NOT part of the public interface.
 
174
 
 
175
        $SHELL $config_directory/post-install create-missing || {
 
176
                $WARN unable to create missing queue directories
 
177
                exit 1
 
178
        }
 
179
 
 
180
        # Look for incomplete installations.
 
181
 
 
182
        test -f $config_directory/master.cf || {
 
183
                $FATAL no $config_directory/master.cf file found
 
184
                exit 1
 
185
        }
 
186
 
 
187
        # See if all queue files are in the right place. This is slow.
 
188
        # We must scan all queues for mis-named queue files before the
 
189
        # mail system can run.
 
190
 
 
191
        $command_directory/postsuper || exit 1
 
192
        exit 0
 
193
        ;;
 
194
 
 
195
check-warn)
 
196
        # This command is NOT part of the public interface.
 
197
 
154
198
        for dir in $daemon_directory $config_directory $queue_directory
155
199
        do
156
200
                ls -lLd $dir | (grep " root " >/dev/null ||
164
208
                \( -perm -020 -o -perm -002 \) -type f \
165
209
                -exec $WARN group or other writable: {} \;
166
210
 
167
 
        $SHELL $config_directory/post-install create-missing || {
168
 
                $WARN unable to create missing queue directories
169
 
                exit 1
170
 
        }
171
 
 
172
211
        find `ls -d $queue_directory/* | \
173
212
            egrep '/(incoming|active|defer|deferred|bounce|hold|trace|corrupt|public|private|flush)$'` \
174
213
            ! \( -type p -o -type s \) ! -user $mail_owner \
207
246
                done
208
247
        done
209
248
 
210
 
        # Look for incomplete installations.
211
 
 
212
 
        test -f $config_directory/master.cf || {
213
 
                $FATAL no $config_directory/master.cf file found
214
 
                exit 1
215
 
        }
216
 
 
217
 
        # See if all queue files are in the right place. This is slow.
218
 
        # We must scan all queues for mis-named queue files before the
219
 
        # mail system can run.
220
 
 
221
 
        $command_directory/postsuper || exit 1
222
 
 
223
249
        find corrupt -type f -exec $WARN damaged message: {} \;
224
250
 
225
251
        # XXX also: look for weird stuff, weird permissions, etc.