Static relaying to a remote MTA using imta.cnf

Hello All,I want to make a static relaying to a remote MTA using imta.cnf, I want to set a rule to route all mails sent to a specific domain to a certain host x.y.z.k .can someone helps me on this task.Regards,Samir.
[251 byte] By [semsem1234a] at [2007-11-27 0:40:10]
# 1

Hi,

Pretty straight-forward.

1. Add a new channel in your imta.cnf file which sends off all email queued to it to x.y.z.k e.g.

!

! tcp_static

tcp_static smtp nomx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL daemon x.y.z.k

tcp_static-daemon

2. Add a rewrite rule in your imta.cnf file to direct traffic to the new channel for a domain e.g.

specific.domain.com$E$F$U%$D@tcp_static-daemon

You will need to rebuild/restart the MTA for the change to take affect.

Regards,

Shane.

shane_hjortha at 2007-7-11 22:52:51 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2

Thanks a lot Shane,

i have only one question...

the syntax of the daemon keyword: daemon routing_hostname

and the routing_hostname must be a FQDN .. , what if I have only that host IP ; x.y.z.k ?

Shall I use a dummy domain and put it in my /etc/hosts file instead ?

Thanks a lot again :)

Samir.

semsem1234a at 2007-7-11 22:52:51 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3

Hi,

> the syntax of the daemon keyword: daemon

> routing_hostname

> and the routing_hostname must be a FQDN .. , what if

> I have only that host IP ; x.y.z.k ?

That should be fine.

> Shall I use a dummy domain and put it in my

> /etc/hosts file instead ?

You should really do it properly and have the hostname/IP added to your DNS servers if you are going down this path -- shortcuts such as this tend to come back to haunt you in the future (such as you forget to update the /etc/hosts file and spend hours tracking down why email delivery doesn't work).

Regards,

Shane.

shane_hjortha at 2007-7-11 22:52:51 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4
Amendment to previous comment.For an IP address-only, use the format:daemon [IP address]e.g.daemon [1.2.3.4]The square brackets prevents the IP address from being resolved.Regards,Shane.
shane_hjortha at 2007-7-11 22:52:51 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 5

> Amendment to previous comment.

>

> For an IP address-only, use the format:

>

> daemon [IP address]

>

> e.g.

>

> daemon [1.2.3.4]

>

This One is Good :)

> The square brackets prevents the IP address from

> being resolved.

>

> Regards,

>

> Shane.

Thanks a lot again Shane,

Samir.

semsem1234a at 2007-7-11 22:52:51 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...