[exim] Question about Exim macro language

2024-05-01 Thread halbtaxabo-jnq--- via Exim-users
I'm using Exim 4.96 on Debian 12.5.
There are 2 domains hosted on my server from which mail can be sent,
so to use DKIM I have to look up the key and the selector depending
on the sender's domain. And first I have to de-taint the domain
name. So I put the domain names in a file,
/etc/exim4/dkim/domainslist , readable by Debian-exim ,
and in the /etc/exim4/exim4.conf.localmacros file the first
nontrivial line is:
DKIM_DOMAIN = ${lookup{$domain:$h_from:}lsearch{/etc/exim4/dkim/domainslist}}

This doesn't work. I get no error messages, but when I send email
from one of the domains, stat reveals that
/etc/exim4/dkim/domainslist hasn't even been accessed.
(And obviously dkim is not set in the sent mail.)

Can anyone see what is wrong  with the above?
(Generating debugging output doesn't help.)

-- 
## 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: Question about Exim macro language

2024-05-01 Thread Slavko via Exim-users
Dňa 1. mája 2024 16:52:04 UTC používateľ halbtaxabo-jnq--- via Exim-users 
 napísal:

>DKIM_DOMAIN = ${lookup{$domain:$h_from:}lsearch{/etc/exim4/dkim/domainslist}}

lsearch lookup key in fike and returns its value, thus it expects:

   key: value

The value can be empty, i guess that your file has only keys:

key1
key2

In this case lsearch returns ťhat empty value and you need to instruct
it to return key itself:

... lsearch,ret=key{...}

Now it will return key if found in file or empty string otherwise.

regards


-- 
Slavko
https://www.slavino.sk/

-- 
## 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: Question about Exim macro language

2024-05-01 Thread halbtaxabo-jnq--- via Exim-users
 

On Wednesday, 1 May 2024 at 21:23:45 WEST, Slavko via Exim-users 
 wrote:  
 
 Dňa 1. mája 2024 16:52:04 UTC používateľ halbtaxabo-jnq--- via Exim-users 
 napísal:

>DKIM_DOMAIN = ${lookup{$domain:$h_from:}lsearch{/etc/exim4/dkim/domainslist}}

lsearch lookup key in fike and returns its value, thus it expects:

  key: value

The value can be empty, i guess that your file has only keys:

    key1
    key2

In this case lsearch returns ťhat empty value and you need to instruct
it to return key itself:

    ... lsearch,ret=key{...}

Now it will return key if found in file or empty string otherwise.

regards


-- 
Slavko
https://www.slavino.sk/
You probably found one error but it still doesn't work.I corrected the line 
to:DKIM_DOMAIN = 
${lookup{$domain:$h_from:}lsearch,ret=key{/etc/exim4/dkim/domainslist}}Stopped 
exim, updated the configuration, started exim,and then sent an email from one 
of the domains.Again, stat revealed that /etc/exim4/dkim/domainslisthad not 
even been accessed so this can't possibly have worked.And of course no dkim in 
the email.
--
  

-- 
## 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: Question about Exim macro language

2024-05-01 Thread Jeremy Harris via Exim-users

On 01/05/2024 17:52, halbtaxabo-jnq--- via Exim-users wrote:

DKIM_DOMAIN = ${lookup{$domain:$h_from:}lsearch{/etc/exim4/dkim/domainslist}}

This doesn't work.


Without knowing where you have used this macro, no: we can't tell you
what you've done wrong.

The canonical documentation for Exim is at exim.org.   You probably are using
a Debian-derived configuration, and might get more specific information
about it from a Debian-specific resource.
--
Cheers,
  Jeremy


--
## 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] [postmas...@hazenmanagement.ca: Undeliverable: Cleandry]

2024-05-01 Thread The Doctor via Exim-users
What is external forwarding?

Sound like something scary.

- Forwarded message from postmas...@hazenmanagement.ca -

Date: Wed, 1 May 2024 21:30:08 +
From: postmas...@hazenmanagement.ca
To: r...@doctor.nl2k.ab.ca
Subject: Undeliverable: Cleandry
Subject: {SPAM?}  Undeliverable: Cleandry

Your email couldn't be forwarded from i...@thetrustedtrades.ca to another email 
address.

i...@thetrustedtrades.ca
Your message wasn't delivered because the recipient's email provider rejected 
it.








Diagnostic information for administrators:

Generating server: YQBPR0101MB9696.CANPRD01.PROD.OUTLOOK.COM

i...@thetrustedtrades.ca
Remote server returned '550 5.7.520 Access denied, Your organization does not 
allow external forwarding. Please contact your administrator for further 
assistance. AS(7555)'

Original message headers:

Resent-From: 
Received: from YT1PR01CA0047.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::16)
 by YQBPR0101MB9696.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:6f::14) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36; Wed, 1 May
 2024 21:28:02 +
Received: from YT1PEPF1E8D.CANPRD01.PROD.OUTLOOK.COM
 (2603:10b6:b01:2e:cafe::1f) by YT1PR01CA0047.outlook.office365.com
 (2603:10b6:b01:2e::16) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28 via Frontend
 Transport; Wed, 1 May 2024 21:28:02 +
Authentication-Results: spf=pass (sender IP is 204.209.81.1)
 smtp.mailfrom=doctor.nl2k.ab.ca; dkim=none (message not signed)
 header.d=none;dmarc=pass action=none header.from=doctor.nl2k.ab.ca;
Received-SPF: Pass (protection.outlook.com: domain of doctor.nl2k.ab.ca
 designates 204.209.81.1 as permitted sender) receiver=protection.outlook.com;
 client-ip=204.209.81.1; helo=doctor.nl2k.ab.ca; pr=C
Received: from doctor.nl2k.ab.ca (204.209.81.1) by
 YT1PEPF1E8D.mail.protection.outlook.com (10.167.241.54) with Microsoft
 SMTP Server id 15.20.7544.18 via Frontend Transport; Wed, 1 May 2024 21:28:02
 +
Received: from root by doctor.nl2k.ab.ca with local (Exim 4.97.1 (FreeBSD))
(envelope-from )
id 1s2HTv-OjN-3eVa
for i...@thetrustedtrades.ca;
Wed, 01 May 2024 15:27:15 -0600
Date: Wed, 1 May 2024 15:27:15 -0600
From: "Dave Shariff Yadallee -  System Administrator a.k.a. The Root of the 
Problem" 
To: i...@thetrustedtrades.ca
Subject: Cleandry
Message-ID: 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Return-Path: r...@doctor.nl2k.ab.ca
X-EOPAttributedMessage: 0
X-EOPTenantAttributedMessage: 62285e94-069f-4d13-88a4-9c87040fc35e:0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: YT1PEPF1E8D:EE_|YQBPR0101MB9696:EE_
X-MS-Office365-Filtering-Correlation-Id: b0ff5b33-35c6-4d61-7ba1-08dc6a2594ed
X-LD-Processed: 62285e94-069f-4d13-88a4-9c87040fc35e,ExtFwd
X-MS-Exchange-AtpMessageProperties: SA
X-MS-Exchange-SenderADCheck: 0
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|61400799018|48200799009;
X-Microsoft-Antispam-Message-Info:

=?us-ascii?Q?aCOqPIgjFAM6S9nP3GPHzJB2vvnVi3UdyhbpO1GB2NVjghkNGdqTsnhg2suv?=
 =?us-ascii?Q?e7TfuDG7iM8e65DyhQchyUz2y1975Qr0/M3hHYgwBebmdxB87rntk+FLwMVu?=
 =?us-ascii?Q?qlB8bXfav42YIzcii2Wx+0slR9JnzImB/jMcwUkU1ImosplqIHJQGP76tT+L?=
 =?us-ascii?Q?UOedTXqpTtwnpJsOpnSlnLPrCrYrBjzW7VnkJ4kXPamUlvFF2cxvBuTt4lgj?=
 =?us-ascii?Q?cV3cfKNtdBoILRKc7e7dMKKJvFJpn1/R/ajYAuaQz6cMdedFukM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=?us-ascii?Q?+hEjHhF8yCWStnCr3YXGgCDEYovUgk/W+fgd3TZW4Xkx89XZTjq22fLDT0Ee?=
 =?us-ascii?Q?6uquwpo/wdJTN3ngaobHTSO1qrh3ityTgz08i5wRL+0XVLR8qGbpXcOQNlFz?=
 =?us-ascii?Q?LmJ5lYZMxkEP1XZsqvcOZZ/BXm490bNSVvV6mHIqCz7BE4/oSR6wvjgIk8LV?=
 =?us-ascii?Q?DtZ7vHDrnDcYbeGAFNp/9HGx?=
X-Forefront-Antispam-Report:

CIP:204.209.81.1;CTRY:CA;LANG:en;SCL:1;SRV:;IPV:NL

[exim] Re: [postmas...@hazenmanagement.ca: Undeliverable: Cleandry]

2024-05-01 Thread Jeremy Harris via Exim-users

On 01/05/2024 22:42, The Doctor via Exim-users wrote:

What is external forwarding?

Sound like something scary.


My *guess* is:

You mailed person A.  A has their mails configured, at the MX for A,
to be forwarded to B.  You don't have control over that configuration;
it is entirely A's choice.  He wanted it to be done.

But you have configured your system, probably in "SPF" terms, you
say "any messages claiming to be from me *must* be be sent by *my* system.
Any messages being sent by any other system are invalid, and should be 
rejected."

The message is being sent onwards by A's MX to B's MX.  it is being sent by
A's MX, as far as B's MX is concerned.

B's MX implements SPF, and does what you claim you wanted.  It rejects the
message, since the message did not arrive at that host directly from your MX.



And thus, a traditional and useful feature of email handling has been broken.
--
Cheers,
  Jeremy


--
## 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: [postmas...@hazenmanagement.ca: Undeliverable: Cleandry]

2024-05-01 Thread Thomas Krichel via Exim-users
  Jeremy Harris via Exim-users writes

> You mailed person A.  A has their mails configured, at the MX for A,
> to be forwarded to B.  You don't have control over that configuration;
> it is entirely A's choice.  He wanted it to be done.
> 
> But you have configured your system, probably in "SPF" terms, you
> say "any messages claiming to be from me *must* be be sent by *my* system.
> Any messages being sent by any other system are invalid, and should be 
> rejected."
> 
> The message is being sent onwards by A's MX to B's MX.  it is being sent by
> A's MX, as far as B's MX is concerned.
> 
> B's MX implements SPF, and does what you claim you wanted.  It rejects the
> message, since the message did not arrive at that host directly from your MX.
> 
> 
> 
> And thus, a traditional and useful feature of email handling has been broken.

  You are touching on something I always wanted to know about but was
  to shy to ask. I run the mailbox re...@repec.org on my server. This
  is an email address that has been around for donkey's years and thus
  gets a lot of spam. I don't have an imap server for the readers of
  this email so I forward it to their external addresses. I understand
  that this breaks the SPF from the sending domain, and puts my server
  at the risk of being noted as an SPF breaker.

  I have been wondering if there an exim filter or configuration
  snippet that could, say for a set email-to address re...@repec.org,
  first spam filter, if not spam, take the from: field, make this the
  reply-to, replace the original from field with say
  forw...@repec.org and then remail to a couple of addresses.


-- 
  Written by Thomas Krichel http://openlib.org/home/krichel on his 21516th day.

-- 
## 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: [postmas...@hazenmanagement.ca: Undeliverable: Cleandry]

2024-05-01 Thread Thomas Krichel via Exim-users
  Jeremy Harris via Exim-users writes

> And thus, a traditional and useful feature of email handling has been broken.

  What is useful can be abused.

  I run email newsletters for donkey's years. I have subscribers who
  leave institution A and set a forward to their account at institution
  B. They ought to signoff from the A account and sign on with the B
  account. But they are lazy. 

  Later, one leaves institution B and the email to B bounces. Forward
  at A still works. Sod's law has institution B runs some Microsoft
  crap. I get a delivery failure without any indication of the
  forwarder's address. I can't figure out who the original subscriber
  is. Unless, I remove a random subscriber every mail and wait until
  one email to the list is no longer bouncing from B. Or I send off
  the email very slowly and check the logs. With 6000 subscribers,
  either approach seems a masochist's idea of fun. 

-- 
  Written by Thomas Krichel http://openlib.org/home/krichel on his 21517th day.

-- 
## 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: [postmas...@hazenmanagement.ca: Undeliverable: Cleandry]

2024-05-01 Thread Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem via Exim-users
On Wed, May 01, 2024 at 11:46:53PM +0100, Jeremy Harris via Exim-users wrote:
> On 01/05/2024 22:42, The Doctor via Exim-users wrote:
> > What is external forwarding?
> > 
> > Sound like something scary.
> 
> My *guess* is:
> 
> You mailed person A.  A has their mails configured, at the MX for A,
> to be forwarded to B.  You don't have control over that configuration;
> it is entirely A's choice.  He wanted it to be done.
> 
> But you have configured your system, probably in "SPF" terms, you
> say "any messages claiming to be from me *must* be be sent by *my* system.
> Any messages being sent by any other system are invalid, and should be 
> rejected."
> 
> The message is being sent onwards by A's MX to B's MX.  it is being sent by
> A's MX, as far as B's MX is concerned.
> 
> B's MX implements SPF, and does what you claim you wanted.  It rejects the
> message, since the message did not arrive at that host directly from your MX.
> 
> 
> 
> And thus, a traditional and useful feature of email handling has been broken.


Now that is totally assinine!

> -- 
> Cheers,
>   Jeremy
> 
> 
> -- 
> ## 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/

-- 
For effective Internet Etiquette and communications read 
http://catb.org/jargon/html/T/top-post.html, http://idallen.com/topposting.html
& http://www.caliburn.nl/topposting.html

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