Restore main.cf Postfix

Hello,

I have broke my main.cf of postfix. How can i restore it ?
Or someone can send me an example to see what i have change.

!thanks

Have you tried:

$ sudo mailinabox
1 Like

Yes thats not ok, file stay the same

1 Like

You could try deleting (or renaming) the file and then sudo mailinabox again.

nop i have try it, but thanks

FileNotFoundError: [Errno 2] No such file or directory: ‘/etc/postfix/main.cf’

and this not good too

curl -s https://mailinabox.email/setup.sh | sudo bash

Backup the server and reinstall. It seems like you have something else going on.

curl -s https://mailinabox.email/setup.sh | sudo -E bash

try again…

1 Like

I missed that. Thanks.

1 Like

Hello i have found something, it was just that is missing but sasl_authenticated = defer_unauth_destination and cause smtp to much instance.

I am curious @Fahrenheitz why you are even tinkering with main.cf in the first place?

Only to amend what @alento is asking: is the box used as anyone’s primary email or DNS service, or is it just a domain or domains that you are experimenting with? Because the latter is what you should have for these kinds of activities…

hi alento. This is because all the ip from one provider are blacklisted and I wanted to install a smtp relay via a trusted third party, in particular for gmail, hotmail, outlook. I happen to spam for this one all the time even with a 10/10 share to mail-test

Hi openletter, yes it is for my domains, I have been using miab for 3 years. But arriving in spam is a problem for me.

Gotcha!

Do you have a smtp provider in mind? I operate AnyMXRelay in case you are in need of a reliable low cost SMTP relay.

If you are not in need, I can likely assist you with the lines that need to be changed.

Yes, it’s a problem, but when we break our configurations trying to solve a problem, we just create another breakage. I’ve even gotten the $0.88 first year throw-away domains without renewal just for testing. Don’t care about spamassassin points when it’s just for testing.

thanks for the help i m very interested, but now i m testing a vps (vpn installed) with a good ip and so i can host my server at my works. Alento and openletter I keep you posted thank you for your help :slight_smile: and perhaps with a relay like anymxrelay.

It is a little expensive i found, i have found a french firm , yes i m french with this https://relai-smtp.com/

That is a reasonable cost option. Most of the standard options available to the capitalistic English speaking market start at $50 per month, which is where I mainly compete. :slight_smile:

If you followed their guide here: Postfix – Foire Aux Questions you should have no issues with the installation. The one thing that their instructions do not include, which mine do, is to make a copy of main.cf BEFORE you begin, so that you can revert your changes.

yes for sure i will make a copy now :slight_smile: