LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   forwarding mail (https://www.linuxquestions.org/questions/linux-software-2/forwarding-mail-491784/)

rafalek2 10-12-2006 09:57 AM

forwarding mail
 
HI,

Can anybody tell me how to forward mails like this:
I got only one system account and mail server use it and when I mail to rafal@aaa.com and rafal@bbb.com it deliver mails to this same account.

I want to do it like this:
If I receive mail to rafal@aaa.com then mailserver deliver it to rafal_a account and when to rafal@bbb.com it deliver to rafal_b account.

I thing this is .procmailrc or .forward file.

Thanks

MasterC 10-13-2006 02:58 AM

Sounds like you are describing virtual hosting.

Although, in a very simple situation you could do something with a procmail rule (I would think...). Something like this in a procmailrc file:
Code:

:0:
* ^TO.rafal@bbb.com
/home/rafal_b

And a similar rule for aaa. The rc might not be exactly correct (that TO might need changing) but that is probably the way to do it on a very simple setup. Ultimately something like that would be done using virtual hosting:
http://www.gentoo.org/doc/en/virt-mail-howto.xml

Cool


All times are GMT -5. The time now is 04:14 AM.