How to route ALL mail via a smarthost?

SYSTEM INFORMATION
OS type and version RHEL 9.2
Webmin version 2.021
Virtualmin version 7.7

How to route all mail out to a smarthost? Currently mail from and to domains on the server just go straight there. I wish for all mail to go out so I can scan etc with my external filter server then go back in if it’s a local domain.

I know VMin can scan etc, but I wish to use my own external system.

There are setting for outbound in main.cf
maybe setup a test machine and try

Thanks, but I am not comfortable with editing postfix files manually. My background is all with sendmail.

It doesn’t really explain anything that encourages me either.

Anyone else?

I don’t know how to do that in Postfix or Sendmail. I’m not sure how you’d differentiate between mail for local users to send out and mail for local users to deliver. Having a hard time wrapping my head around it.

Though, when I search for the problem, I come up with this which seems to indicate they have the behavior you’re trying t achieve, but they’re trying to fix it, because it’s obviously wrong to send out mail that can be delivered locally. :person_shrugging:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.