Email - Postfix

Email - Postfix

About

Postfix 1) is a SMTP server, supporting LDAP, SMTP AUTH (SASL), TLS

The postfix installation installs also an alias to the sendmail command line.

Security / Privileges

SMTP servers need to decide whether an SMTP client is authorized to send mail:

  • to remote destinations,
  • or only to destinations that the server itself is responsible for.

Once a remote client is authenticated, a server generally give the same network privileges.

Relaying is allowed only for authenticated users, and IP addresses you specify in mynetworks.

Configuration

See Postfix - Architecture (Processes)

Respond

nmap -Pn -p T:25 server
Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-15 13:54 W. Europe Daylight Time
Nmap scan report for nico.gerardnico.com (xxxxxx)
Host is up.

PORT   STATE    SERVICE
25/tcp filtered smtp

Nmap done: 1 IP address (1 host up) scanned in 3.16 seconds

Parameters

mydestination

Which mail should be saved on the machine

  • If you don't want to store email for a specific domain on the server leave it untouch
mydestination = $myhostname, localhost.$mydomain, localhost

inet_interfaces

postconf.5.html: Example of value and their consequence

  • all
netstat -tulpn | egrep (master|:25)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      5611/master

  • 163.132.99.201, 127.0.0.1
netstat -tulpn | egrep (master|:25)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2413/master
tcp        0      0 163.132.99.201:25       0.0.0.0:*               LISTEN      2413/master

Mailbox

The home_mailbox parameter specifies the optional pathname of a mailbox file relative to a user's home directory. The default mailbox file is /var/spool/mail/user or /var/mail/user.

home_mailbox = Mailbox
# for qmail-style delivery (the / is required).
home_mailbox = Maildir/ 

where:

  • Maildir separates messages into individual files that are then moved between directories based on user action.
  • Mailbox stores all messages within a single file.

Virtual

Postfix - Virtual Aliasing (Email Redirect)

Sasl authentication

With Sasl:

  • a remote SMTP client can authenticate to the Postfix SMTP server,
  • the Postfix SMTP client can authenticate to a remote SMTP server

More Postfix - SASL (SMTP Authorization)

smtpd_forbidden_commands

default to (CONNECT, GET, POST)

List of commands that cause the Postfix SMTP server to immediately terminate the session with a 221 code.

Version

postconf mail_version
# or
yum info postfix

Log

  • /var/log/maillog
  • /var/log/messages – Contains global system messages, including the messages that are logged during system startup.

See:





Discover More
Opendkim Test Mailer
Email - How to test if your server email configuration was done correctly ?

This article will show different server configuration testing in order to validate your email server configuration
Gmail Original Message Id
Email - Message Id

A Message-ID is an email identifier. It is generated by the client sending the mail and added in the Message-ID header An message id is generally the concatenation of: a timestamp the local hostname...
Email - Mille and one way to send an email (professional and user)

This article shows you Mille and one way to send an email (ie known as transport in SMTP. submission port Before continuing, you need to know the basics of email and how it works with SMTP. If you...
Dkim Record Text Format Ovh Dns Zone
How to configure DKIM with PostFix, a step by step guide

This article will show and explain you how to install DKIM with OpenDkim as a milter for Postix on CentOS
How to configure your domain and your server to send and receive email

Configuring your domain to manage email is not an easy task, this article groups them on one place
Postsrsd Spf Pass
How to install the Sender Rewriting Scheme (SRS) on PostFix?

This page is the installation of postsrsd which implements Sender Rewriting Scheme (SRS) for Postfix. It's mandatory if you forward emails via the alias functionality....
How to send an email with the SendMail command line client ?

This article shows you how to send an email with the sendmail command line client. You should have a smtp server installed. The sendmail command may be the original or the one provided with your...
Postfix - Architecture (Processes)

postfix may starts several process, generally: one to receive and relay mail (port 25) one to submit mail (port 587) Postfix services are implemented by daemon processes. These run in the background,...
Smtp Submission Port Auth Successfull
Postfix - Authentication configuration (SASL) for a connection to the SMTP server (587)

This page shows you yow to configure Postfix to enable remote connections to the Postfix SMTP server on the port 587 (submission port) with authentication. Postfix used SASL as authentication library...
Postfix - Configuration (File, List and Default values)

This article: talks the configuration files lists all postfix configuration, see the default value and links to the reference documentation. postfix architecture /etc/postfix/main.cf where...



Share this page:
Follow us:
Task Runner