[Exim] Problems....

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Stephen D. Malenshek
Data:  
Para: exim-users
Assunto: [Exim] Problems....
I am attempting to convert our existing Exim configuration to reference
a PostgreSQL database. The problem is that I am getting errors in the
logs and quite honestly I am not sure as to which section is having the
error. The errors are as follows:

2003-07-25 16:03:22 19g9eu-0001bL-8p == stephen@???
routing defer (-51): retry time not reached
2003-07-25 16:03:33 19g9iv-0001br-FQ <= root@??? U=root
P=local S=340 T="qwer" from <root@???> for
stephen@???
2003-07-25 16:03:33 19g9iv-0001br-FQ == stephen@???
R=remote_delivery defer (-1): domains check lookup or other defer

I am setting this up on a development machine and from what I can tell,
everything is in the database that needs to be there, so I figure it is
a syntax issue with the configuration. The configuration is as follows:

# SMTP router configuration.
# Exim 4.12

# Address of the server administrator.
SERVER_ADMINISTRATOR                    =
postmaster@???


# The server accepting mail for my local domains.
LOCAL_RELAY_HOST                        =
pop3.internal.vlnx.net


# Listen on addresses.
local_interfaces                        =
0.0.0.0


# Specify your host's canonical name here.
primary_hostname                        =
smtp.internal.vlnx.net


# Domains which are treated as local users.
domainlist domains_local                = @


# Domains for which I am the primary mail exchanger.
domainlist domains_primary                = pgsql;select
domainname from hostdomains where \


domainname = '${quote_pgsql:$local_part}' and enabled = 1;

# Domains for which I am a backup mail exchanger.
domainlist domains_backup                = pgsql;select
domainname from hostdomains where \
                                                domainname =
'${quote_pgsql:$local_part}' and enabled = 1;


# Hosts for which I will relay.
hostlist relay_hosts                    = pgsql;select
ipblock from relays where \
                                                ipblock =
'${quote_pgsql:$local_part}';


#
net-pgsql;select ipblock from relays where
ipblock='$sender_host_address'

# Hosts which can go away
hostlist black_hosts                    = pgsql;select
ipaddr from ipblacklist where \
                                                ipaddr =
'${quote_pgsql:$local_part}'; : \


pgsql;select domainname from domainblacklist where \

domainname = '${quote_pgsql:$local_part}';

# Specify the domain you want to be added to all unqualified addresses
# here. An unqualified address is one that does not contain an "@"
character
# followed by a domain. For example, "caesar@???" is a fully
qualified
# address, but the string "caesar" (i.e. just a login name) is an
unqualified
# email address. Unqualified addresses are accepted only from local
callers by
# default. See the recipient_unqualified_hosts option if you want to
permit
# unqualified addresses from remote sources. If this option is not set,
the
# primary_hostname value is used for qualification.
#
qualify_domain                        = valuelinx.net


# System users exim will never deliver mail as.
never_users
= root

# Get the hostnames of the clients. -- This should probably be
disabled.
host_lookup
= *

# Until MS Exchange is banned from the internet... i suppose we should
accept
# underscores in their fucking hostnames, even though it is a blatant
violation
# of RFC 1031.
helo_allow_chars                        = _


# No ident requests.
rfc1413_hosts                            = 0
rfc1413_query_timeout                    = 30s


# This option unfreezes frozen bounce messages after two days, tries
# once more to deliver them, and ignores any delivery failures.
ignore_bounce_errors_after                = 2d


# This option cancels (removes) frozen messages that are older than a
week.
timeout_frozen_after                    = 7d


# Reset all retry information if a message is this old
retry_data_expire                        = 7d


auto_thaw
= 1d

#freeze_tell
= SERVER_ADMINISTRATOR
errors_copy
= SERVER_ADMINISTRATOR
errors_reply_to                            =
SERVER_ADMINISTRATOR


# Number of times to retry the authentication request.
# finduser_retries                        = 0


# Logging configuration.
log_selector                            = +all
-arguments -queue_run
message_logs                            = false


# Queue configuration.
split_spool_directory                    = true
queue_only_load                            = 8.00
queue_run_max                            = 5


# SMTP configuration.
smtp_reserve_hosts                        =
+relay_hosts
smtp_accept_max                            = 350
smtp_accept_max_per_host                = 20
smtp_accept_queue_per_connection        = 40
smtp_accept_reserve                        = 100
smtp_connect_backlog                    = 50
smtp_load_reserve                        = 8.00
smtp_receive_timeout                    = 3m


# The ACL definitions.
acl_smtp_auth                            =
acl_auth_main
acl_smtp_rcpt                            =
acl_rcpt_main
acl_smtp_data                            =
acl_data_main
acl_smtp_etrn                            =
acl_etrn_main
acl_smtp_expn                            =
acl_expn_main
acl_smtp_vrfy                            =
acl_vrfy_main


# Exiscan configuration.
# .include /etc/exim/exiscan.conf

# PostgreSQL Servers
hide pgsql_servers =
10.1.4.57/XXXXXXXXXXXX/XXXXXXXXXXXXXXX/XXXXXXXXXXXXXXX

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


# Authentication for relay hosts.
acl_auth_main: deny

# Message preparation.
acl_rcpt_main:
    # Filter usernames with invalid characters.
    deny        log_message            = Invalid
characters in address
                message                =
invalid characters in address
                local_parts         = ^.*[@%!/|] :
^\\.


    # Accept mail to postmaster without prejudice.
    accept        domains                = +domains_local
: +domains_primary : +domains_backup
                local_parts            =
postmaster


    # Require valid return addresses.
    require        log_message            = bad sender
address ($sender_address) from $sender_host_address
                message                = unable
to verify the existance of the senders address
                verify                = sender


    # Require valid recipient addresses.
    require        log_message            = bad recipient
address from $sender_host_address
                message                = unable
to verify the existance of the recipients address
                verify                =
recipient


    # Accept local deliveries.
    accept        hosts                = :


    # Accept if the source is from someone I'm allowed to relay for.
    accept        hosts                = +relay_hosts


    # Filter blacklisted MTAs
    deny        message                =
$sender_host_address is blacklisted in black.hosts
                log_message            =
blacklisted sender $sender_host_address
                hosts                =
+black_hosts


    deny        message                =
$sender_host_address is blacklisted at $dnslist_domain
                log_message            =
blacklisted sender $sender_host_address
                dnslists            =
relays.visi.com : sbl.spamhaus.org


    # Accept if it is mail for one of my domains.
    accept        domains                = +domains_local
: +domains_primary : +domains_backup


    # Otherwise, deny access.
    deny        log_message            = relaying
denied to $domain from $sender_host_address
                message                = mail
for $domain is not handled by this server



# Message data.
acl_data_main:
    accept
    # Limit message size?.


# SMTP ETRN requests.
acl_etrn_main:
    deny


# SMTP EXPN requests.
acl_expn_main:
    deny


# Remote verification of a username's existence.
acl_vrfy_main:
    deny



######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################
begin routers


# Mail not for me.
remote_delivery:
    driver                            =
dnslookup
    transport                        =
remote_smtp
    ignore_target_hosts                = 0.0.0.0 :
127.0.0.0/8
    domains                            = !
+domains_local : ! +domains_primary


# Mail for my primary domains.
remote_forward:
    driver                            =
manualroute
    transport                        =
remote_smtp
    domains                            =
+domains_primary
    route_data                        =
LOCAL_RELAY_HOST
    ignore_target_hosts                = 127.0.0.0/8 :
10.0.0.0/8 : 192.168.0.0/16


# Rewrite any aliases from /etc/aliases
system_aliases:
    driver                            =
redirect
    file_transport                    = address_file
    pipe_transport                    = address_pipe
    data                            =
pgsql;select  from ipblacklist where \


ipaddr = '${quote_pgsql:$local_part}';
    allow_fail
    allow_defer


# Execute the contents of the user's ~/.forward
dotforward:
    driver                            =
redirect
    file_transport                    = address_file
    pipe_transport                    = address_pipe
    reply_transport                    = address_reply
    file                            =
$home/.forward
    check_local_user
    no_verify
    no_expn
    check_ancestor


# Mail for a local user.
local_user:
    driver                            = accept
    transport                        =
local_mailspool
    check_local_user



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


# This transport is used for delivering messages over SMTP connections.
remote_smtp:
    driver                            = smtp


# This transport is used for local delivery.
# Deliver to /var/mail/<username> in maildir format.
local_mailspool:
    driver                            =
appendfile
    directory                        =
${lookup pgsql{SELECT mailspool from users \


where username = '$local_part'}{$value}}
    maildir_format                    = true
    create_directory                = true
    directory_mode                    = 0770
    mode                            = 0660
    group                            = mail
    # Enforce a user mail spool size quota.
    quota                            = 20M
    quota_warn_threshold            = 75%
    maildir_tag                        =
,S=$message_size
    quota_size_regex                = ,S=(\d+)
    delivery_date_add
    envelope_to_add
    return_path_add


address_file:
    driver                            =
appendfile
    delivery_date_add
    envelope_to_add
    return_path_add


address_pipe:
    driver                            = pipe
    return_output


address_reply:
    driver                            =
autoreply



######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################
begin retry
# This single retry rule applies to all domains and all errors. It
specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 1 hour and increasing each time by a factor of 1.5, up to
16
# hours, then retries every 6 hours until 4 days have passed since the
first
# failed delivery.


# Domain                Error       Retries
  *                        *
F,2h,15m; G,16h,1h,1.5; F,4d,6h



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################
begin rewrite



######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################
begin authenticators



# End of Exim configuration file
# vim: ts=4 sw=4 ft=conf ai



I am totally at a loss and have been looking at this configuration so
long that I can not see what is wrong. Please HELP.... :) Thanks in
advance.


Stephen