LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mail forwarding using Sendmail (http://www.linuxquestions.org/questions/linux-software-2/mail-forwarding-using-sendmail-429253/)

yunus.raza 03-28-2006 08:21 AM

Mail forwarding using Sendmail
 
Hi,

I am using Sendmail ver 8.76.4.16 on Red Hat Linux 7.3 in the gateway mode.Users dont have mailbox on this server , it only has alias and forwards mail to the exchange server.

My server accepts mail for 2 domains lets say abc.com & xyz.com and all users have aliases.

I have a specific requirement of forwarding one of the user's mail to another mail server.

For eg: user1@abc.com wants to forward mails for this id to user1@yahoo.com.

Alias file is not accepting two entries for user1 and it doesnt forward to the external id if i give explicitly agaist the warnings.

Please help

-Yunus

timmeke 03-28-2006 08:58 AM

Quote:

Alias file is not accepting two entries for user1 and it doesnt forward to the external id if i give explicitly agaist the warnings.
Why would you need 2 aliases?
Simply make any mail to "user1" be forwarded to both the yahoo address and your exchange server with 1 alias.
ie
user1: address1, address2

See also:
man aliases

yunus.raza 03-28-2006 09:02 AM

That user has two id's user1@abc.com & user1@xyz.com. MX record for both the domains are pointing to same server. And that user only wants to forward mails to yahoo for id user1@abc.com, mails for the other id user1@xyz.com still needs to go to the exchange mailbox.

How do i tell sendmail to forward mails for user1@abc.com to yahoo and user1@xyz.com to the exchange mailbox.

timmeke 03-29-2006 01:23 AM

Check out:
http://www.skillreactor.org/tutortxt/mailserv.htm
At least one of the config files for Sendmail should allow what you're trying.

ynilesh 04-19-2008 01:44 AM

You need to /etc/virtusertable.....
where you can forward mails some thing like this.....

webmaster@another-site.com webmasters
@another-site.com marc
sales@my-site.com sales@another-site.com

- here webmaster@another-site.com will forward mail to webmasters users mailbox.

- all @another-site.com mails will forward to marc user mailbox.


All times are GMT -5. The time now is 10:48 PM.