Score:0

Postfix causing a fatal error in file reconfiguring not working either

co flag

I am at a loss with this issue, I installed a new server setup from Vultr, and installed 18.04 Ubuntu in it, I just realised I cannot send any emails using the PHP mail function.

The error that it shows using tail -f /var/log/mail.log is:

Feb 25 22:43:11 site postfix/sendmail[20810]: fatal: /etc/postfix/mai                                                                                       n.cf, line 1: missing '=' after attribute name: "inet_interfaces# See /usr/share                                                                                       /postfix/main.cf.dist for a commented, more complete version"

And the main file is:

main.cf file:

inet_interfaces# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks_permit_sasl_authenticated defer_unauth_destination
myhostname = debian
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.$mydomain, localhost, $myhostname 
relayhost = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all

But I don't see any error like it suggests with inet_interfaces can anyone see something I can't?

Because it's a fatal error I assume that's why I cannot get any messages sent. I have reconfigured postfix a few times and there is always an error shown.

hr flag
It looks like that first `inet_interfaces` is just some spurious text that got inserted before the first comment character `#` when someone was editing the file
graham23s avatar
co flag
That is strange, that was auto-generated on setup too, that was it, thank you :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.