-2

It's the first time I have to configure a mail server and I don't know what I have to configure. I have read so many different things that I must ask you guys.... I can already send mail on my server with the mail command.

I want my server to be able to receive mail and consult my mails on a client like thunderbird, also I want my website (wordpress) to be able to send mail (contact form).

What should I have to configure to make it works ? This is my actual configuration

/etc/hostname

domain

/etc/hosts

xx.xx.xxx.xx domain.fr domain

/etc/mailname

domain.fr

/etc/postfix/main.cf

# 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 (Debian/GNU)
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
# 51.68.121.77
myhostname = domain.fr
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = domain.fr, localhost.domain.fr, localhostrelayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
Joël Salamin
  • 3,538
  • 3
  • 22
  • 33
yevic tabita
  • 59
  • 1
  • 7

1 Answers1

1

You don't need Postfix if you use an SMTP plugin like, for example, WP Mail SMTP. Such kind of plugins can send email from your Google account via SMTP.

I have just checked it by stopping postfix and successfully sending an email via WP Mail SMTP.

If no SMTP plugins are activated on your site, you definitely need system transport, which can be Postfix or another mail transfer agent (MTA) on Linux. Postfix also can send your emails using your Google account as a relay.

Priyanka Modi
  • 1,594
  • 1
  • 8
  • 14