71. pepsi-reputation¶
Keep the IP blocklists that inbound mail is checked against, and check whether this host is on one.
71.1. Role¶
pepsi-reputation downloads whole IP blocklists into the database, where
pepsi-ingress looks up the client of every unauthenticated session.
Each list is a [pepsi-reputation-list-NAME] section; the ones that Pepsi
knows about ship in ${DATADIR}/config.d/reputation.conf (Spamhaus DROP and
blocklist.de’s mail list enabled, UCEPROTECT level 1 by rsync disabled), all
marking rather than rejecting. pepsi-reputation-iplists.timer runs
iplists update hourly. When started as root, it continues as the
pepsi service account. Reference: pepsi-reputation(1).
71.2. Why download instead of asking¶
Most MTAs query DNS blocklists per connection. Pepsi does not, for two reasons that follow from its principles:
a query tells the list operator which server is talking to this host, for every connection (principle 4, collect and keep the minimum);
a query makes every session wait on a third party, and its failure must not decide whether mail is accepted (principle 1, external services are consulted without becoming dependencies).
A downloaded list has neither problem. The cost is coverage: Spamhaus ZEN, SpamCop and Barracuda are free only as DNS queries.
71.3. Features¶
iplists update — download each enabled list that is due (
MIN_INTERVAL, 45 minutes by default, because list operators lock out hosts that download too often), conditionally over HTTPS (ETag/Last-Modified) or by rsync intoCACHE_DIR; when the file changed, replace the list’s entries inpepsi.ip_blocklistin one transaction.--forceignores the interval and the validators.iplists status — per list:
current,stale,never-loaded,disabledorno-rsync, its entries, its last check and last error.Formats: rbldnsd
ip4set/ip6trieand plain address lists (FORMAT = ip-list), Spamhaus DROP’s JSON (FORMAT = spamhaus-drop).check — ask the DNS blocklists (
CHECK_IP_ZONES,CHECK_DOMAIN_ZONES) about this host’s own sending and MX addresses and domains, daily frompepsi-reputation-check.timer. A list’s answers count only if it passes its RFC 5782 test entries for the address family, and a refused query (Spamhaus’s127.255.255.254for a public resolver) is unchecked, never clean. Listings are logged, stored for pepsi-status, and reported by pepsi-setupcheckbeside the large mailbox providers’ sender requirements and sign-ups (Gmail Postmaster Tools, whosegoogle-site-verificationrecordpepsi-setuppublishes fromGOOGLE_SITE_VERIFICATION; Microsoft SNDS/JMRP; Yahoo Sender Hub). Pepsi never signs up anywhere itself: that would mean holding credentials for those providers’ accounts on the mail server.
71.4. What ingress does with it¶
For an unauthenticated session from the network, ingress looks the client
address up once, in one query, in every enabled list that was confirmed current
within its MAX_AGE, and records state.origin.ip_blocklist: {"listed":
true|false, "lists": {"NAME": true, …}}. When no list could be consulted
(none loaded yet, all stale, a database error) the key is absent, so a stage
cannot mistake “unknown” for “clean”. A list with ACTION = reject makes
ingress refuse the session’s recipients with 554 5.7.1, except
postmaster. pepsi-stage-if routes on the mark
(STATE_PATH = origin.ip_blocklist.listed, or
origin.ip_blocklist.lists.NAME for one list).
71.5. Security¶
The lists are trusted to say who is a spam source, and to nothing more: a forged list can make mail from some addresses be marked or, with
ACTION = reject, refused. HTTPS downloads verify the server against the system roots; entries wider than a /8 (IPv4) or /16 (IPv6) are dropped, so no list can mark the whole internet; a file that is mostly not entries is refused.pepsi.ip_blocklistandpepsi.ip_blocklist_sourceare written by thepepsirole and read bypepsi-ingress;pepsi-httpdandpepsi-telemetryhave no access.The self-check asks about this host’s own addresses and domains only;
pepsi.reputation_checkholds nothing about a correspondent.rsync is an optional dependency, run with an empty environment and the URL after
--; anrsync://URL must name one file. A host without rsync does not use rsync lists, and pepsi-setup warns about them.