[exim] smarthost login failing

Top Page
Delete this message
Reply to this message
Author: p cooper
Date:  
To: exim-users
Old-Topics: Re: [exim] multiple smarthost config problems
Subject: [exim] smarthost login failing
thanks - its now trying to send through the smtp hosts

but its trying and failing . The lookups for auth_name and auth_pass (
as defined in the authenticator section) from the command line are
return the correct values .Its trying to connct to the remote SMTP
server but i think the authentication is failing


2012-04-09 16:30:24 [27645] 1SHGXw-0007Bt-2e <= mxxxxx@???
H=twelve-m266.local [192.168.2.5]:38529 I=[192.168.2.20]:25 P=esmtp
S=582 id=4F83008F.6010404@??? T="test7" from <mxxxx@???> for
pxxxxx@???
2012-04-09 16:30:24 [27645] SMTP connection from twelve-m266.local
[192.168.2.5]:38529 I=[192.168.2.20]:25 closed by QUIT
2012-04-09 16:30:24 [27646] cwd=/var/spool/exim4 3 args: /usr/sbin/exim4
-Mc 1SHGXw-0007Bt-2e
2012-04-09 16:30:25 [27646] 1SHGXw-0007Bt-2e **pxxxxx@???
F=<mxxx@???> P=<mxxx@???> R=smarthost_auto T=remote_smtp:
SMTP error from remote mail server after MAIL FROM:<mxxxxxo@???>
SIZE=1621: host gmail-smtp-msa.l.google.com [173.194.78.108]: 530-5.5.1
Authentication Required. Learn more at\n530 5.5.1
http://support.google.com/mail/bin/answer.py?answer=14257 ca3sm22329641wib.6
2012-04-09 16:30:25 [27648] cwd=/var/spool/exim4 7 args: /usr/sbin/exim4
-t -oem -oi -f <> -E1SHGXw-0007Bt-2e
2012-04-09 16:30:25 [27648] 1SHGXx-0007Bw-Jn <= <> R=1SHGXw-0007Bt-2e
U=Debian-exim P=local S=1641 T="Mail delivery failed: returning message
to sender" from <> for mxxxx@???
2012-04-09 16:30:25 [27649] cwd=/var/spool/exim4 3 args: /usr/sbin/exim4
-Mc 1SHGXx-0007Bw-Jn
2012-04-09 16:30:25 [27646] 1SHGXw-0007Bt-2e Completed QT=1s


root@server2:/etc/exim4# exim -Mvl 1SHFho-00076u-4p
2012-04-09 15:36:32 Received from paul@??? H=twelve-m266.local
[192.168.2.5]:38205 I=[192.168.2.20]:25 P=esmtp S=592
id=4F82F3EF.4000304@??? T="test5"
2012-04-09 15:39:17 Remote host isp.org [91.xx.xx.x] closed connection
in response to initial connection


root@server2:/etc/exim4# grep 'begin routers' -A 400 /etc/exim4/exim4.conf
begin routers

smarthost_auto:
debug_print ="T. auto_route remote_smtp for $local_part@$domain from
$sender_address "
self = send
condition =
${extract{smarthost}{${lookup{$sender_address}wildlsearch*@{/etc/exim4/smarthosts}{$value}fail}}}
driver = manualroute
transport = remote_smtp
route_list = *
"${extract{smarthost}{${lookup{$sender_address}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}"
domains = ! +local_domains

by_route:
debug_print ="T. remote_smtp for $local_part@$domain"
driver = manualroute
domains = ! +local_domains
transport =by_relay
route_list = * smtp.blueyonder.co.uk

real_user:
driver = accept
check_local_user
transport = local_delivery
cannot_route_message = Unknown user

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
file_transport = address_file
pipe_transport = address_pipe

userforward:
driver = redirect
check_local_user
file = $home/.forward
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply



##################TRANSPORTS#################
begin transports

remote_smtp:
debug_print = "T: remote_smtp for $local_part@$domain and $host_address"
driver = smtp
tls_certificate = /etc/exim4/exim.crt
tls_privatekey = /etc/exim4/exim.key
hosts_require_auth = smtp.gmail.com::587 gmail-smtp.l.google.com::587
mail.isp.org::465
hosts_require_tls = smtp.gmail.com::587 gmail-smtp.l.google.com::587
mail.isp.org::465



by_relay :
driver = smtp
port = 25


local_delivery:
driver = appendfile
directory = $home/Maildir
maildir_format
maildir_use_size_file
delivery_date_add
envelope_to_add
return_path_add

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply

begin retry
*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h


begin rewrite

begin authenticators

login:
driver = plaintext
public_name=LOGIN
client_send = :
"${extract{auth_name}{${lookup{$sender_address}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}"
:
"${extract{auth_pass}{${lookup{$sender_address}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}"

root@server2:/etc/exim4#



On 09/04/12 02:27, Phil Pennock wrote:
> On 2012-04-07 at 17:19 +0100, p cooper wrote:
>> :~# cat /etc/exim4/smarthosts
>> @isp.org: smarthost=mail.isp.org::465 auth_name=me@???_pass=xxxxx
>> @gmail.com: smarthost=smtp.gmail.com::587 auth_name=xxxx@???
>> auth_pass=xxxx
>>
>> root@server2:~#
>> but emails sent from the remote client isp.org are routed through my
>> default smarthost ( defined separately )
>>
>> I dont think the lookup is working
>>
>> ~# exim -be
>> '${extract{smarthost}{${lookup{isp.org}wildlsearch{/etc/exim4/smarthosts}{$value}fail}}}'
>> Failed: "lookup" failed and "fail" requested
>> root@server2:~#
> You want the keys in /etc/exim4/smarthosts to be *@isp.org with the "*"
> at the beginning, and the lookup type to be "wildlsearch*@" instead of
> "wildlsearch".
>
> There are more possibilities. See "9.3 Single-key lookup types" and
> "9.6 Default values in single-key lookups".
>
> -Phil
>