Re: [exim] Exim rewrites Return-Path when it shouldn't

Top Page
Delete this message
Reply to this message
Author: daniel
Date:  
To: exim-users
Subject: Re: [exim] Exim rewrites Return-Path when it shouldn't
On Monday 27 March 2006 15:07, Graeme Fowler wrote:
> The incoming MAIL FROM: address - the bit immediately after the <= -
> appears to be an email address in quotes, and Exim is therefore
> appending a default domain to it (unless there's some weird rewrite
> going on here to which we're not privy, as you haven't said whether or
> not you have a rewrite section in your config).
>
> Is your client sending a From: address which unqualified? If so, it
> looks like the way you're qualifying things is broken.
>
> Starting to look like a copy of your config - minus large comment
> blocks, unless entirely relevant, and with relevant MySQL DSN details
> sanitised - would be a useful thing to see.


My mail client is just Kmail and I'm not sure how to tell if an address is
unqualified or not. The domain it's sending from exists (in some, but not
all cases, it's even a domain belonging to the mail server in question)

I don't have any rewrite rules in the config. In fact, the config is pretty
much the default with a few changes for virtual domains, authentication and
the SQL-foo. However, I've obviously gibbled something somewhere so I'd
really appreciate you taking a look:






# $Cambridge: exim/exim-src/src/configure.default,v 1.6 2005/11/21 10:00:26
ph10 Exp $

# primary_hostname =
hide mysql_servers = HIDDEN/HIDDEN/HIDDEN/HIDDEN
daemon_smtp_ports = smtp : submission
tls_advertise_hosts = *
tls_certificate     = /etc/exim/exim.cert
tls_privatekey      = /etc/exim/exim.key
MYSQL_DOMAIN        = SELECT domain \
                      FROM   domains \
                      WHERE  domain = '${quote_mysql:$domain}'


MYSQL_ALIASES       = SELECT     a.destination \
                      FROM       aliases a \
                      INNER JOIN domains d \
                        ON       a.domain = d.id \
                      WHERE      CONCAT(a.local_part, '@', d.domain) = 
'${quote_mysql:$local_part}@${quote_mysql:$domain}'


MYSQL_ROUTE_DOMAINS = SELECT     u.local_part \
                      FROM       users u \
                      INNER JOIN domains d \
                        ON       u.domain = d.id \
                      WHERE      d.domain     = '${quote_mysql:$domain}' \
                        AND      u.local_part = '${quote_mysql:$local_part}' \
                        AND      u.status     = 1 \
                        AND      u.away       = 0


MYSQL_AUTH_PLAIN    = SELECT     1 \
                      FROM       users u \
                      INNER JOIN domains d \
                        ON       u.domain = d.id \
                      WHERE      CONCAT(u.local_part, '@', d.domain) = 
'${quote_mysql:$2}' \
                        AND      password = '${quote_mysql:$3}'


MYSQL_AUTH_LOGIN    = SELECT     'yes' \
                      FROM       users u \
                      INNER JOIN domains d \
                        ON       u.domain = d.id \
                      WHERE      CONCAT(u.local_part, '@', d.domain) = 
'${quote_mysql:$1}' \
                        AND      password = '${quote_mysql:$2}'


domainlist local_domains    = @ : mysql;MYSQL_DOMAIN
domainlist relay_to_domains =
hostlist   relay_from_hosts = localhost : 192.168.0.0/24


acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data

# qualify_recipient =
# allow_domain_literals

exim_user = mailnull
exim_group = mail
never_users = root

host_lookup = *

rfc1413_hosts = 192.168.0.0/24
rfc1413_query_timeout = 0s

ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d

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   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./


  accept  local_parts   = postmaster
          domains       = +local_domains


  require verify        = sender


  accept  hosts         = +relay_from_hosts
          control       = submission


  accept  authenticated = *
          control       = submission


  accept  domains       = +local_domains
          endpass
          verify        = recipient


  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient


  deny    message       = relay not permitted



acl_check_data:

accept


begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup mysql{MYSQL_ALIASES}{$value}fail}
user = mailnull
group = mail
file_transport = address_file
pipe_transport = address_pipe

userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
# allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
condition = ${if exists{$home/.forward} {yes} {no} }

# Virtual Domains ----------------------------------------------------
custom_domains:
driver = accept
domains = +local_domains
local_parts = mysql;MYSQL_ROUTE_DOMAINS
transport = custom_mailboxes
# Virtual Domains ----------------------------------------------------

localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user


begin transports

remote_smtp:
driver = smtp

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
group = mail
user = $local_part
mode = 0660
no_mode_fail_narrower

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply


# Virtual Domains ----------------------------------------------------
custom_mailboxes:
driver = appendfile
directory = /var/mail/_domains/$domain/$local_part
delivery_date_add
envelope_to_add
return_path_add
user = mailnull
maildir_format
# Virtual Domains ----------------------------------------------------


begin retry

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



begin rewrite


begin authenticators

lookup_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${lookup mysql{MYSQL_AUTH_PLAIN}{1}fail}
server_set_id = $2

lookup_login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${lookup mysql{MYSQL_AUTH_LOGIN}{yes}fail}
server_set_id = $1









--
Be ashamed to die until you have won some victory for humanity
- Horace Mann, First President, Antioch College.