summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/ruleset.c
AgeCommit message (Collapse)Author
2011-05-21remove annoying log_debug()Gilles Chehade
2011-05-16murder struct path and make sure smtpd uses simpler structures that do notGilles Chehade
bring a shitload of unnecessary information everywhere. this required many parts of smtpd to be refactored and more specifically envelope expansion. in the process lots of code got simplified, and the envelope expansion code has been isolated to lka_session.c with some longstanding bugs fixed. Diff has been tested by many with no major regression reported. armani@ spotted a bug in a setup where a domain is listed a both primary and virtual, I will fix that in-tree as it's becoming painful to maintain this diff out.
2011-05-01the smtpd env is meant to be global, so do not pass it all around.Eric Faurot
discussed with and ok gilles@
2011-04-17cleanups, cosmethic changes, functions that should be static are now staticGilles Chehade
no functionnal change
2010-11-28remove all unused headersGilles Chehade
2010-11-28a bit of .h cleanups, no functionnal changeGilles Chehade
2010-05-27when a rule has two conditions (ie: accept for { domain foo, domain bar } )Gilles Chehade
expand to two rules each having its own condition rather than one rule with a tail queue of conditions. this simplifies code a bit and removes a couple hacks. basic testing by oga and me
2010-04-21map_lookup() takes an additionnal parameter of type enum map_kind whichGilles Chehade
will be used to select the appropriate map parser. make sure every call to map_lookup() is updated. map_lookup() currently ignores the value.
2010-02-28the netmask fix I commited a couple days ago lacked the AF_INET6 bits,Gilles Chehade
this commit fixes pr user/6328 bug reported and fix verified by Martin Hedenfalk <martinh@bzero.se>
2010-02-26- fix netmask matching for AF_INET, it was broken in many ways, problemGilles Chehade
was reported by nicm@ which spent a couple hours with me trying to understand what was causing the bug, and helping me write and test fix.
2010-02-17the map api becomes backend-agnostic with initial support for db(3) andGilles Chehade
stdio(3) backends, though for now we only enable db(3). this is the first commit of a serie to improve maps and everything related. idea discussed with and diff okay jacekm@
2009-11-03teach makemap how to build a set, which is a map containing only keys.Gilles Chehade
smtpd is now capable of looking primary domains at runtime in a set, which means that the following becomes possible: map "primary" { source db "/etc/mail/primary.db" } accept for domain map "primary" deliver to mbox while at it fix a couple bugs in the aliases resolution path which caused recipients to bounce if a ruleset did not have an "accept for local" rule "diff reads good" jacekm@, flush queue & make clean
2009-11-03- remove a useless member of struct condGilles Chehade
- have virtual related functions take a map id instead of a map - shrink a tiny bit ruleset matching - add missing lka_resolve_path() call in aliases resolution leading to issues spotted by nicm@
2009-11-03remove annoying log_debugGilles Chehade
2009-10-19currently, smtpd is capable of having multiple listeners with differentGilles Chehade
options but they will all share the same ruleset. this means that there is no way to have a rule apply to a session established on one listener but not applied on another. this commit brings initial support for tagging listeners and having the rules able to match these specific listeners. The following will define a rule which will only apply to interfaces tagged as "mynet": listen on lo0 # implicit lo0 tag listen on fxp0 tag mynet listen on fxp1 tag mynet accept on mynet for domain "example.org" deliver to mbox
2009-10-12fix a bug where matching a "for all" rule with multiple condition will notGilles Chehade
let us know which condition we matched.
2009-10-11implement proper virtual domains instead of faking them on top of primaryGilles Chehade
domains. this means that: - virtual domains no longer deliver to a local user when not told to - they no longer attempt to resolve aliases when not told to - they no longer need an explicit rule in smtpd.conf for EACH domain - the "virtual" map is no longer hardcoded - smtpd no longer needs a restart to support a new domain instead we introduce the: accept for virtual map "mapname" [...] syntax which refers to a map that can be manipulated at runtime. idea discussed and okayd with jacekm@
2009-10-07remove noisy log_debug, requested by gilles@Jacek Masiulaniec
2009-06-01add new file ruleset.c with code related to the ruleset matching, and killGilles Chehade
the two or three "almost" identical versions of ruleset matching loops from lka and mfa by having one unified function in ruleset.c; ok jacekm@ while at it, bring maildir support back to life; trivial one-liner by me