On 2023-06-15 11:12, [email protected] wrote:
Hi,
some questions:
Which MIMEDefang version are you using ?
could you provide a maillog with related MIMEDefang errors ?
Thanks
Giovanni
Hi Giovanni,
Thanks for your reply.
To try and figure out why I wasn't having success, I spun up a VM with
OpenBSD 7.3 and applied all syspatches up to today (Thurs June 22).
The MIMEDefang version I am using is what gets installed along with the:
filter-mimedefang-0.1 package (see below).
I have a minimal: smtpd.conf config to test the filter:
/etc/mail/smtpd.conf
pki server.home.arpa cert "/etc/ssl/server.home.arpa.crt"
pki server.home.arpa key "/etc/ssl/private/server.home.arpa.key"
table aliases file:/etc/mail/aliases
filter check_mime proc-exec "filter-mimedefang.pl -d" \
user _mdefang group _mdefang
listen on socket filter check_mime
listen on lo0 filter check_mime
action "local_mail" maildir "/home/developer/mail" alias <aliases>
match from any for local action "local_mail"
I then installed the filter:
$ doas pkg_add filter-mimedefang-0.1
... and then attempted to start the two rc scripts:
$ doas rcctl start mimedefang_multiplexor
$ doas rcctl start mimedefang
... but then I see the following in: /var/log/maillog
Jun 22 19:12:31 server mimedefang[97511]: MIMEDefang alive.
workersReservedForLoopback=-1 AllowNewConnectionsToQueue=1
doRelayCheck=1 doHeloCheck=0 doSenderCheck=0 doRecipientCheck=0
Jun 22 19:12:31 server mimedefang[97511]: Multiplexor alive - entering
main loop
Jun 22 19:12:34 server mimedefang-multiplexor[48548]: Starting worker 0
(pid 46278) (1 running): Bringing workers up to minWorkers (2)
Jun 22 19:12:34 server mimedefang-multiplexor[48548]: Worker 0 stderr:
Undefined subroutine &main::do_main_loop called at /usr/local/b
Jun 22 19:12:34 server mimedefang-multiplexor[48548]: Worker 0 stderr:
in/mimedefang.pl line 36.
Jun 22 19:12:34 server mimedefang-multiplexor[48548]: Reap: worker 0
(pid 46278) exited normally with status 9 (WORKER DIED UNEXPECTEDLY)
Jun 22 19:12:34 server mimedefang-multiplexor[48548]: Worker 0 resource
usage: req=0, scans=0, user=0.000, sys=0.010, nswap=0, majflt=0,
minflt=311, maxrss=4304, bi=0, bo=0
Jun 22 19:12:37 server mimedefang-multiplexor[48548]: Starting worker 0
(pid 7077) (1 running): Bringing workers up to minWorkers (2)
Jun 22 19:12:37 server mimedefang-multiplexor[48548]: Worker 0 stderr:
Undefined subroutine &main::do_main_loop called at /usr/local/b
Jun 22 19:12:37 server mimedefang-multiplexor[48548]: Worker 0 stderr:
in/mimedefang.pl line 36.
Jun 22 19:12:37 server mimedefang-multiplexor[48548]: Reap: worker 0
(pid 7077) exited normally with status 9 (WORKER DIED UNEXPECTEDLY)
Jun 22 19:12:37 server mimedefang-multiplexor[48548]: Worker 0 resource
usage: req=0, scans=0, user=0.000, sys=0.000, nswap=0, majflt=0,
minflt=306, maxrss=4252, bi=0, bo=0
...so based on what I am seeing there, I believe MIMEDefang comes up and
is happy, because it sees that: mimedefang-multiplexor is running, but
the multiplexor process periodically repeats the: WORKER DIED
UNEXPECTEDLY output at regular intervals.
If I test this via telnet:
$ telnet 127.0.0.1 25
ehlo example.com
mail from: <[email protected]>
rcpt to: <[email protected]>
data
To: Developer <[email protected]>
From: Root <[email protected]>
Subject: Test message with no attachment
This is a test message
.
... I get a "550 Nope" response from OpenSMTPD:
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
report|0.6|1687476356.867090|smtp-in|protocol-client|36d8435651e33086|.
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
filter|0.6|1687476356.867356|smtp-in|commit|36d8435651e33086|f5932f6f4f50179a|
Jun 22 19:25:56 server smtpd[10842]: check_mime: Unknown return from
filter 'smtp-in'|'commit': at
/usr/local/libexec/smtpd/filter-mimedefang.pl line 128.
Jun 22 19:25:56 server smtpd[10842]: check_mime: >
filter-result|36d8435651e33086|f5932f6f4f50179a|reject|550 Nope
Jun 22 19:25:56 server smtpd[85608]: 36d8435651e33086 smtp
failed-command command="data" result="550 Nope"
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
report|0.6|1687476356.868024|smtp-in|filter-response|36d8435651e33086|commit|reject|550
Nope
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
report|0.6|1687476356.868028|smtp-in|protocol-server|36d8435651e33086|550
Nope
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
report|0.6|1687476356.868029|smtp-in|tx-data|36d8435651e33086|0776c9b2|permfail
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
report|0.6|1687476356.868124|smtp-in|tx-rollback|36d8435651e33086|0776c9b2
Jun 22 19:25:56 server smtpd[10842]: check_mime: <
report|0.6|1687476356.868125|smtp-in|tx-reset|36d8435651e33086|0776c9b2
...this is different from the temporary error I got in my initial e-mail
to the OpenSMTPD list, but that's because I realized I hadn't started:
mimedefang_multiplexor and mimedefang.
Is there enough information in the output I've shown to figure out why
this is happening ?
Thanks for all your help,
- J