OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: mestafin on May 17, 2018, 04:36:46 pm

Title: [SOLVED] Postfix Plugin Configuration
Post by: mestafin on May 17, 2018, 04:36:46 pm
I need some help on configuration of the Postfix plugin please.

Version is OPNsense 8.1.6-amd64.

I want to use Postfix as a SMTP server to send notification e-mails from the LAN devices to external email addresses.

The internal LAN domain is mydomain, while externally we use mydomain.net. There are proper mx and ptr records for mx.mydomain.net

In the OPNsense System setup, the domain is defined as mydomain

This is my current Postfix configuration:

General

System Hostname:      mx.mydomain.net
System Domain:         mydomain.net
System Origin:           (blank)
Listen IP's:                 all
Trusted Networks:       10.11.0.0/16 (Local LAN), plus the default 127.0.0.0/8 networks
Allow TLS Only:           Yes
Server Certificatae:      star.mydomain.net   (wildcard SSL certificate for mydomain.net)
Root CA:                     Digicert Intermediate CA
SMTP Client Security:   may
Smart Host:                10.11.10.1   (this is the firewall LAN address)
Username:                  postfix
Password:                   ******

Domains
Domain:   mydomain                      Destination:     mx.mydomain.net                 

Senders
Address:  nas@mydomain.net            Action:  OK


On the NAS device, the mail client is configured as follows:

From email:     nas@mydomain.net
SMTP Server:  10.11.10.1
Port:               587
USE TLS          Yes
Username:       postfix
Password:        ******

When I send an email from the NAS device, it fails.

The NAS device can access the Postfix server at 10.11.10.1

There is nothing in the Postfix log files except start and stop messages.

How can I debug this or is my config wrong?


Title: Re: Postfix Plugin Configuration
Post by: mimugmail on May 17, 2018, 07:25:36 pm
Smarthost should be your provider SMTP, Not the Firewall itself
Title: Re: Postfix Plugin Configuration
Post by: mestafin on May 17, 2018, 08:07:12 pm
HI,

What do you mean "Provider SMTP"? 

I want the Postfix Plugin running on the OPNsense firewall, to be the actual SMTP Server for mx.mydomain.net, sending e-mails to external email addresses, which may be gmail.com , outlook.com or other domains.
Title: Re: Postfix Plugin Configuration
Post by: mimugmail on May 17, 2018, 10:26:19 pm
Then you dont need any smart host in config. Also user/pw please empty .. it's only for smart host usage needed.
Title: Re: Postfix Plugin Configuration
Post by: mestafin on May 19, 2018, 05:30:50 pm
Thanks, have got it working now