LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   How To Forward Mail & Account Question? (https://www.linuxquestions.org/questions/linux-enterprise-47/how-to-forward-mail-and-account-question-507442/)

carlosinfl 12-04-2006 02:18 PM

How To Forward Mail & Account Question?
 
I am on out RHEL4 mail server and I wanted to forward someones mail from their account to mine. I have not disabled their account but I have set a strong password only I know. Should I do anything else to their account for security?

I was also told that if I change to their home directory and create a file called ".forward", in that text file, I need to add my email address only so it will then forward all this users mail to the email address in the text file.

Is this correct or not?

msound 12-04-2006 02:25 PM

i would just edit the aliases file to have
there-email@yourdomain.com just act as an alias for your mail name.

fordeck 12-04-2006 02:25 PM

Do you know what mail server your using (i.e. sendmail, postfix, qmail etc.)?

carlosinfl 12-04-2006 02:32 PM

Quote:

Originally Posted by msound
i would just edit the aliases file to have
there-email@yourdomain.com just act as an alias for your mail name.

Where is the "alias" file you said I have to edit?

Quote:

Do you know what mail server your using (i.e. sendmail, postfix, qmail etc.)?
Postfix mail server and dovcott.

fordeck 12-04-2006 02:37 PM

You can find the aliases file at /etc/aliases and you can see more about the syntax used by issuing the command "man aliases". The .forward file in the users home directory should work as well. Just test to make sure.


Edit...: I forgot to mention if you use the /etc/aliases file, after editing it you need to run the command "newaliases" to rebuild the aliaes.db file in order for it to work.

carlosinfl 12-04-2006 03:05 PM

Thank you! I will just use the .forward text file if that does pretty much the same job. So do you recommend any other things I check on his account to keep it active for mail but so he can't login or do anything malicious?

I removed all ssh access to our mail server from outside of the LAN. I removed this user from the sudo/wheel group. I then reset his password to something strong only I know.

fordeck 12-04-2006 04:00 PM

Depending on what type of sudo access this user's had. You may want to change all admin type passwords, check the /etc/aliases file to make sure he did not forward his mail to an outside address and keep an eye on your logs for failed login attemps.

By the way that's one advantage to using the aliases file, in that the user doesn't need to have an account on the machine. Say for example on your web site you may have the email address webmaster@your_domain.com. webmaster doesn't have an email account but by using the /etc/aliases file you can forward any incoming mail addressed to webmaster@your_domain.com to a valid users email account.

Regards,
Fordeck


All times are GMT -5. The time now is 01:46 AM.