On 1/19/2026 1:55 PM, Jan Eden wrote:
On 2026-01-19 13:28, Reio Remma wrote:

On 1/19/2026 1:19 PM, Jan Eden wrote:
On 2026-01-19 09:30, BetaRays wrote:
On Mon, Jan 19, 2026 at 08:00:32AM +0100, Jan Eden wrote:
This should have resulted in a similar error message as before, since
the expansion of the list address (testing) does not exist as a local
user.  Instead, I get this error message:

--------------------------------------------------
msmtp: recipient address [email protected] not accepted by the server
msmtp: server message: 524 5.2.4 Mailing list expansion problem: 
<[email protected]>
--------------------------------------------------

This does not make any sense to me – how does OpenSMTPD know that
[email protected] is a mailing list?

- Jan
“Mailing list expansion problem” is a generic error message when an
address fails to match in a “virtual” I think.
I’ve had this error message without working with mailing lists.
  From what I can remember, my issue was that my virtual alias table
had mappings from, e.g. [email protected] to [email protected]
but OpenSMTPD also needs a final mapping from [email protected] to
a local user (which, in my case, is used for lmtp delivery, while
using the last matched address as rcpt-to).

Maybe enabling tracing and debug logs with smtpctl could help you
understand your issue.
Thanks for the suggestion, I found a solution. By adding a
mlmmj-receive command to the forwards table –

--------------------------------------------------
# /usr/local/etc/mail/forwards
testing "|/usr/local/bin/mlmmj-receive -L /var/spool/mlmmj/testing/"
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
--------------------------------------------------

– I can leave the rest of my configuration unchanged:

--------------------------------------------------
action "expand_forwards" expand-only virtual <forwards>
action "local_mail" lmtp "/var/run/dovecot/lmtp" rcpt-to virtual <virtuals>
action "outbound" relay srs helo mail.example.com

match from any for rcpt-to <forwards> action "expand_forwards"
match from any for rcpt-to <virtuals> action "local_mail"
match for local action "local_mail"

match from any auth for any action "outbound"
match for any action "outbound"
--------------------------------------------------

Although this works well, I still wonder whether it is possible to use a
"mda" action and a separate match directive for the mailing lists. My
previous configuration should have worked (at least in theory), but I
must have missed something.
Hello!

I see I have this for mlmmj in my config:

action deliver_mlmmj   mda "/usr/bin/mlmmj-receive -L
/var/vmail/mlmmj/%{rcpt.domain}/%{rcpt.user}/" virtual
<mlmmj_virtuals>userbase <mlmmj_userinfo>
match from any for domain <domains> rcpt-to <mlmmj_recipients> action
deliver_mlmmj

Hi Reio,

could you quote (anonymized) lines from the three tables referenced in
your config, so I understand how they work together? I was under the
impression I could just use one table to link the list name to the
%{dest.user} variable. My lists will not use different domains, so I
will probably not need the domain variable.

Unfortunately I'm no further help here, because I've a setup with virtual users stored in a database. Maybe you can just skip the virtual/userbase part of the action.


Reply via email to