Hello,

On Thu, Feb 23, 2012, at 11:06 AM, rg86...@airpost.net wrote:
> > The various smtpd_*_restrictions only work with mail submitted via SMTP.

Even though I still don't understand why the sendmail session I
described isn't "mail submitted via SMTP", I tried a different method of
testing.  Using telnet.

Following this,

        Using Telnet to send mail by SMTP
        http://arnab.org/notes/using-telnet-to-send-mail-by-smtp
                "... So now we can send email using SMTP, (and recieve
                using POP) all without the use of a mail client or a web
                browser."

With Postfix still configured at the reinjection listener with,

        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
        postmap /etc/postfix/spamtrap

I initiate the telnet session from my desktop to the server,

        telnet 192.168.1.10 25
                Trying 192.168.1.10...
                Connected to 192.168.1.10.
                Escape character is '^]'.
                220 mail.rogermail.lan ESMTP
        EHLO desk.rogermail.lan
                250-mail.rogermail.lan
                250-PIPELINING
                250-SIZE 20480000
                250-ETRN
                250-STARTTLS
                250-ENHANCEDSTATUSCODES
                250-8BITMIME
                250 DSN
        MAIL FROM:<ro...@desk.rogermail.lan>
                250 2.1.0 Ok
        RCPT TO:<ro...@mail.rogermail.lan>
                250 2.1.5 Ok
        RCPT TO:<s...@mail.rogermail.lan>
                550 5.1.1 <s...@mail.rogermail.lan>: Recipient address
                rejected: User unknown in virtual mailbox table

IIUC, that's a legitimate SMTP session, and that's "mail submitted via
SMTP", no?

Still, no hash-table smaptrap check & detection.

Logs for this session are,

        tail -f /var/log/mail ==>
                Feb 23 11:16:03 mx postfix/postscreen[19761]: CONNECT
                from [192.168.1.10]:53348
                Feb 23 11:16:03 mx postfix/postscreen[19761]: PASS OLD
                [192.168.1.10]:53348
                Feb 23 11:16:03 mx postfix/smtpd[19684]: connect from
                mail.rogermail.lan[192.168.1.10]
                Feb 23 11:16:14 mx postfix/smtpd[19684]: NOQUEUE:
                client=mail.rogermail.lan[192.168.1.10]
                Feb 23 11:16:22 mx postfix/smtpd[19684]: NOQUEUE:
                reject: RCPT from mail.rogermail.lan[192.168.1.10]: 550
                5.1.1 <s...@mail.rogermail.lan>: Recipient address
                rejected: User unknown in virtual mailbox table;
                from=<ro...@desk.rogermail.lan>
                to=<s...@mail.rogermail.lan> proto=ESMTP
                helo=<desk.rogermail.lan>

Cheers,

Roger

Reply via email to