Hi there

• Kazuo Kuroi via Exim-users [2024-02-20 15:30]:
Hello exim-users,

I am currently trying to set up an Exim mail server with Dovecot as my local 
IMAP system. Here is some info relevant to my setup:

Exim version is 4.97. built using pkgsrc.

Eh, I think the subject of the message is not really describing for the issue you're having, as there's nothing wrong with Exim on NetBSD.

The main issue I'm having is setting up Exim for virtual users and to set up 
mailboxes in a normal way.

You say that you're using Dovecot -- then why not use Dovecot's LDA -- or better LMTP and let Dovecot handle the delivery to the Maildirs, and also take care of using proper UID, Sieve filtering and whatnot?

Ideally I would like Exim to use /var/email/user@domain with a standard maildir 
directory tree. I am not sure how to accomplish this according to Exim 
documentation, which is extensive but also a bit overwhelming as someone who 
used Exim on Debian for years (which uses entirely different setups).

What Debian does is beyond my comprehension.

I suggest you read https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_default_configuration_file.html, which goes through default configuration files and talks about various parts of it.

Once I fixed the directory issue I can probably figure out how to set up 
virtual users and share that info between Exim and Dovecot. On Dovecot I can do 
this by using the %u variable. What would be the appropriate variable for here? 
I tried using a few from the manual but I was just blindly stabbing in the dark.

Here you can have my own router and transport for Dovecot delivery. Don't blindly copy, but try to understand what every options does.

dovecot:
    driver = accept
address_data = ${lookup{$local_part@$domain}lsearch{MAIL_PASSWD_MAP {$value}fail}
    local_part_suffix = +*
    local_part_suffix_optional
    transport = dovecot_lmtp

dovecot_lmtp:
    driver = lmtp
    socket = /var/dovecot/lmtp
    rcpt_include_affixes

MAIL_PASSWD_MAP is a macro which expands to a file which also Dovecot uses:

userdb {
  driver = passwd-file
  args = /local/db/dovecot-passwd/map
}

The file format is described in https://doc.dovecot.org/configuration_manual/authentication/passwd_file/#authentication-passwd-file

The other thing I would like to accomplish is having an /etc/localdomains and 
/etc/remotedomains file to hold what domains are accepted locally and not. I 
don't suppose this is possible with current configurations? I have no idea how 
it's done on RHEL or Debian, it always came out of the box like that.

Please read https://www.exim.org/exim-html-current/doc/html/spec_html/ch-how_exim_receives_and_delivers_mail.html and make sure you understand how delivery is done, especialy the role of routers, and how routers define which transport are responsible for doing the actual delivery (either locally or remotely).

There will probably be other problems that I have to discuss but I sincerely 
hope that I can get some help here. If I have omitted some crucial detail 
please let me know.


--
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to