OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
550 SMTP Reject only working without domain.tld

From: Anton Herber (anton.herberincom.de)
Date: Wed Feb 06 2008 - 08:28:22 CST


Hello!

After trying to find a solution for about some days by myself I decided
to ask someone. Probably I'm missing something and you could give a hint.
I'd like the SMTP server to reject mails to an non-existing user
(/etc/aliases and local users) with 550. This works like expected if I
use "RCPT TO: user" but not if I use "RCPT: userdomain.tld". These
mails get accepted and a bounce is generated. So I'm answering to alle
the spammers around the world if the user they're sending their crap to
does not exist... anyone a hint where to look for the right switch?

/etc/postfic/transport
domain.tld local
lists.domain.tld mailman:
2domain.tld local

postconf (because I'm unsure if I should post the whole configfile into
this mail or to paste.debian.net for example I'm posting only (in my
opinion) relevant lines):
soft_bounce = no
mydomain = subdomain.domain.tld
inet_interfaces = host.subdomain.domain.tld, localhost
mydestination = $myhostname
transport_maps = hash:/etc/postfix/transport
local_recipient_maps = unix:passwd.byname, $alias_maps
unknown_local_recipient_reject_code = 550
relay_domains = $mydestination, domain.tld, and_some_more.tld
relayhost = [relay_ip_adress_within_dmz]
alias_database = hash:/etc/aliases
smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,check_relay_domains,reject_unlisted_recipients
smtpd_sender_restrictions=permit_mynetworks,reject_unknown_sender_domain

/etc/postfic/master.cf
smtp inet n - n - - smtpd
smtp unix - - n - - smtp
local unix - n n - - local
mailman unix - n n - - pipe
      flags=FR user=mailman:mailman
      argv=/var/lib/mailman/postfix-to-mailman.py $nexthop $user

Like said before: when I telnet to 25 eg from
[relay_ip_adress_within_dmz] I get 550 when I try to "RCPT TO: notexist"
but not if I user "RCPT TO: notexistdomain.tld".

Thank you.
Anton Herber