Re: [Exim] Exim4.30 + PostgreSQL

Top Pagina
Delete this message
Reply to this message
Auteur: Mikhail Ts
Datum:  
Aan: Tamas TEVESZ
CC: exim-users
Onderwerp: Re: [Exim] Exim4.30 + PostgreSQL
--- Tamas TEVESZ <ice@???> wrote: > On Mon, 29 Mar 2004, > I'll
> > replace pgsql lookup with mysql lookup now and see what happens. I
> have
> > MySQL running anyway, just to have to rebuild Exim with mysql
> support
> > this time.
>
> i'd say, high time for you to post your complete config (save
> comments
> where appropriate) and the postgres database structure. not parts
> what
> you deem relevant, all of it.
>


Well, I did rebuild and it worked - the same config, only replaced
pgsql with mysql in relevant places. It worked as for local_domains
list as well as for router section. So, I think it has something to do
with PostgreSQL lookup. I'm using the very same Postgre server for a
while and have nothing to complain about. I'm accessing it using JDBC
driver and PgAdmin tool from Windows box. I think, in both cases libpq
library is not involved and Exim was the first one to use that. Anyhow
- I'd like to hear some advice on what to do next, I prefer Postgre for
my project and don't like idea to maintain MySQL just for email table.
Do you think that publishing DB structure would make any difference?
My previous step didn't even have "FROM" clause and it didn't change a
thing. Here is my Exim config, in case I overlooked something. I
haven't modified it to fetch actual data from the table yet.

#hide pgsql_servers = localhost/maildb/mailuser/mailpwd
hide mysql_servers = localhost/maildb/root/

domainlist local_domains = ${lookup mysql{SELECT 'my-domain.com' FROM
mail WHERE mail_id='${local_part}@${domain}'}{$value}fail}
#domainlist local_domains = ${lookup pgsql{SELECT 'my-domain.com' FROM
mail}{$value}fail}
#${lookup pgsql{SELECT domain FROM mail WHERE
mail_id='${local_part}@${domain}'}{$value}fail}
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1:192.168.0.0/24


acl_smtp_rcpt = acl_check_rcpt


qualify_domain = my-domain.com

never_users = root

rfc1413_hosts = *
rfc1413_query_timeout = 2s

ignore_bounce_errors_after = 2d

timeout_frozen_after = 7d

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


begin acl

acl_check_rcpt:

accept domains = +local_domains
accept hosts = :

  accept  local_parts   = postmaster
          domains       = +local_domains


# Deny unless the sender address can be verified.

  require verify        = sender



  accept  domains       = +local_domains
          endpass
          verify        = recipient


  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient


  accept  hosts         = +relay_from_hosts



accept authenticated = *

  deny    message       = relay not permitted




######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
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

#vlookup:
# driver = accept
# domains = ${lookup mysql{SELECT 'mail_id' FROM mail WHERE
mail_id='${local_part}@${domain}'}{$domain}fail}
# domains = ${lookup pgsql{SELECT 'mail_id'}}
# transport = local_delivery
# ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
# no_more


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

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

localuser:
driver = accept
# check_local_user
transport = local_delivery
cannot_route_message = Unknown address

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


begin transports

remote_smtp:
driver = smtp

local_delivery:
driver = appendfile
group = mail
user = exim
mode = 660
create_directory = true
directory_mode = 700
directory = /usr/local/mail/${local_part}/Maildir
maildir_format
envelope_to_add = true
return_path_add = true

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply



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


begin retry

# Address or Domain    Error       Retries
# -----------------    -----       -------


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




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


begin rewrite

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


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

begin authenticators



______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca