Hello,
On Thu, Feb 23, 2012, at 11:06 AM, [email protected] 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
[email protected]
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:<[email protected]>
250 2.1.0 Ok
RCPT TO:<[email protected]>
250 2.1.5 Ok
RCPT TO:<[email protected]>
550 5.1.1 <[email protected]>: 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 <[email protected]>: Recipient address
rejected: User unknown in virtual mailbox table;
from=<[email protected]>
to=<[email protected]> proto=ESMTP
helo=<desk.rogermail.lan>
Cheers,
Roger