Fresh start for a postfix setup: how best to do a clean "start over" without a new installation?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fresh start for a postfix setup: how best to do a clean "start over" without a new installation?

Tom Browder
I am fooling around with various configuration settings for my postfix installation and would like to be able to clean out all existing mail and the existing configuration.

Is there any single command to do that?  Or do I have to manually delete stuff.

I want the system to (1) start with empty queues and (2) no knowledge of the previous configuration.

Is there any danger to the start-over method regarding external mail servers which may been senders of mail that wasn't initially received for some reason?

Is there any danger to the existing system if I do a start-over?

Many thanks.

-Tom

Reply | Threaded
Open this post in threaded view
|

Re: Fresh start for a postfix setup: how best to do a clean "start over" without a new installation?

Viktor Dukhovni

> On Aug 26, 2017, at 9:06 AM, Tom Browder <[hidden email]> wrote:
>
> I am fooling around with various configuration settings for my postfix installation and would like to be able to clean out all existing mail and the existing configuration.

This is poorly defined.  What do you mean by "clean out all existing mail"?

As for returning to a stock configuration, that rather depends on how
Postfix was deployed on your system in the first place.  If it is part
of an O/S package, that package may have reason to deploy a stock
configuration that differs from the postfix.org stock version.

> Is there any single command to do that?  Or do I have to manually delete stuff.

The question is ill posed.  The simplest thing is to install a fresh Postfix
on a similar system, and base your configuration on that.

> I want the system to (1) start with empty queues and (2) no knowledge of the previous configuration.

If by "clean queues" you mean to destroy undelivered email (not a
good idea generally), then

        # postfix stop
        # postsuper -d ALL
        # dir=$(postconf -xh data_directory)
        # echo "Examine carefully the content of $dir/ and remove Postfix caches that are safe to remove"

> Is there any danger to the start-over method regarding external mail
> servers which may been senders of mail that wasn't initially received
> for some reason?

I don't understand this question?

> Is there any danger to the existing system if I do a start-over?

You might lose mail.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: Fresh start for a postfix setup: how best to do a clean "start over" without a new installation?

Tom Browder
On Sat, Aug 26, 2017 at 12:53 Viktor Dukhovni <[hidden email]> wrote:

> On Aug 26, 2017, at 9:06 AM, Tom Browder <[hidden email]> wrote:
>
> I am fooling around with various configuration settings for my postfix installation and would like to be able to clean out all existing mail and the existing configuration.

This is poorly defined.  What do you mean by "clean out all existing mail"?

I agree the question is not well-defined.  I'll come back later and see if I can explain what I'm attempting.

Thanks.

-Tom