[exim] Re: Exim 4.97 issues - NetBSD 9.3

2024-02-23 Thread Kazuo Kuroi via Exim-users
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, 3:38 PM, at 3:38 PM, Kirill Miazine via Exim-users 
 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,
>
>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/

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe 

[exim] Re: Exim4 smarthost troubles

2024-02-23 Thread Andreas Metzler via Exim-users
On 2024-02-23 Eric Kingston via Exim-users  wrote:
[...]
> Below is a communication log directly from the command-line

> exim -v ericnk...@gmail.com
[...]

echo blah | /usr/sbin/exim -d+all ericnk...@gmail.com 

should give you a lot more information on where things go wrong;
especially why exim is not authenticating to the remote.

Please be super careful when sharing this, triplechecking it for passwd
and such (even in base64 encoded data).

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

-- 
## 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/


[exim] Re: Exim4 smarthost troubles

2024-02-23 Thread Ian Z via Exim-users
On Thu, Feb 22, 2024 at 07:15:48PM -0700, Eric Kingston via Exim-users wrote:

> It looks like the authentication methods are CRAM-MD5 PLAIN
> LOGIN. Any ideas?

I'll only be able to help further if you provide the native Exim
configuration file, which (IIRC) Debian generates somewhere under
/var. It is OK to obscure identifying data, of course. But if you'd
like to discuss this in terms of the Debian meta-configuration,
I suggest taking it to debian-user.

It definitely looks like the client_condition in your authentication
config is not being satisfied, because the server offers
authentication and the session is TLS encrypted.

Meanwhile I got a private reply suggesting to adjust your transport
from remote_smtp to remote_smtp_smarthost, but it doesn't seem to
apply to your situation, maybe because you have already done that?

-- 
Ian

-- 
## 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/


[exim] Re: Exim 4.97 issues - NetBSD 9.3

2024-02-23 Thread Ian Z via Exim-users
On Thu, Feb 22, 2024 at 12:53:21PM -0500, Kazuo Kuroi via Exim-users wrote:

> 60% of guides out there are referencing a custom Debian patched version

This is a bit sideways. Debian patches exim just like any GNU/Linux
distro patches most upstream packages, but that's not the point. Rather,
what's important is that they provide a *simplified wrapper* of the
native configuration. The relationship is a bit like the one between
plain TeX and LaTeX.

-- 
Ian

-- 
## 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/


[exim] Re: Exim4 smarthost troubles

2024-02-23 Thread Eric Kingston via Exim-users

Hello Ian,

I appreciate any help you can offer.  My OS is the Debian variant 
Ubuntu.  For exim4 on Ubuntu, there is a configuration file 
(update-exim4.conf.conf) in which I specify the smart host.  From this, 
a script (update-exim4.conf) auto generates the configuration file 
(config.autogenerated) located in /var/lib/exim4 that I have attached to 
this email.  In addition, I have included an excerpt from exim debug 
output that may be relevant to the problem ...


16:48:51.076 57957 1.179.119.1 in hosts_require_auth? no (option unset)
16:48:51.076 57957  ╭considering: <; ${if exists{passwd.client} 
{${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }
16:48:51.076 57957   ╭considering: passwd.client} 
{${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }

16:48:51.076 57957   ├──expanding: passwd.client
16:48:51.076 57957   ╰─result: passwd.client
16:48:51.076 57957  ├──condition: exists{passwd.client}
16:48:51.076 57957  ├─result: false
16:48:51.076 57957   ╭───scanning: 
${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }
16:48:51.076 57957    ╭───scanning: 
$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }

16:48:51.076 57957    ├──expanding: $host
16:48:51.076 57957    ├─result:
16:48:51.076 57957    ╰───skipping: result is not used
16:48:51.076 57957    ╭───scanning: 
/etc/exim4/passwd.client}{$host_address}}}{} }

16:48:51.076 57957    ├──expanding: /etc/exim4/passwd.client
16:48:51.076 57957    ├─result: /etc/exim4/passwd.client
16:48:51.076 57957    ╰───skipping: result is not used
16:48:51.076 57957    ╭───scanning: $host_address}}}{} }
16:48:51.076 57957    ├──expanding: $host_address
16:48:51.076 57957    ├─result:
16:48:51.076 57957    ╰───skipping: result is not used
16:48:51.076 57957   ├──expanding: 
${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}

16:48:51.076 57957   ├─result:
16:48:51.076 57957   ╰───skipping: result is not used
16:48:51.076 57957   ╭considering: } }
16:48:51.076 57957   ├──expanding:
16:48:51.076 57957   ╰─result:
16:48:51.076 57957  ├──expanding: <; ${if exists{passwd.client} 
{${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }

16:48:51.076 57957  ╰─result: <;
16:48:51.076 57957 1.179.119.1 in hosts_try_auth? no (end of list)

It seems that the check if passwd.client exists may be failing...

16:48:51.076 57957  ├──condition: exists{passwd.client}
16:48:51.076 57957  ├─result: false


But the path it lists is correct and the file does exist

16:48:51.076 57957  ╭considering: <; ${if exists{passwd.client} 
{${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }
16:48:51.076 57957   ╭considering: passwd.client} 
{${lookup{$host}nwildlsearch{/etc/exim4/passwd.client}{$host_address}}}{} }



Also, the smart host router is being used

16:48:50.845 57956 routed by smarthost router
16:48:50.845 57956   envelope to: ericnk...@gmail.com
16:48:50.845 57956   transport: remote_smtp_smarthost
16:48:50.845 57956   host smtp-relay.brevo.com [1.179.119.1] port=587

Again, thanks for your help.


On 2/23/2024 10:27 AM, Ian Z via Exim-users wrote:

On Thu, Feb 22, 2024 at 07:15:48PM -0700, Eric Kingston via Exim-users wrote:


It looks like the authentication methods are CRAM-MD5 PLAIN
LOGIN. Any ideas?

I'll only be able to help further if you provide the native Exim
configuration file, which (IIRC) Debian generates somewhere under
/var. It is OK to obscure identifying data, of course. But if you'd
like to discuss this in terms of the Debian meta-configuration,
I suggest taking it to debian-user.

It definitely looks like the client_condition in your authentication
config is not being satisfied, because the server offers
authentication and the session is TLS encrypted.

Meanwhile I got a private reply suggesting to adjust your transport
from remote_smtp to remote_smtp_smarthost, but it doesn't seem to
apply to your situation, maybe because you have already done that?
#
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# This file was generated dynamically from
# non-split config (/etc/exim4/exim4.conf.localmacros
# and /etc/exim4/exim4.conf.template).
# The config files are supplemented with package installation/configuration
# settings managed by debconf. This data is stored in
# /etc/exim4/update-exim4.conf.conf
# Any changes you make here will be lost.
# See /usr/share/doc/exim4-base/README.Debian.gz and update-exim4.conf(8)
# for instructions of customization.
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# WARNING WARNING WARNING
# WARNING WARNING WARNING
#

MAIN_TLS_ENABLE = true
MAIN_TLS_CERTIFICATE = /etc/letsencrypt/live/smtp.noalmusic.com/cert.pem
MAIN_TLS_PRIVATEKEY = /etc/letsencrypt/live/smtp.noalmusic.com/privkey.pem

DKIM_DOMAIN=noalmusic.com
DKIM_S

[exim] Re: Exim4 smarthost troubles

2024-02-23 Thread Andreas Metzler via Exim-users
Good morning,

On 2024-02-24 Eric Kingston via Exim-users  wrote:
[...]
> 16:48:51.076 57957  ╭considering: <; ${if exists{passwd.client}
[...]
> 16:48:51.076 57957  ├──condition: exists{passwd.client}
> 16:48:51.076 57957  ├─result: false
[...]
> It seems that the check if passwd.client exists may be failing...

> 16:48:51.076 57957  ├──condition: exists{passwd.client}
> 16:48:51.076 57957  ├─result: false

exactly.

> But the path it lists is correct and the file does exist

It tests for "exists{passwd.client}" instead of
"exists{/etc/exim4/passwd.client}" i.e. it will search in the current
working directory instead of below /etc.

[...]
> remote_smtp_smarthost:
>   debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
>   driver = smtp
>   multi_domain
>   hosts_try_auth = <; ${if exists{passwd.client} \
 
> {\
> ${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$host_address}}\
  ^

Note the difference. 

cu Andreas

-- 
## 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/