[KLUG Members] Mail

Jamie McCarthy members@kalamazoolinux.org
Mon, 5 Jan 2004 12:32:39 -0500


lists@elite4god.com (Jeremy Leonard) writes:

> Is there a way to disable a users email but leave it an active
> account on the system?
> 
> I don't want to delete the account and I want the user to be
> able to login to the machine but I want mail sent to this user
> to be handled as if the user doesn't exist.
> 
> I running Redhat 9 with sendmail.

If you just want mail to that user to be ignored, put "/dev/null"
into the /home/thatuser/.forward file.

If you want mail to that user to bounce with an error, I don't know
for sendmail, but for exim, you can set up an entry in the aliases
file.  My /usr/share/doc/exim/spec.txt file says:

 .   An attempt to deliver to a particular local part can be
     deferred or forced to fail by aliasing the local part to

       :defer:
       or
       :fail:

     respectively. As this is normally the only item in an alias
     list, a colon must be used to terminate the alias name. When an
     alias list contains such an item, it applies to the entire
     alias; any other items in the list are ignored (":blackhole:"
     is different). Any text following ":fail:" or ":defer:" is
     placed in the error text associated with the failure. For
     example:

       X.Employee:  :fail: Gone away, no forwarding address

     In the case of an address that is being verified for the SMTP
     RCPT or VRFY commands, the text is included in the SMTP error
     response, which has a 451 code for a ":defer:" failure, and 550
     for ":fail:". In other cases it is included in the error
     message that Exim generates.
-- 
  Jamie McCarthy
 http://mccarthy.vg/
  jamie@mccarthy.vg