Reset postfix to the default settings

I have been messing around with the settings of postfix. now I Cannot longer receive or send mails. Does someone know how I can get back the default settings.


The only way to reset Postfix to what you had earlier would be to restore the config from a backup… if you don’t have a backup of the Postfix config, there isn’t a way to get your original config back.

We can certainly troubleshoot the issue though…

If you restart Postfix, using this command:

/etc/init.d/postfix restart

Take a peek in the error logs – /var/log/maillog or /var/log/mail.log, and look for any errors that show up there during the restart process.

Do you see any?

If not, try sending or receiving an email, and see if that throws an error in your mail logs.


Ok Thank you Eric for your answer. I have a back up of my settings, but the back up was taken to late. Receiving and downloading is no problem anymore.

I still can’t send mails. I get this error:

Sep 17 01:59:03 server postfix/smtpd[14923]: NOQUEUE: reject: RCPT from[xx.xx.xx.xx]: 554 5.7.1 Relay access denied; proto=ESMTP helo=<[xx.xx.xx.xx]>

This is how my postcof -d looks

postconf -n alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

broken_sasl_auth_clients = yes

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

debug_peer_level = 2

home_mailbox = Maildir/

html_directory = no

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain, localhost,

newaliases_path = /usr/bin/newaliases.postfix

readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

relay_domains = $mydestination

sample_directory = /usr/share/doc/postfix-2.3.3/samples

sender_bcc_maps = hash:/etc/postfix/bcc

sendmail_path = /usr/sbin/sendmail.postfix

setgid_group = postdrop

smtpd_helo_required = yes

smtpd_sasl_security_options =

unknown_local_recipient_reject_code = 550

virtual_alias_maps = hash:/etc/postfix/virtual

Well, you wouldn’t normally need to set relay_domains.

Also, is “smtpd_recipient_restrictions” set in your file?

Normally, that’s set to the following:

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

Also, another cause for the error you’re seeing can occur if an email client attempts to send an email without first authenticating. Email clients don’t typically do that by default, they need to be configured to authenticate outgoing emails.


Thank you very much!

Placing smtpd_recipient_restrictions into my file did the trick. :slight_smile: