I have configured sendmail and I would request to blacklist certain mail ID which are spanning my sendmail server. I know we could add those in /etc/mail/access but since there are >20K users I don't want to and would like to create a new file with black_list and want them to REJECT.
Let me know what config changes are required if it's possible ?
I tried to search in google to find out any parameter referencing to include FEATURE(` ` ), but couldn't get it.
Please help.
Thanks.
Configure blacklist_recipients in sendmail
- bluegroper
- Posts: 266
- Joined: 2005/09/07 23:04:21
- Location: .au
Re: Configure blacklist_recipients in sendmail
Are you really using using sendmail, or do you mean postfix ?
We're doing some simple and effective blocking in postfix.
Happy to share details if relevant.
I'm not a complete idiot. There's still a few pieces missing.
Re: Configure blacklist_recipients in sendmail
I need to create a separate blacklist file and need to append so that it would reject blacklisted recipients.
find config file details.
#cat /etc/mail/sendmail.mc | grep -v '^dnl'
find config file details.
#cat /etc/mail/sendmail.mc | grep -v '^dnl'
Code: Select all
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
include(`/etc/mail/sendgrid.cf')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl