Hi there

I was sincerely trying to be helpful.

Exim is actually a MTA framework, not a typical MTA. So it's not meaningful to talk about "setting up Exim for virtual users and to set up mailboxes in a normal way", because there are unlimited ways to do this, and you'll really have to have more specific questions for someone to be able to help you.

Exim is a complex, but very well documented, piece of software. I think I started using Exim 4 late in 2001, but to this day I can't say I know all Exim. I found that the best way to learn it was to read the spec from the start -- once you understand the "flow", it becomes a lot easier, and you'll also understand the jargon, as you say. I never managed to read it till the end in one go, though.

Reading the default configuration file is also a good learning. Unfortunately, what Debian does is creating some kind of a mess (compared to canonical configuration), which at least for me is impossible to figure out, so you'll have to unlearn all the debianisms first.

As for Maildir delivery -- if you're using Dovecot, it makes sense to "outsource" as much to Dovecot as possible, to avoid duplication. Dovecot would handle delivery, index updates, Sieve rules, quotas and whatnot. Exim is even able to use Dovecot for SMTP authentication. (A bonus with using Dovecot for delivery, at least with LMTP, is that you won't have to deal with tainted variables so much.)

G'luck!

-- Kirill

• Kazuo Kuroi [2024-02-22 18:53]:
Hello Kirill,

Thank you for your reply. I understand that the relevancy of mentioning NetBSD may have been irrelevant, but many people are using some variety of GNU/Linux and a lot of things change between the two.

As far as letting Dovecot handle mailbox delivery, I'm not opposed and also having to familiarize myself with Dovecot's options. I was focused first on getting Exim working 100% then tweaking my config to include Dovecot.

I am able to understand parts of the config file but sometimes it can be overwhelming learning different syntaxes, and not all options are immediately apparent especially if the majority of documentation by third parties (e.g. Debian users, 60% of guides out there are referencing a custom Debian patched version) is irrelevant and you yourself aren't familiar with the jargon and terms being used to be able to search and find the answer yourself. I appreciate that in some ways my questions are probably obvious, but I did neither blindly apply config options nor just post here with zero research.

Thanks for the configuration. I'll have to modify it after referencing the netbsd documentation out there for Dovecot.

I'll be in touch if I have any more issues, thank you all.
On Feb 21, 2024, at 3:38 PM, Kirill Miazine via Exim-users <[email protected] <mailto:[email protected]>> wrote:

    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
  
<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
  
<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 <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):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to