# Sendmail client



## TheBhanu (Apr 17, 2013)

Hi Team,

I am configuring sendmail client  for sending mail through EXTERNAL server in my domain. I tried all options but failed, not working for me, please find config file as below.


```
define(`SMART_HOST',`[172.20.200.29]')dnl  
 DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
```
And in below file /etc/mail/submit.cf

```
D{MTAHost}172.20.200.29

O DaemonPortOptions=Name=MTA, Addr=172.20.200.29, M=E
```
But still no luck I am getting the below error: 

```
stat=Host unknown (Name server: 172.20.200.29: host not found)
```
I am able to nsllokup nslookup from client working fine.

Please help I am lost.


----------



## DutchDaemon (Apr 17, 2013)

The IP address needs to be in square brackets; now it is treated as a hostname for which MX records need to be looked up.


----------



## TheBhanu (Apr 18, 2013)

Hi,

Thanks for help.

IP address should be in square bracket, I didn*'*t get you, could you please rewrite the complete line which would help me.

One more, is this is only change or do I need to change any other files.


----------



## DutchDaemon (Apr 18, 2013)

I'm sure you can spot where square brackets are missing.

```
define(`SMART_HOST',`[B][[/B]172.20.200.29[B]][/B]')dnl
```


```
D{MTAHost}172.20.200.29
```

This should really be done in the .mc files, not in any .cf files, but there's plenty of documentation (in Sendmail, and on the forums) to find that.


----------



## TheBhanu (Apr 20, 2013)

Hi @DutchDaemon, thanks for support. I am able to send email. Issues I faced are

Hostname resolution (resolved by adding in DNS server)
Added 'RELAY HOST' in /etc/mail/submit.cf and /etc/mail/sendmail.mc
Added 'RELAY HOST' name instead of IP address because of confusion
Finally I got a data error which I found was a problem with the hostname in the /etc/hosts file
Thanks for support.


----------

