Disable a User's email account

Les Mikesell lesmikesell at gmail.com
Mon Feb 12 00:35:32 UTC 2007


edwardspl at ita.org.mo wrote:
> Les Mikesell wrote:
> 
>> edwardspl at ita.org.mo wrote:
>>
>>>>> Dear All,
>>>>>
>>>>> The System is FC6...
>>>>> So, how to disbale a User's mail service ?
>>>>> eg : Sendmail + Dovecot ( pop3 /imap ).
>>>>>
>>>> One way is to use the aliases file to direct the mail elsewhere or to
>>>> /dev/null. Another is to use the virtuser table to map the users you
>>>> want to permit to real addresses with a catchall rejection.
>>>>
>>>> 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.
>>>>
>>> Hello,
>>>
>>> Is there a sample ( steps by steps ) for reference ?
>>>
>> There's actually easier way than the ones mentioned above. In your
>> /etc/mail/access file put a line like:
>>
>> user at domain.com REJECT
>>
>> or
>>
>> user at domain.com ERROR:550 no such user here
>> (if you want to control the rejection error)
>>
>> or
>>
>> To:user at domain.com ERROR:550 user unknown
>> (if you want to permit sending but reject inbound)
>>
>> Execute 'make' in the /etc/mail directory to rebuild the access
>> database after the change, or you can restart sendmail with 'service
>> sendmail restart' which will also do it.
>>
>> Note that fedora defaults to only accepting email within the local
>> machine. If you want a working mailer you have to make a change to
>> /etc/mail/sendmail.mc, removing the Addr=127.0.0.1 restriction, then
>> restart sendmail.
>>
> Hello,
> 
> This way is only for SMTP ?
> So, how about for pop3 / imap also ?

SMTP is the mail transport. Pop and IMAP only access a user's own 
mailbox.  Running a pop/imap mail program won't be very interesting if 
you can't send or receive from anyone.  If you want to disable access to 
some particular program you'll have to make it only executable by a 
certain group and put everyone allowed to run it in that group.

-- 
   Les Mikesell
    lesmikesell at gmail.com




More information about the fedora-list mailing list