[Exim] VmailSQL and MySql and Exim3 and SMTP error

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: ScaryG
Dátum:  
Címzett: exim-users
Tárgy: [Exim] VmailSQL and MySql and Exim3 and SMTP error
Hey gang!

I'm having a strange problem with VmailSQL and Exim 3.36 #1.

I have a virtual sub-domain address that accepts and delivers fine if mail
is sent from a computer on the local internal LAN.

But incoming mail from the outside world gets directed wrong.

user@???

gets sent to

user@??? (minus the subdomain)

and naturally, that "user" doesn't exist.

In exim Mainlog I see:

verify failed for SMTP recipient user@??? from <email@???>
H=ip number

Any of the debug commands I know for the command line all involve local
delivery and that part works so all those tests do too. Nothing is kept in
the queue so I can't run tests on frozen messages (all get immediately
returned).

I also run mailscanner so I have two instances of exim running. One uses
configure as the config file and the other uses exim_outgoing as the
config file. They are both the same except for a line in one that says
queue only.

Parts of my configure file are as follows. I'm kinda thinking the order of
the Virtual domain vs. Local stuff needs to corrected??

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


LOCAL_ALIASES = /etc/mail/local_aliases
message_filter = /usr/local/etc/exim/system_filter.exim
message_body_visible = 5000

deliver_queue_load_max = 8
smtp_accept_max = 20
smtp_accept_max_per_host = 10
spool_directory = /var/spool/exim_incoming
queue_only = true

# reject messages whose sending host is in MAPS/RBL & MAP/DUL
# add warning to messages whose sending host is in RSS
rbl_domains = relays.ordb.org/reject
# check all hosts other than those on internal network
rbl_hosts = !192.168.0.1/24:0.0.0.0/0
# but allow mail to postmaster@??? even from rejected host
recipients_reject_except = postmaster@???
# change some logging actions (collect more data)
rbl_log_headers
rbl_log_rcpt_count

primary_hostname = scaryg.shacknet.nu

qualify_domain = scaryg.shacknet.nu

hide mysql_servers = localhost::3306/dbname/user/passwd

# qualify_recipient =

local_domains = scaryg.shacknet.nu:/etc/mail/local-host-names

forbid_domain_literals

exim_user = mailnull
exim_group = mail
never_users = root

host_accept_relay = localhost : 192.168.0.0/24 : 127.0.0.1 :
scaryg.shacknet.nu
relay_domains = scaryg.shacknet.nu:/etc/mail/relay-domains

host_lookup = *

receiver_verify

sender_verify

ignore_errmsg_errors_after = 2d

timeout_frozen_after = 7d




######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


# A transport is used only when referenced from a director or a router
# that successfully handles an address.

# This transport is to deliver mail going to virtual domains to user
# mailspools in directories under /var/spool/mail/SERVERS/foo/bar; this is
# triggered from a director below.

virtual_localdelivery:
driver = appendfile
file = ${lookup mysql{select path from domain left join domain_alias on
domain_alias.domain_name = domain.domain_name where domain.domain_name =
'$domain' or domain_alias.alias = '$domain'}{$value}fail}/${lookup
mysql{select mbox_name from popbox left join domain_alias on
popbox.domain_name = domain_alias.domain_name where (popbox.domain_name =
'$domain' or domain_alias.alias = '$domain') and local_part =
'$local_part'}{$value}fail}
delivery_date_add
envelope_to_add
return_path_add
user = ${lookup mysql{select unix_user from domain left join
domain_alias on domain_alias.domain_name = domain.domain_name where
domain.domain_name = '$domain' or domain_alias.alias =
'$domain'}{$value}fail}
mode = 0660

# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp


# This transport is used for local delivery to user mailboxes in
# traditional BSD mailbox format. By default it will be run under the uid
# and gid of the local user, and requires the sticky bit to be set on the
# /var/mail directory. Some systems use the alternative approach of
# running mail deliveries under a particular group instead of using the
# sticky bit. The commented options below show how this can be done.

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


# This transport is used for handling pipe deliveries generated by alias
# or .forward files. If the pipe generates any standard output, it is
# returned to the sender of the message as a delivery error. Set
# return_fail_output instead of return_output if you want this to happen
# only when the pipe fails to complete normally. You can set different
# transports for aliases and forwards if you want to - see the references
# to address_pipe in the directors section below.

address_pipe:
driver = pipe
return_output


# This transport is used for handling deliveries directly to files that
# are generated by aliasing or forwarding.

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add


# This transport is used for handling autoreplies generated by the
# filtering option of the forwardfile director.

address_reply:
driver = autoreply




######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#   A local address is passed to each in turn until it is accepted.  #
######################################################################



bounce_spam_master:
driver = smartuser
require_files = /usr/local/etc/exim/bouncelist
senders = /usr/local/etc/exim/bouncelist
new_address = :fail: "unknown local-part \"$local_part\" in domain
\"$domain\""


bounce_spam_personal:
driver = smartuser
senders = /home/$local_part/.bouncelist
require_files = /home/$local_part/.bouncelist
new_address = :fail: unknown local-part \"$local_part\" in domain
\"$domain\"


system_aliases:
domains = LOCAL_ALIASES
driver = aliasfile
file = /etc/mail/aliases
search_type = lsearch
user = exim
group = mail
qualify_preserve_domain = true
file_transport = address_file
pipe_transport = address_pipe


userforward:
domains = LOCAL_ALIASES
driver = forwardfile
file = .forward
no_verify
no_expn
check_ancestor
# filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
match_directory = !^/nonexistent


# This director matches local user mailboxes.

localuser:
domains = LOCAL_ALIASES
driver = localuser
transport = local_delivery

# For Virtual Email Stuff
# Handle forwarders and aliases (same database table)

virtual_forward:
driver = aliasfile
search_type = mysql
query = "select remote_name from forwarder left join domain_alias on
domain_alias.domain_name = forwarder.domain_name where local_part =
'$local_part' and (forwarder.domain_name = '$domain' or alias =
'$domain')"
forbid_file = true
forbid_pipe = true

# Handle delivery; see sample config C009 for what this is based on; it
# only handles things for the virtual domains, which are listed in the
# database.

virtual_localuser:
driver = aliasfile
search_type = mysql
query = "select mbox_name from popbox left join domain_alias on
domain_alias.domain_name = popbox.domain_name where local_part =
'$local_part' and (popbox.domain_name = '$domain' or alias = '$domain')"
transport = virtual_localdelivery

# deliver any undelivered virtual email according to the _default_
# forwarder

virtual_defaultuser:
driver = aliasfile
search_type = mysql
query = "select remote_name from forwarder left join domain_alias on
domain_alias.domain_name = forwarder.domain_name where local_part =
'_default_' and (forwarder.domain_name = '$domain' or domain_alias.alias =
'$domain')"
forbid_file = true
forbid_pipe = true


######################################################################
#                      ROUTERS CONFIGURATION                         #
#            Specifies how remote addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#  A remote address is passed to each in turn until it is accepted.  #
######################################################################


send_to_gateway:
driver = domainlist
transport = remote_smtp
route_list = * smtp1.sympatico.ca byname






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


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





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


# There are no rewriting specifications in this default configuration
# file.




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


# There are no authenticator specifications in this default configuration
# file.

# End of Exim configuration file