Page 1 of 1

Disable outgoing mail

Posted: Sat 23. May 2020, 11:12
by prune
Hello,

Is it possible to disable outgoing mail for a user account? Just 1 account or just a mailbox in an account? If not disable, maybe just set to pending/for approval?

I want mailboxes for an account to be used for incoming mail only.

Re: Disable outgoing mail

Posted: Tue 2. Jun 2020, 06:14
by prune
Hello,

Can someone assist in having KH block all outgoing mails for an account and allow only certain email addresses to send?

Re: Disable outgoing mail

Posted: Tue 2. Jun 2020, 07:27
by george
Hi Prune,
this interested me, so...

I don't think there is such facility in KeyHelp panel.
With a few minutes search I found the following, but have not tested, you could try this:

Open the Postfix config file:
/etc/postfix/main.cf

Insert the following code, just before the line "smtpd_client_restrictions"
(replace "user" with the username to block)

Code: Select all

authorized_submit_users = !user, static:all
source: http://www.postfix.org/postconf.5.html

To block multiple users, I assume its like so:

Code: Select all

authorized_submit_users = !user, !user2, !user3, static:all
Save the file, then restart postfix.

Let us know how you go.