I'm testing advanced email filtering using a pass-through script to copy
email without actually changing the contents, but without success. The
email stays stuck in the queue. I am using a pipe that should respond
to port 10025. It does respond to telnet:
Telnet response from 10025:
$ telnet 127.0.0.1 10025
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
status0
Telnet response from 10026:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 mail.privacy-computer.com ESMTP
Here are my configurations:
1 copy.sh
2 =======
3 #!/bin/bash
4 socat STDIO TCP4:127.0.0.1:10026
5
6 main.cf
7 =======
8 content_filter=myfilter:[127.0.0.1]:10025
9 myfilter_recipient_limit=1
10 receive_override_options = no_address_mappings
11
12 master.cf
13 =========
14 myfilter unix - - n - 10 smtp
15 -o smtp_send_xforward_command=yes
16 -o syslog_name=postfix-unfiltered
17 -o disable_mime_output_conversion=yes
18 -o smtp_generic_maps=
19
20 localhost:10025 inet n n n - - pipe
21 flags=Rq user=myfilter argv=/var/lib/myfilter/copy.sh -e -k
jo...@mydomain.com jo...@mydomain.com
22
23 localhost:10026 inet n - n - 10 smtpd
24 -o content_filter=
25 -o
receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
26 -o smtpd_helo_restrictions=
27 -o smtpd_client_restrictions=
28 -o smtpd_sender_restrictions=
29 # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
30 -o smtpd_relay_restrictions=
31 -o smtpd_recipient_restrictions=permit_mynetworks,reject
32 -o mynetworks=127.0.0.0/8,[::1]
33 -o smtpd_authorized_xforward_hosts=127.0.0.0/8
34 -o syslog_name=postfix-after-filter
35
Regards,
David Koski