Hi,

On Fri, 5 Dec 2025, Viktor Dukhovni via Postfix-users wrote:

Date: Fri, 5 Dec 2025 10:42:10 +1100
From: Viktor Dukhovni via Postfix-users <[email protected]>
To: [email protected]
Subject: [pfx] Re: Postfix with mysql dspam and procmail

On Thu, Dec 04, 2025 at 05:44:57PM -0500, Al via Postfix-users wrote:


smtp      inet  n       -       n       -       -       smtpd
        -o content_filter=lmtp:unix:/var/run/dspam/dspam.sock

Note, the input to "dspam" is LMTP, not SMTP.

After some testing I found it does want to LMTP to pass it to Dspam.

localhost:10026 inet  n -       n       -       -        smtpd
  -o content_filter=
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
  -o smtpd_helo_restrictions=
  -o smtpd_client_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8
  -o smtpd_authorized_xforward_hosts=127.0.0.0/8

The backend reinjection service is an SMTP listener.

  /etc/dspam.conf
  Home /var/db/dspam
StorageDriver /usr/local/lib/dspam/libmysql_drv.so
DeliveryHost            127.0.0.1
DeliveryPort            10026
DeliveryIdent           localhost
DeliveryProto           LMTP

You're configuring "dspam", to speak LMTP to the backend.  That's not
going to work.


This was wrong and I did changed it to SMTP in dspam.conf.


Email is being sent to dspam, but I don't think it is sending the user uid.

Can't help you with "uid"s, unclear why that'd either be known to
Postfix or useful.  Only the Postfix local(8) and virtual(8) and
delivery agents deal with "uid"s, in every other context Postfix
deals with email addresses, which are resolved to "uids" only when
running as a user to deliver to user-owned files.

Dec  4 17:12:51 mail dspam[85005]: Invalid data waiting for code 500: 500
5.5.2 Error: command not recognized
Dec  4 17:17:51 mail dspam[85005]: Received error in response to LHLO: 500
5.5.2 Error: command not recognized

See misuse of LMTP above.

Dec  4 17:17:51 mail dspam[85005]: query error: Column 'uid' cannot be null:
see sql.errors for more details

That's a dspam internal issue, not related to Postfix.

Changing from "ChangeUserOnParse" on to "ChangeUserOnParse full" fixed the issue. And you were right, this was 100% a miss configuration of Dspam.

Kind Regards,
Al

_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to