# exim: how to use a smart host ? FIXED SOLVED

## doublehp

I want a server on my LAN to collect mail from local users, then, send them to the internet using a smarthost.

At the moment, it works fine: all clients can use my server as SMTP, and my SMTP does deliver email to internet, but, actually it does not use my provider's SMTP as relay/proxy.

http://www.hserus.net/wiki/index.php/Exim

http://www.cyberciti.biz/tips/exim-mta-how-do-i-route-or-relaying-via-a-smarthost.html

give the theory; many other FAQs tell about, but I am said various errors: driver manualroute not found, "authentication required but server did not advertise AUTH" (error -42) ... so that in the end, it does not work like I want.

How to make exim use a smarthost ?

I did this finger in the nose with ssmtp, but this only works for local users CLI; does not accept local GUI like thunderbird, nor relay for other computers of the network.

----------

## bin-doph

If you think something changed from one version of exim to another why dont you check the authors documentation? 

46.1 Sending mail to a smart host

But I cant remember that anything changed for the usage of smarthosts since exim 4.2

 *doublehp wrote:*   

> authentication required but server did not advertise AUTH" (error -42)

 

This doesnt look like misconfiguration, more like your ISPs mailserver requires authentification. some ISPs do so to prevent everybody from using it as a spamrelay. therefore you should check if your ISP does offer this service for free.

hth

----------

## doublehp

1st: I love your signature  :Smile: 

2nd: yes provider can use auth, but I dont know where to put the words

3rd: Debian's exim, and ssmtp can send emails to this SMTP without using login/password

By the mean time, I understood why it did not use my providers SMTP: I had put the right conf part at the wrong place in the file (in Transport instead of routers, and the section should be put before "dnslookup") . So, this is solved, but I still get the -42 error, thus points 2 and 3 above.

=> how to set up login/passwd for an SMTP in Gentoo's exim ?

but I dont think this will get rid of my problem.

----------

## doublehp

note that I also have this problem when using as smarthost for my gentoo a Debian's exim in my LAN ... thats desapointing.

Gentoo's exim cant talk to Debian's exim when Gentoo's ssmtp can ! (still error -42)

----------

## doublehp

Local failing attempt (before fix, Gentoo's exim trying to talk with Debian's):

I send an email using first Gentoo as SMTP gateway (for my MUA), logs on Gentoo complain about -42, then I manually reforce the distribution in order to get the full output in console, and I get this:

exim -d -M 1GxkpS-0003Wx-Ji

=>

 *Quote:*   

> Connecting to 192.168.0.13 [192.168.0.13]:25 ... connected
> 
> waiting for data on socket
> 
> read response data: size=66
> ...

 

That's it !!! Log in the console states:

 *Quote:*   

> 192.168.0.13 in hosts_require_tls? no (option unset)
> 
> 192.168.0.13 in hosts_require_auth? yes (matched "*")

 

Now, go in the conf, find the line where you get "hosts_require_auth=*", comment it, and retry:

exim -d -M 1GxkpS-0003Wx-Ji

=>

 *Quote:*   

> Connecting to 192.168.0.13 [192.168.0.13]:25 ... connected
> 
> waiting for data on socket
> 
> read response data: size=66
> ...

 

----------

## doublehp

 *bin-doph wrote:*   

> If you think something changed from one version of exim to another why dont you check the authors documentation? 
> 
> 46.1 Sending mail to a smart host
> 
> hth

 

I could not do that because on the day I tried it, there was a major break in ISP interconnexion all over west europe, so that tons of websites were unreachable (exim, centos, ebay ...); the next day, I had forget to retry exim/doc.

----------

## bin-doph

 *doublehp wrote:*   

> I could not do that because on the day I tried it, there was a major break in ISP interconnexion all over west europe, so that tons of websites were unreachable (exim, centos, ebay ...); the next day, I had forget to retry exim/doc.

 

glad you got that fixed. exim also ships with a spec.txt (/usr/share/doc/exim-$VERSION/spec.txt iirc)

----------

