LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   forward users mail to email address (https://www.linuxquestions.org/questions/linux-general-1/forward-users-mail-to-email-address-398873/)

tradnbillies 01-02-2006 11:33 PM

forward users mail to email address
 
i have set up roots email to be forwarded to my username on my FC4 box using the /etc/aliases file. although I'm not even sure if that works. Should that be working as soon as mail enters root's box, or is it a job that sends it every so many minutes?
anyway, my real question is i want to send email that is in my linux inbox to a hotmail account. How can i achieve this?

Thanks for any help!
-Dave

timmeke 01-03-2006 02:41 AM

/etc/aliases is nothing more than just a file (database) with e-mail aliases. In order for these mail aliases
to be actually used, you of course need a mail server program.
Check if "sendmail", "postfix" or anything alike is installed and running on your system.

Typically, you can do this by running:
/sbin/chkconfig --list
and checking for the programs above (they should have got an "on" for levels 3-4-5 at least.
"/sbin/service <service_name> status" may also work (for valid service names, do "ls /etc/init.d"

To try your Linux to hotmail alias, you could also just set it up in /etc/aliases and try it out.
/var/log/maillog or something like that may give you a clue on what's going on/what's going wrong.

tradnbillies 01-03-2006 06:24 PM

sendmail is up and running. I know it works because I can send email from the command line. If i put an entry in the /etc/aliases file like:

user: me@hotmail.com

that should work? do i need to make the database or anything? thanks.

-Dave

timmeke 01-04-2006 01:33 AM

Yes, you should update your aliases database after having made the changes to the "aliases" (plain text) file.
Use the "newaliases" command for that. It'll recreate/update a binary file called "aliases.db".
See also "man aliases".


All times are GMT -5. The time now is 05:50 AM.