On Wed, Nov 04, 2020 at 12:14:14PM -0500, Alex wrote:

> I'd like to try and do this without using content_filter but I'm
> having a problem.

When doing that, you need to make sure that all the address classes in
the pre-filter instance route into the filter.  In particular, if you
have a non-empty "mydestination", you need to override local_transport
to deliver mail via smtp into the filter, and a similar override for
virtual_transport if you have virtual_mailbox_domains...

> 
> Mail appears to be completely ignoring the amavisd proxy despite
> configuring default_transport to use 10025.

The default_transport is a last-resort, it is preƫmpted both by the
transport table, and the addres-class-specific transports.  It handles
"other people's domains".  Mail for your own domains (local, virtual
mailbox, relay, ...) uses local_transport, virtual_transport or
relay_transport.  And all those are secondary to any transport(5)
table you have configured.


> # postmulti -l
> -               -               y         /etc/postfix
> postfix-out     mta             y         /etc/postfix-out
> postfix-114     mta             y         /etc/postfix-114
> postfix-117     mta             y         /etc/postfix-117

Looks OK so far.

> postfix-114
> default_transport = smtp:[127.0.0.1]:10025
> relay_transport = $default_transport
> virtual_transport = $default_transport
>
> postfix-117
> default_transport = smtp:[127.0.0.1]:10025
> relay_transport = $default_transport
> virtual_transport = $default_transport

Is "local_transport" relevant?  Do you have a transport table?

> In postfix-out:
> # Replace default "smtp inet" entry with one listening on port 10026.
> 127.0.0.1:10026     inet  n       -       n       -       -       smtpd

OK.

> I've experimented with transport_maps like this:
> mycompany.org                      smtp-amavis:[127.0.0.1]:10025

That should override any other transport settings for the domain
in question.

> smtp-amavis unix    -       -       n       -       -   smtp
>     -o smtp_data_done_timeout=1200
>     -o smtp_send_xforward_command=yes
> 
> but mail just sits in the queue:
> 
> # mailq -C /etc/postfix-117
> -Queue ID-  --Size-- ----Arrival Time---- -Sender/Recipient-------
> D9DE7200B23F3    2516 Tue Nov  3 20:34:30  mysqlstud...@gmail.com
> (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial
> server greeting)
>                                          a...@mycompany.org

The downstream amavis or Postfix is not configured correctly and is
dropping connections.   The reason is in your logs.

-- 
    Viktor.

Reply via email to