LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How to disable authenticated relay for specific accounts on Postfix ? (https://www.linuxquestions.org/questions/linux-security-4/how-to-disable-authenticated-relay-for-specific-accounts-on-postfix-4175414289/)

charlesalle 07-01-2012 09:58 AM

How to disable authenticated relay for specific accounts on Postfix ?
 
Hi,

I have to disable authenticated mail relay for two users on my Postfix running system but cannot figure out how this could be done.

These two users should be able to receive emails but not send mail through my Postfix.

Any help is greatly appreciated !

Many thanks

lithos 07-02-2012 03:57 AM

Hi,

I don't know how exactly, but maybe here you could find a solution
(under "Restricting what users can send mail to off-site destinations")

Here at LQ is a good postfix evaluation order listed.

charlesalle 07-04-2012 08:18 AM

Hi,

Many thanks for your answer. It is clearly the best and most precise answer I got from all the places I have posted to ;)

I now have to check whether I can use this in my ISP-style setup without breaking anything (it's a prod system).
As the rest of the setup is MySQL based, I hope I can setup check_sender_access and check_recipient_access to get the results from MySQL too.

Like : check_sender_access = mysql:/etc/postfix/check-sender-access.cf

Code:

user = bla
password = bla
hosts = 127.0.0.1
dbname = mailserver
query = SELECT email FROM view_users WHERE email='%s'

Not sure how to build the query right now.

Thanks again !


All times are GMT -5. The time now is 06:01 PM.