This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
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 ip-xx.xx.xx.xx.customer.schedom-europe.net[xx.xx.xx.xx]: 554 5.7.1 blabla@hotmail.com: Relay access denied; from=info@domain.com to=blabla@hotmail.com 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
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.
Howdy,
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.
-Eric
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 ip-xx.xx.xx.xx.customer.schedom-europe.net[xx.xx.xx.xx]: 554 5.7.1 blabla@hotmail.com: Relay access denied; from=info@domain.com to=blabla@hotmail.com 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, ns1.mydomain.net
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 main.cf 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.
-Eric
Thank you very much!
Placing smtpd_recipient_restrictions into my main.cf file did the trick. :)