Article 564FS How can I configure iredmail to allow sending to a certain external domains only?

How can I configure iredmail to allow sending to a certain external domains only?

by
mstjohn1974
from LinuxQuestions.org on (#564FS)
I am not very familiar with iRedMail which uses postfix and an MySQL backend. Here is a snippet out of my main.cf for transport rules:

# Lookup virtual mail accounts
#
transport_maps =
proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf


and all I can find to solve my issue is based on the following:

transport(5) maps are used to redefine how email is routed by postfix.

Add the following line to /etc/postfix/main.cf:

transport_maps = hash:/etc/postfix/transport

Add the new file /etc/postfix/transport with this content:

.example.com :
example.com :
* discard:

Replace example.com with the domain your mailserver should still send mails to. If you don't care about sub-domains then remove the first line.

Don't forget to hash the file after editing it with postmap(1) and reload postfix so that the changes can take effect.


Does someone know how to make this work with iRedMail/Postfix/MySQL?

Thank youlatest?d=yIl2AUoC8zA latest?i=9oc87VcfAqc:XFXLGI1gLLA:F7zBnMy latest?i=9oc87VcfAqc:XFXLGI1gLLA:V_sGLiP latest?d=qj6IDK7rITs latest?i=9oc87VcfAqc:XFXLGI1gLLA:gIN9vFw9oc87VcfAqc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments