On Thu, Feb 23, 2012 at 11:31:53AM -0800, rg86...@airpost.net wrote:
> On Thu, Feb 23, 2012, at 11:06 AM, rg86...@airpost.net wrote:
Noel:
> > > 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",

sendmail(1) writes mail to a file which is enqueued by the pickup(8) 
daemon. smtpd(8) is not used. smtpd-specific settings such as 
smtpd_sender_restrictions are irrelevant in this mode of submission.

> 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

The SMTP protocol is documented in RFC 5321 and predecessors.

> With Postfix still configured at the reinjection listener with,

Why do you have this on reinjection? It will be rejected as an 
unknown user before reinjection can occur.

>       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

This should have caused an error, because a hash: map format is "key 
whitespace value":

s...@mail.rogermail.lan         DISCARD

Here's another thought, which I think someone else mentioned 
upthread: you could PREPEND a special header, then handle that in 
your content filter.

s...@mail.rogermail.lan         PREPEND X-spamtrap-garbage: YES

> 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?

But it does not get to the content filter and reinjection smtpd.

> 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>
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to