Hello,
I am trying to create a whitelist of recipient addresses that can be
relayed.
I would like to allow only certain addresses, all others should be
rejected.
e.g. I like to allow
user1@example.org,
user2@example.org and reject
all other addresses like anything @example.org.
This is a test system, but on a productive system I want to avoid accepting mails for non-existing users and sending out bounce emails.
In the /etc/mail/access is
To:
ok@example.org RELAY
To:example.org REJECT
It is being used (I tried other entries and converted the DB with sendmailconfig), but it does not work as I thought it will work.
Although, I was able to create a blacklist:
To:
ok@example.org REJECT
To:example.org RELAY
does work, ok is being rejected, anything else is being relayed.
250 xxx Hello xxxx
[IPv6:2001:xxx] (may be forged), pleased to meet you
mail from:<
test@example.com> 250 2.1.0 <
test@example.com>... Sender ok
rcpt to:<
asddf@example.org>
550 5.2.1 <
asddf@example.org>... Mailbox disabled for this recipient
rcpt to:<
ok@example.org>
550 5.7.1 <
ok@example.org>... Relaying denied. IP name possibly forged [IPv6:xxx]
I am aware that no PTR record is set, but this shouldn't be the problem
here, because the "blacklist" works.
blacklist recipients is enabled. I also did run sendmailconfig to create the database and convert mc to cf.
divert(0)dnl
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.15.2-22ubuntu3 2021-12-09 00:18:01 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS= FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=20xxxx')dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl define(`confPRIVACY_FLAGS', `needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
define(`confCONNECTION_RATE_THROTTLE', `15')dnl define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`access_db', , `skip')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`greet_pause', `100')dnl 1 seconds
FEATURE(`delay_checks', `friend', `n')dnl define(`confBAD_RCPT_THROTTLE',`3')dnl
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
What did I do wrong here?
--
kind regards
Marco
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)