1

Topic: internal server without ability to send / receive emails from outside

Hello,
I have generic question - I would like set-up email server that will be accessible only to group of people, i would disable what is called SMTP rely - that mean, my users should not be able to send any emails to any other domains than our own. So email addressed by our user to for example google.pl should be rejected and not allowed to be delivered. Only local recipients.
If that's possible it should also work other way around so it should not allow in any email except of those send by our users between.

Regards

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by goodcoffee 2021-03-12 02:41:40)

Re: internal server without ability to send / receive emails from outside

A quick-and-dirty way to get this behaviour is to use your firewall to block all traffic to and from your mailserver and the outside world.  Outside can't send to you, and you can't send outside, though if a user tried to send externally it would be a messy fail. 
This assumes all the users you want to access the system are inside your firewall.

I'm sure there are further configuration changes in postfix that would make this cleaner but the relevant  parameters in the main.cf file that are listed in the Postfix book are not present in the current version. I haven't tested whether you could add them and still have the configuration file pass validation.  Exercise for the student smile
-bc

3

Re: internal server without ability to send / receive emails from outside

Use the global white/blacklisting. FYI:
https://docs.iredmail.org/manage.iredapd.html

Use "@." (without quotes) to match all addresses.

4

Re: internal server without ability to send / receive emails from outside

ZhangHuangbin wrote:

Use the global white/blacklisting. FYI:
https://docs.iredmail.org/manage.iredapd.html

Use "@." (without quotes) to match all addresses.

Now that, friends, is an elegant solution.