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
                s...@mail.rogermail.lan        DISCARD
        postmap /etc/postfix/spamtrap

Test-sending from desktop to server,

        sendmail -i -t
                From: ro...@desk.rogermail.lan
                To: ro...@mail.rogermail.lan,s...@mail.rogermail.lan
                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]: <s...@mail.rogermail.lan>: Recipient
address triggers DISCARD action; from=<ro...@desk.rogermail.lan>
to=<s...@mail.rogermail.lan> proto=ESMTP helo=<mail.rogermail.lan>
        Feb 23 17:15:23 mail spampd[32019]: processing message
        <20120224011527.695a540...@desk.rogermail.lan> for
        <ro...@mail.rogermail.lan>
        ORCPT=rfc822;ro...@mail.rogermail.lan,<s...@mail.rogermail.lan>
        ORCPT=rfc822;s...@mail.rogermail.lan
        Feb 23 17:15:25 mail spampd[32019]: clean message
        <20120224011527.695a540...@desk.rogermail.lan> (0.00/4.00) from
        <ro...@desk.rogermail.lan> for <ro...@mail.rogermail.lan>
        ORCPT=rfc822;ro...@mail.rogermail.lan,<s...@mail.rogermail.lan>
        ORCPT=rfc822;s...@mail.rogermail.lan 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=<ro...@desk.rogermail.lan> to=<ro...@mail.rogermail.lan>
        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 -->
<s...@mail.rogermail.lan>: 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