Remove/Delete a user email from the postmap

Latest response

I am a new "B" in Redhat Linux. I am inherited an issue with Linux admin who left our company with his email being the only email used for the Redhat server to send critical alert to and now no one else have access.

I would like to delete or remove this email from the server and add myself with an additional user. When I ran the following command line:

postmap -q root hash:/etc/aliases

It shows me the user email account fo the previous admin, for instance:

Next, I ran the following command line to add myself:

echo "root: /etc/aliases

It says it was successfully added; howevere, I have not received any alerts to my email.

I need to delete/remove Lee email address as I explained above.
What command line should I run to remove/delete Lee email from the system and add myself?

Why can't I receive email alert after added myself into the system?

Why can't I see my name when I run the command line:

postmap -q root hash:/etc/aliases

Shouldn't it show my name the same way I can see the previous admin account who no longer responsible for the system?

Please help!



I think the normal action after updating /etc/aliases is to run newaliases afterwards. You may want to run postfix reload afterwards as postfix may not notice the change immediately.

I did run the "newaliases" command and received the following: [root@FGRR07 ~]# newaliases postalias: warning: /etc/aliases.db: duplicate entry: "root" postalias: warning: /etc/aliases.db: duplicate entry: "root"

Does this mean that I have my name added twice? How do I delete or remove a user account from this folder? This is my original question. I need to delete the actual user and add myself?

Thanks D

That sounds like you have two root configuration lines in /etc/aliases which I would just edit with a text editor and remove the one I didn't want, then rerun newaliases. You could also just display the file directly with cat /etc/aliases and it looks like you can also edit the file with postalias; run man postalias for details on using the command.