Re: Postfix : root and system user authentication

2023-03-16 Thread jeremy ardley
On 16/3/23 14:53, Aki Tuomi wrote: On 16/03/2023 03:58 EET jeremy ardley wrote: A good practice would be to use  postfix --> dovecot/sasl --> pam --> backend server and do the uid vetting in the dovecot pam configuration Dovecot itself can reject uid < 500. Just set first_valid_uid =

Re: Postfix : root and system user authentication

2023-03-16 Thread Aki Tuomi
> On 16/03/2023 03:58 EET jeremy ardley wrote: > > > On 16/3/23 06:31, Aymeric Agon-Rambosson wrote: > > > > I have a solution to my problem. > > > > For reference, I am putting it here : > > > > > > A simple way to restrict login based on uids is to modify the file as > > such : > > > >

Re: Postfix : root and system user authentication

2023-03-15 Thread jeremy ardley
On 16/3/23 06:31, Aymeric Agon-Rambosson wrote: I have a solution to my problem. For reference, I am putting it here : A simple way to restrict login based on uids is to modify the file as such : #%PAM-1.0 auth    required    pam_succeed_if.so uid > 500 quiet @include common-auth

Re: Postfix : root and system user authentication

2023-03-15 Thread Aymeric Agon-Rambosson
I have a solution to my problem. For reference, I am putting it here : I recall that my issue is that postfix authorises login with root (or other users), even though authentication is delegated to dovecot, and the documentation about {first,last}_valid_{g,u}id seems to say that is should

Re: Postfix : root and system user authentication

2023-03-15 Thread John Stoffel
> "dovecot" == dovecot writes: > Me personally, this is why i prefer to use virtual users stored in a > database for email and never use linux users. I have ultimate > control over what users can be authenticated or receive email. I can > add flags to the DB query to fail an otherwise

Re: Postfix : root and system user authentication

2023-03-15 Thread dovecot
However, when we have a postfix server on the same machine, that delegates authentication to dovecot SASL ... we can indeed log in as root on the postfix server. You are not logging into Dovecot with root, you are connecting to Postfix for submission. When you connect to dovecot using

Re: Postfix : root and system user authentication

2023-03-15 Thread jeremy ardley
On 15/3/23 18:32, Odhiambo Washington wrote: On Wed, Mar 15, 2023 at 1:46 AM Aymeric Agon-Rambosson wrote: Hello everyone, From what I understand of the documentation, it is impossible to log in to the dovecot server as root, or as any user not in the interval between

Re: Postfix : root and system user authentication

2023-03-15 Thread Odhiambo Washington
On Wed, Mar 15, 2023 at 1:46 AM Aymeric Agon-Rambosson < aymeric.a...@yandex.com> wrote: > > Hello everyone, > > From what I understand of the documentation, it is impossible to > log in to the dovecot server as root, or as any user not in the > interval between first_valid_uid and

Re: Postfix : root and system user authentication

2023-03-15 Thread Aymeric Agon-Rambosson
Le mardi 14 mars 2023 à 22:32, dove...@ptld.com a écrit : However, when we have a postfix server on the same machine, that delegates authentication to dovecot SASL ... we can indeed log in as root on the postfix server. You are not logging into Dovecot with root, you are connecting to

Re: Postfix : root and system user authentication

2023-03-14 Thread dovecot
However, when we have a postfix server on the same machine, that delegates authentication to dovecot SASL ... we can indeed log in as root on the postfix server. You are not logging into Dovecot with root, you are connecting to Postfix for submission. When you connect to dovecot using

Postfix : root and system user authentication

2023-03-14 Thread Aymeric Agon-Rambosson
Hello everyone, From what I understand of the documentation, it is impossible to log in to the dovecot server as root, or as any user not in the interval between first_valid_uid and last_valid_uid. I have been able to verify this. However, when we have a postfix server on the same machine,