[Exim] Exim4/postgres configuration for verifying recipients

Top Pagina
Delete this message
Reply to this message
Auteur: Stephen Gibberd
Datum:  
Aan: exim-users
Onderwerp: [Exim] Exim4/postgres configuration for verifying recipients
Hello,

I'm setting up an email server using postgresql and based on the
configuratons at:

http://www.kowee.com/exim/exim002-eng.html
and
http://silverwraith.com/vexim/

however, with the following configuration:

acl_check_rcpt:
  accept  domains       = +local_domains
          endpass
          message       = unknown user
          verify        = recipient


#Router
mydomain:
driver = accept
domains = +local_domains
transport = mydomain_delivery

#Transports
mydomain_delivery:
    driver = appendfile
    create_directory = true
    mode = 0700
    maildir_format = true
    directory = ${lookup pgsql{select dir from maildir where  address = '${local
_part}@${domain}'}}
    quota = ${lookup pgsql{select qtasize from maildir where address = '${local_part}@${domain}'}}
    quota_filecount = ${lookup pgsql{select qtacount from maildir where address = '${local_part}@${domain}'}}


exim was accepting any recipient that had a domain in the local domain,
even if their email address was not in the maildir table. After
accepting the email, exim then failed to deliver it because the pgsql lookups
failed to return any data. To make exim reject unknown users, I had to
add the following:

mydomain:
driver = accept
domains = +local_domains
transport = mydomain_delivery
condition = ${lookup pgsql{select dir from maildir where address = '${local_part}@${domain}'}}

I haven't seen anyone else using this, which makes me think that it is
the wrong way to solve this problem or I've done something else wrong.
Has anyone else had any experiences like this?

Thanks, Stephen