1826312 Members
4456 Online
109692 Solutions
New Discussion

sendmail configuration

 
Fadia Almarei
Super Advisor

sendmail configuration

Dear All
i need to configure th sendmail to as a gatway,that a mails from a certain domain to go to a certain IP and another mails to go to another IP,how to make this.
BR,
Faida
fadia.marei
4 REPLIES 4
Alexander Chuzhoy
Honored Contributor

Re: sendmail configuration

You belive can achieve that by editing the file
/etc/mail/virtusertable
put 2 entries there:
@first_source.com @first_dest.com
@second_source.com @second_dest.com

after that cd to /etc/mail
and do: make
or
restart the sendmail service with
service sendmail restart
Note that putting these entries in
/etc/mail/virtusertable means that you're gonna need dns server that "knows" about source and destination domains.

Fadia Almarei
Super Advisor

Re: sendmail configuration

i want to send a certain mail to a certain server(it is just a gatway)
fadia.marei
Alexander Chuzhoy
Honored Contributor

Re: sendmail configuration

Since in DNS certain mail server will be responsible for getting e-mails for certain domain (MX record) -it's good enough.
Ivan Ferreira
Honored Contributor

Re: sendmail configuration

You can use sendmail mailertable. In /etc/mail/mailertable add:

domain1.com smtp:server1.domain.com
domain2.com smtp:server2.domain.com

Specify the FQDN instead of the ip address, or use:

domain1.com smtp:[192.168.1.1]
domain2.com smtp:[192.168.2.100]

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?