Debian – Postfix disable mail sending for specific local account

debianemail-serverpostfix

how can I disable mail sending for specific mail account at my postfix mail server?

in my main.cf I have:

smtpd_sender_restrictions =
reject_unauth_pipelining,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_unlisted_sender,
check_sender_access cidr:/etc/postfix/mx_access.cidr,
permit

Something like:

check_sender_access hash:/etc/postfix/sender_access

/etc/postfix/sender_access:email@domain.com REJECT

postmap hash:sender_access

service postfix reload

Can help with my problem or I am doing it wrong?

I just need to block sending opportunity for few accounts only receiving allowed.

Best Answer

To prevent someuser from sending mail via postfix, in /etc/postfix/main.cf, you just need to specify that within the authorized_submit_users setting like so:

authorized_submit_users = !someuser, static:all