Disable a User's email account

edwardspl at ita.org.mo edwardspl at ita.org.mo
Mon Feb 12 13:10:08 UTC 2007


James Wilkinson wrote:

>edwardspl at ita.org.mo wrote:
>  
>
>>The System is FC6...
>>So, how to disbale a User's mail service ?
>>eg : Sendmail + Dovecot ( pop3 /imap ).
>>    
>>
>
>Les Mikesell wrote:
>
>  
>
>>Maybe it would be easier to describe exactly what you want these users
>>to be able to do first and build an environment that provides nothing
>>else instead of starting with a general-purpose login and trying to
>>stop everything you don't want them to do.
>>    
>>
>
>I've quoted that advice Les gave because it's good. If you really want
>to provide users with certain services and not others, start from a
>position of not allowing them anything, and then give individual users
>more rights when needed.
>
>But for the Dovecot side of what you asked, why not have a look at
>/etc/dovecot.conf ? It includes the lines
>  # Users can be temporarily disabled by adding a passdb with deny=yes.
>  # If the user is found from that database, authentication will fail.
>  # The deny passdb should always be specified before others, so it gets
>  # checked first. Here's an example:
>
>  #passdb passwd-file {
>    # File contains a list of usernames, one per line
>    #args = /etc/dovecot.deny
>    #deny = yes
>  #}
>
>Hope this helps,
>
>James.
>
>  
>
Hello James.

For disable user's incoming account ( pop3 / imap ) :

/etc/dovecot.conf

passdb passwd-file {
	args = /etc/dovecot.deny
    	deny = yes
}

/etc/dovecot.deny :
edward

For disable user's outgoing account :

/etc/mail/accessfileputaline :

To:user at domain.comERROR:550 Sorry, user account disabled !

Is it ok for the disabling ?

Edward.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070212/412cd378/attachment-0001.htm>


More information about the fedora-list mailing list