Re: [exim] strange problem with smarthosts

Top Pagina
Delete this message
Reply to this message
Auteur: Guo Wei-Wei
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] strange problem with smarthosts
Sorry, Marc. I couldn't access internet for days until last Sunday. I
failed to notice your replay until Ian's mail pulled this thread up to
the top of my mails.

Thank you, Ian. I tried your configuration, but I got the same
results. The results make me wander that exim is looking at the TO
area instead of the FROM area. And I'm also wandering that there are
something wrong with my MUA.

There are something I should explain first. In the previous mails, I
used the "me@???". I find it's confusing, because my email
account is wwguo and my local user is also wwguo. To avoid changing
anything wrong, I just let it be in this mail. My another email
account is the gmail account, me@???, which requires TLS and
wwguo@??? do not.

First, I use Gnus as my MUA. I commented out the following line.

;; (setq user-mail-address "wwguo@???")

and then when I send a mail from wwguo@??? to
another@???, the results changed from

>2006-10-28 14:08:55 1GdhNH-0007gh-6s <= wwguo@localhost U=wwguo

P=local S=488 id=87fyd93rbd.fsf@???
>2006-10-28 14:08:55 1GdhNH-0007gh-6s ** another@???: Unknown user
>2006-10-28 14:08:55 1GdhNH-0007go-BO <= <> R=1GdhNH-0007gh-6s U=mail

P=local S=1252
>2006-10-28 14:08:55 1GdhNH-0007go-BO => wwguo<wwguo@localhost>

R=localuser T=local_delivery
>2006-10-28 14:08:55 1GdhNH-0007gh-6s Completed
>2006-10-28 14:08:55 1GdhNH-0007go-BO Completed


to

>2006-11-08 14:51:28 1GhhHU-0007Kv-NE <= wwguo@localhost U=wwguo

P=local S=515 id=877iy6a0sv.fsf@???
>2006-11-08 14:51:28 1GhhHU-0007Kv-NE ** another@???: Unknown user
>2006-11-08 14:51:29 1GhhHU-0007Kx-W0 <= <> R=1GhhHU-0007Kv-NE U=mail

P=local S=1279
>2006-11-08 14:51:29 1GhhHU-0007Kx-W0 => wwguo <wwguo@localhost>

R=localuser T=local_delivery
>2006-11-08 14:51:29 1GhhHU-0007Kv-NE Completed
>2006-11-08 14:51:29 1GhhHU-0007Kx-W0 Completed


When I send a mail from me@??? to another@???, the results are:

>2006-11-08 15:39:12 1Ghi1g-0006oL-5r <= wwguo@localhost U=wwguo

P=local S=522 id=87u01a8k0v.fsf@???
>2006-11-08 15:39:12 1Ghi1g-0006oL-5r ** another@???: Unknown user
>2006-11-08 15:39:12 1Ghi1g-0006oN-7C <= <> R=1Ghi1g-0006oL-5r U=mail

P=local S=1284
>2006-11-08 15:39:12 1Ghi1g-0006oN-7C => wwguo <wwguo@localhost>

R=localuser T=local_delivery
>2006-11-08 15:39:12 1Ghi1g-0006oL-5r Completed
>2006-11-08 15:39:12 1Ghi1g-0006oN-7C Completed


And when I send a mail form me@??? to wwguo@???, the results are:

>2006-11-08 15:37:28 1Ghi00-0006X3-VN <= wwguo@localhost U=wwguo

P=local S=513 id=87y7qm8k3r.fsf@???
>2006-11-08 15:37:29 1Ghi00-0006X3-VN => wwguo <wwguo@???>

R=localuser T=local_delivery
2006-11-08 15:37:29 1Ghi00-0006X3-VN Completed


It seems all my email are go through localhost, not smarthost. I know
Marc have given me some advices, but I cannot understand. So I paste
my entire configuration here:


# my /usr/local/etc/exim/source_routes:
example.com: smtp.example.com
gmail.com: smtp.gmail.com

# my /usr/local/etc/exim/auth_hosts:
smtp.example.com: authid=wwguo authpass="password1"
smtp.gmail.com: authid=me@??? authpass="password2"


# my exim.conf:

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################


domainlist local_domains = @
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1

acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data

never_users = root

host_lookup = *

rfc1413_hosts = *
rfc1413_query_timeout = 5s

ignore_bounce_errors_after = 1d

timeout_frozen_after = 3d


######################################################################
#                       ACL CONFIGURATION                            #
#         Specifies access control lists for incoming SMTP mail      #
######################################################################


begin acl

acl_check_rcpt:

accept hosts = :

  deny    message       = Restricted characters in address
          domains       = +local_domains
          local_parts   = ^[.] : ^.*[@%!/|]


  deny    message       = Restricted characters in address
          domains       = !+local_domains
          local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./


  require verify        = sender


  accept  hosts         = +relay_from_hosts
          control       = submission


  accept  authenticated = *
          control       = submission


  require message = relay not permitted
          domains = +local_domains : +relay_domains


require verify = recipient

accept

acl_check_data:

accept


######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################


begin routers

source_route:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
senders = ${lookup{$sender_address_domain}lsearch{/usr/local/etc/exim/source_routes}{*@$sender_address_domain}
fail }
route_data = ${lookup{$sender_address_domain}lsearch{/usr/local/etc/exim/source_routes}{$value}}
no_more

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


######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################


begin transports

remote_smtp:
driver = smtp
hosts_require_auth =
${lookup{$host}lsearch{/usr/local/etc/exim/auth_hosts}{$host}{}}
hosts_require_tls = smtp.gmail.com

local_delivery:
driver = appendfile
directory = /var/mail
maildir_format
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0660

address_reply:
driver = autoreply


######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################


begin retry

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



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################


begin rewrite


######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################


begin authenticators

login:
driver = plaintext
public_name = LOGIN
server_prompts = Username:: : Password::
server_condition = no
server_set_id = $1
client_send = ${extract{authid}{${lookup{$host}lsearch{/usr/local/etc/exim/auth_hosts}{$value}{}}}}
: ${extract{authpass}{${lookup{$host}lsearch{/usr/local/etc/exim/auth_hosts}{$value}{}}}}

# The end of exim configuration



Thank you very much!
Wei-Wei