XFORWARD with UNIX socket content filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XFORWARD with UNIX socket content filter

Thomas Leuxner
I recently integrated DSPAM into my setup. This introduced a change from SMTP-based inet relaying to LMTP delivery using UNIX sockets.

Old:
scan      unix  -       -       n       -       16      smtp
  -o smtp_bind_address=127.0.0.1
  -o smtp_send_xforward_command=yes
  -o disable_dns_lookups=yes

New:
smtpd     pass  -       -       -       -       -       smtpd
  -o receive_override_options=no_address_mappings
  -o content_filter=lmtp:unix:public/dspam-lmtp


Re-Injection:
127.0.0.1:10026 inet  n -       n       -       16      smtpd
  -o content_filter=
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
  -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

While everything works fine, I was unable to emulate xforward like I used to. I tried adding it to the LMTP context in master.cf to no avail. While it is not vital for my setup, I'd like to use it for log parsing if possible:

Old log:

Jan 24 20:09:08 nihlus postfix/smtpd[577]: connect from localhost[127.0.0.1]
Jan 24 20:09:08 nihlus postfix/smtpd[577]: 3kV6MS40HNz1t: client=localhost[127.0.0.1], orig_queue_id=3kV6MS2yQmz12, orig_client=quantz.debian.org[2001:41c8:1000:21::21:28]
Jan 24 20:09:08 nihlus postfix/cleanup[574]: 3kV6MS40HNz1t: resent-message-id=<[hidden email]>
Jan 24 20:09:08 nihlus postfix/cleanup[574]: 3kV6MS40HNz1t: message-id=<6494676.i71Gpuo4It@pc00>

New log:
Jan 28 10:36:11 nihlus postfix/smtpd[7925]: connect from localhost[127.0.0.1]
Jan 28 10:36:11 nihlus postfix/smtpd[7925]: 3kXKSW6qCKz21: client=localhost[127.0.0.1]
Jan 28 10:36:12 nihlus postfix/cleanup[7921]: 3kXKSW6qCKz21: message-id=<[hidden email]>
Jan 28 10:36:12 nihlus postfix/qmgr[3746]: 3kXKSW6qCKz21: from=<[hidden email]>, size=9811, nrcpt=1 (queue active)
Jan 28 10:36:12 nihlus postfix/smtpd[7925]: disconnect from localhost[127.0.0.1]
Jan 28 10:36:12 nihlus postfix/lmtp[7922]: 3kXKSW4p0Rz1x: to=<[hidden email]>, relay=spectre.leuxner.net[public/dspam-lmtp], delay=1.5, delays=1.2/0.01/0/0.29, dsn=2.6.0, status=sent (250 2.6.0 <securi
[hidden email]> Message accepted for delivery)

Is there a way to log 'orig_client' like I used to?

Regards
Thomas

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: XFORWARD with UNIX socket content filter

Wietse Venema
Thomas Leuxner:
> While everything works fine, I was unable to emulate xforward like I used to.

Does the SMTP server announce XFORWARD in the EHLO response?
Does the client send XFORWARD?

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: XFORWARD with UNIX socket content filter

Thomas Leuxner
* Wietse Venema <[hidden email]> 2015.01.28 13:20:

>
> Wietse

Oops. Valid point. Just found out that this doesn't seem to be implemented:

$ socat - UNIX-CONNECT:/var/spool/postfix/public/dspam-lmtp
220 DSPAM LMTP 3.10.1 Ready
lhlo localhost
250-localhost.localdomain
250-PIPELINING
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 SIZE
XFORWARD HELO=spike.porcupine.org
503 5.0.0 Need MAIL FROM here.

Thanks for pointing me in that direction.

signature.asc (205 bytes) Download Attachment