Success.

Changes required were exactly what Noel suggested, getting the mail past
the pre-queue filter.

In informed hindsight, simple to implement.

In main.cf

-       virtual_mailbox_maps =
proxy:mysql:/etc/postfix/sql/vmailboxes.cf
+       virtual_mailbox_maps =
proxy:mysql:/etc/postfix/sql/vmailboxes.cf
+                          hash:/etc/postfix/spamtrap

In master.cf, at the *localhost* -- NOT external-address -- reinjection
listener,

        127.0.0.1:10026      inet  n       -       n       -       -    
          smtpd
         ...
         -o
         
smtpd_sender_restrictions=check_recipient_access,hash:/etc/postfix/spamtrap
         ...

and,

        cat /etc/postfix/spamtrap
                [email protected]        DISCARD
        postmap /etc/postfix/spamtrap

Test-sending from desktop to server,

        sendmail -i -t
                From: [email protected]
                To: [email protected],[email protected]
                Subject: test
                testing

@ server logs,

        Feb 23 17:15:23 mail postfix/postscreen[28255]: CONNECT from
        [192.168.1.13]:45288
        Feb 23 17:15:23 mail postfix/postscreen[28255]: PASS OLD
        [192.168.1.13]:45288
        Feb 23 17:15:23 mail postfix/smtpd[28284]: connect from
        desk.rogermail.lan[192.168.1.13]
        Feb 23 17:15:23 mail postfix/smtpd[28284]: NOQUEUE:
        client=desk.rogermail.lan[192.168.1.13]
        Feb 23 17:15:23 mail postfix/smtpd[28285]: connect from
        localhost[127.0.0.1]
        Feb 23 17:15:23 mail postfix/smtpd[28285]: 7766720337:
        client=localhost[127.0.0.1],
        orig_client=desk.rogermail.lan[192.168.1.13]
!!      Feb 23 17:15:23 mail postfix/smtpd[28285]: 7766720337: discard:
RCPT from localhost[127.0.0.1]: <[email protected]>: Recipient
address triggers DISCARD action; from=<[email protected]>
to=<[email protected]> proto=ESMTP helo=<mail.rogermail.lan>
        Feb 23 17:15:23 mail spampd[32019]: processing message
        <[email protected]> for
        <[email protected]>
        ORCPT=rfc822;[email protected],<[email protected]>
        ORCPT=rfc822;[email protected]
        Feb 23 17:15:25 mail spampd[32019]: clean message
        <[email protected]> (0.00/4.00) from
        <[email protected]> for <[email protected]>
        ORCPT=rfc822;[email protected],<[email protected]>
        ORCPT=rfc822;[email protected] in 1.55s, 566 bytes.
        Feb 23 17:15:25 mail postfix/smtpd[28284]: proxy-accept:
        END-OF-MESSAGE: 250 2.0.0 Ok: queued as 7766720337;
        from=<[email protected]> to=<[email protected]>
        proto=ESMTP helo=<desk.rogermail.lan>
        Feb 23 17:15:25 mail postfix/smtpd[28284]: disconnect from
        desk.rogermail.lan[192.168.1.13]
        Feb 23 17:15:25 mail postfix/smtpd[28285]: disconnect from
        localhost[127.0.0.1]

I note the DISCARD action is now triggered -->
<[email protected]>: Recipient address triggers DISCARD action;

Although I don't specifically see a second DISCARD for the 2nd, 'valid'
recipient address, it's never delivered.  I'm guessing that that DISCARD
does effectively prevent subsequent delivery/processing of the *message*
for any/all of the recipients.  I'd like to prove affirmatively to
myself that that's the case, rather than simply make an assumption based
on lack of delivery.  Perhaps more verbose logging and/or an additional
bit of reading will help there.

Again, Noel, Rob & Stan -- Thanks.

Cheers,

Roger

Reply via email to