summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2010-09-04move some things around to make intentions clear. not really a functionalTed Unangst
change. ok claudio
2010-09-03add an EXIT STATUS section for /usr/sbin;Jason McIntyre
2010-08-03fix linecount bug with comments spanning multiple linesHenning Brauer
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
2010-08-02Ignore SIGPIPE, the delivery of which prevented /usr/sbin/sendmail fromJacek Masiulaniec
relaying the server diagnostic back to the user (eg. "500 Line too long").
2010-07-23smtpd should NOT fatal when it permanently fails a bounce delivery as thisGilles Chehade
can be a normal situation and will allow a local/authenticated user to trigger the fatal on purpose ... ignore permanently failed bounce deliveries since there's not much smtpd can do anyway, that's what the previous queue code did. experienced and reported by pirofti@
2010-06-29force the dns buffers to be aligned using a union, until the retardedTheo de Raadt
"misalign strings on the stack" bug in gcc4 is fixed (even when that is fixed this idiom is safer and quite common) ok jacekm
2010-06-10allow configure queue expiryCharles Longeau
with help from jacekm@ ok gilles@ jacekm@
2010-06-09switch `ref' data type to int, because it is tested for negative value inzinovik
queue_mem_content_unref() function ok jacekm@, gilles@
2010-06-04Use correct imsg type in error reply.Jacek Masiulaniec
2010-06-02check event_dispatch() return valueCharles Longeau
ok jacekm@
2010-06-01new queue, again; gcc2 compile tested by deraadtJacek Masiulaniec
2010-06-01New queue doesn't compile on gcc2, back out. Spotted by deraadt@Jacek Masiulaniec
2010-06-01Schedule newly arrived mail immediately, ie. place it at the beginningJacek Masiulaniec
of the list of next items to try, or near the beginning if the schedule contains expired mail, which is of highest priority.
2010-06-01Include birth time in smtpctl show queue raw.Jacek Masiulaniec
2010-06-01It's lasttry + 1 because I initially thought passing identical birthJacek Masiulaniec
and lasttry args to queue_retry would make it return birth leading looped scheduling, but that's not true so drop the "+ 1".
2010-06-01Better errors.Jacek Masiulaniec
2010-06-01Don't interpret garbage on stack; problem seemingly exposed by myJacek Masiulaniec
queue rewrite. Proper fix after gilles wakes up.
2010-06-01Fix one case of not sending smtp session id on error.Jacek Masiulaniec
2010-05-31oopsJacek Masiulaniec
2010-05-31Rewrite entire queue code.Jacek Masiulaniec
Major goals: 1) Fix bad performance caused by the runner process doing full queue read in 1s intervals. My Soekris can now happily accept >50 msg/s while having multi-thousand queue; before, one hundred queue would bring the system to its knees. 2) Introduce Qmail-like scheduler that doesn't write as much to the disk so that it needs less code for servicing error conditions, which in some places can be tricky to get right. 3) Introduce separation between the scheduler and the backend; these two queue aspects shouldn't be too tied too each other. This means that eg. storing queue in SQL requires rewrite of just queue_backend.c. 4) Make on-disk queue format architecture independent, and more easily extensible, to reduce number of flag days in the future. Minor goals: ENOSPC no longer prevents delivery attempts, fixed session limiting for relayed mail, improved batching of "relay via" mails, human-readable mailq output, "show queue raw" command, clearer logging, sending of single bounce about multiple recipients, exact delay= computation, zero delay between deliveries while within session limit (currently 1s delay between re-scheduling is enforced), mta no longer requests content fd, corrected session limit for bounce submissions, tiny <100B queue files instead of multi-KB, detect loops before accepting mail, reduce traffic on imsg channels by killing enormous struct submit_status.
2010-05-31imsg_compose_event() return value was never checked. Make it fatal() if needed.Charles Longeau
ok jacekm@ gilles@
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-05-27struct opt as not used anywhere else, kill it, we can reintroduce it laterGilles Chehade
if we feel a need for it
2010-05-27kill struct opt from struct rule, we don't use it, we don't need itGilles Chehade
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-24now that we can handle >9 args, put "-D name=value" on one line: it's a bitJason McIntyre
more readable, and fixes a spacing bug we had in smtpd.8;
2010-05-23When executing external mda, call dup2, closefrom, and chdir beforeJacek Masiulaniec
setresuid because after dropping superuser privileges the process cannot be trusted to call these. Thanks to oga@, kettenis@, and nicm@ for confirming my paranoia.
2010-05-21Use _exit(2) in mda helper child process.Jacek Masiulaniec
2010-05-20S_ISREG() should be called on st.st_mode not st.st_flagsGilles Chehade
2010-05-19cleanup-only commit, removes unrequired includes, no functionnal changeGilles Chehade
2010-05-09in recent change, an assignation was removed which would cause a bogusGilles Chehade
pointer deref if we actually went through this code path (reload, does not work yet so it is disabled)
2010-05-06don't clobber CFLAGS; ok gilles@Christian Weisgerber
2010-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
2010-04-27sort the map types;Jason McIntyre
2010-04-27this commit enables "plain" as a backend for maps (that means aliases,Gilles Chehade
virtual AND secrets), adds a description in smtpd.conf.5 and removes a mention to special map "aliases" which was removed a while ago. to use plain maps: map "myaliases" { source plain "/etc/mail/aliases" } code diff was okayd a while ago by jacekm@
2010-04-27initial work at fixing aliases support:Gilles Chehade
- kill struct alias, struct expandnode is used instead - introduce map_parse_alias() and map_parse_virtual() - aliases and virtual code no longer assume db(3) but use the map API which lets them become backend agnostic AND value-checked. this actually makes the code simpler by removing all values parsing from aliases.c - rename K_SECRETS -> K_SECRET, K_ALIASES -> K_ALIAS for consistency the enum has singular names. - aliases, virtual and forward now work with an expandtree and deal with multiple levels of resolving by merging expandtree's more coming soon ;)
2010-04-24fix format stringCharles Longeau
while there, print SIZE unconditonnally (prompted by gilles@) ok gilles@
2010-04-22- sort the keyword listJason McIntyre
- rewrite the description of "size" ok gilles jacekm
2010-04-22Fix a case of runner trying to send imsg directly to smtp process insteadJacek Masiulaniec
of forwarding it via queue.
2010-04-22- kill the runner_imsg_compose wrapper to reduce indirectionJacek Masiulaniec
- kill noisy log_debug
2010-04-21introduce first map parser for maps of kind K_SECRETS !Gilles Chehade
map_parse_secret() converts a map value into a struct map_secret. lka no longer needs to do any parsing, it simply calls map_lookup() with kind K_SECRETS, checks if it returned a !NULL value, and call lka_encode_secret to safely do the base64 encoding.
2010-04-21when creating a map, make sure we do not store a key/val separator at theGilles Chehade
beginning of the key (ie: "gilles: bleh" should not be stored as key[gilles] val[ bleh])
2010-04-21map.c is growing big, split it into three different files:Gilles Chehade
map.c contains the map API calls as usable by smtpd processes, map_backend.c contains backend implementations and map_parser.c contains parser implementations used internally by the map API
2010-04-21my evbuffer_readln_crlf() hack can be killed now that nicm@ has brought usGilles Chehade
an update to libevent that ships with evbuffer_readln(). beers for nicm@ !
2010-04-21change prototypes for map_*_get() functions, we need the get-er functionGilles Chehade
to fill the size of value for the caller. have map_lookup() actually lookup the parser in map_parsers table and call it if it is set, otherwise return raw value which is similar to current behavior. currently, no map kind has a parser set, so this is essentially no functionnal change. fix map_stdio_get(), it was not used yet in -current but i spotted a bug while enabling it in my sandbox. it returns key and value instead of key.
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-04-21introduce enum map_kind, the map_parsers array and map_parser_lookup()Gilles Chehade
which will be used to perform stronger checks on map values. they are unused yet ...
2010-04-21simplify map_lookup() by having the backend lookup done in newGilles Chehade
map_backend_lookup() function, no functionnal change, first of many changes to come in map.c
2010-04-21Runner process is just a helper for queue, so tear down its imsgJacek Masiulaniec
channels to parent, mda, mta, lka, smtp, and control. This leaves just the channel to queue, which forwards imsgs on runner's behalf and redirects any replies back to it. OK gilles@