OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: BeNe on March 08, 2018, 10:00:44 pm

Title: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: BeNe on March 08, 2018, 10:00:44 pm
Hello OPNsense Users,

is there a way that i can use the OPNSense as Smarthost or Relay for my internal network devices ?
I donĀ“t want to add my external Mails Credentials (User/Password) to all my NAS, Printer, Switches and 3rd Party Software for Notification Mails. Have no more an internal Mailserver since there is Google Apps or Office 365 with Exchange in the Cloud.

All devices should send their mails to the OPNsence and the OPNSense via smarthost outside. The external Mail Credentials are only one time in the firewall for the smarthost needed. Restriction would possible with a Firewall rule. Also all Mails could checked for Spam before they leave the network.

Is there such an option ? Could not find it inside the Postfix Plugin.

 
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: mimugmail on March 09, 2018, 05:41:56 am
Good idea, I'll add it to my list. Give me 1-2 weeks  ;D
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: BeNe on March 10, 2018, 05:29:07 pm
Wow, thanks!  :o
Of course - take your time.
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: 3kj2w on March 11, 2018, 07:19:11 pm
If it help to speed development here you can find few packages for another fork, just need to be adapted for OPNsense:
https://github.com/marcelloc/Unofficial-pfSense-packages
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: mimugmail on March 11, 2018, 07:54:56 pm
There's no problem of adding this feature, quite easy setup. I have to first finish adding IPv6 to BGP in FRR Plugin and then I'll focus in this one :)
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: mimugmail on March 13, 2018, 02:55:32 pm
Can you please test and verify if it works for you? Then it can go to the next stable:


opnsense-patch -c plugins 9fd323e
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: BeNe on March 13, 2018, 04:59:59 pm
Of course! It works just fine  8)
Thank you very much.

Small full help adjustment for the Smarthost text:
Quote
Set the IP address where all outgoung mail are sent to
-> Set the IP address or FQDN where all outgoung mail are sent to

I used the FQDN of my Mailserver because of the Certifiacte.
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: mimugmail on March 14, 2018, 06:59:33 am
Good catch, done! So perhaps this will find it's way to 18.1.5 if it's not too late ...
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: franco on March 14, 2018, 06:50:58 pm
It'll be in 18.1.5, but that's next week now for other reasons. :)

Thanks to you both!

Cheers,
Franco
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: cybrstudd on April 24, 2018, 07:02:06 pm
Is there any way to specify the outgoing port. I'm trying to get Gmail to work as a smartrelay using port 587 or 465 because my ISP blocks outgoing port 25 since I'm using this at home. I've tried [smtp.gmail.com]:587 and smtp.gmail.com:587 but neither have worked. Any advice or will this need modified to get this working?
Title: Re: OPNSense with Postfix Plugin as smarthost/relay for internal networks ?
Post by: mimugmail on April 24, 2018, 08:12:38 pm
Yep, with 18.1.7 ...