Greetings,

We used to have a separate server that handled some spam filtering
duties, and among its functions was only allowing email to specific
user and hostname combinations.  We have a few legacy hostnames and
some hostnames we
provide email services for.  Say, apple.blah.com, banana.blah.com, and
cantaloupe.blah.com.  User Dave, Ed, and Frank.  (All of them are
friends with Alice and Bob...)

Dave only publicizes/receives email at d...@banana.blah.com; Frank may
actively use both apple.blah.com and cantaloupe.blah.com, but receives
nothing but spam from d...@banana.blah.com.

We had a relay recipients list that was working brilliantly when we
had the relay host, but I can't
figure out the recommended way to do this on a host which is the final
destination (the relay host is being phased out.)

>From http://www.postfix.org/LOCAL_RECIPIENT_README.html#main_config ,
local_recipient_maps seemed like the obvious choice.  So, I added:

*reject_unlisted_recipient to smtpd_recipient_restrictions
*local_recipient_maps = btree:/etc/postfix/maps/relay_recipients

(That table was formatted as "d...@banana.blah.com(tab)OK[CR]" for
relay recipient mapping (where it worked very well), and from the docs
I've read, that format should still be OK.)

...issued a postfix reload command, and tested emailing myself at one
of the hostnames I don't have an entry for in the relay_recipients
table.  The email was not rejected, in contrary to this:

"If a local username or address is not listed in
$local_recipient_maps, then the Postfix SMTP server will reject the
address with "User unknown in local recipient table".

After some head-scratching, the best but seemed-unlikely candidate: I
have apple, banana, and cantaloupe listed in mydestinations, and thus
perhaps postfix is considering any valid unix user under a host listed
in mydestinations to be a valid recipient, regardless of the table.
However, my reading of
http://www.postfix.org/postconf.5.html#mydestination seems to say no:

"The list of domains that are delivered via the $local_transport mail
delivery transport. By default this is the Postfix local(8) delivery
agent which looks up all recipients in /etc/passwd and /etc/aliases.
The SMTP server validates recipient addresses with
$local_recipient_maps and rejects non-existent recipients. "

"By default, the Postfix SMTP server rejects mail for recipients not
listed with the local_recipient_maps parameter. See the postconf(5)
manual for a description of the local_recipient_maps and
unknown_local_recipient_reject_code parameters."

I've reviewed the entire main.cf configuration file with an eye
towards overriding or conflicting directives and can't think of any.

Suggestions are appreciated - much obliged,
Brett

Reply via email to