summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2008-12-13Use mkstemp instead of mkdtemp; also, add more X's.Jacek Masiulaniec
Do chmod before rename to eliminate short time window when aliases.db is "official" but not readable. Use PATH_ALIASESDB instead of hardcoding "/etc/mail/.." Check db->close return code. ok gilles@ henning@
2008-12-13- Correct usage text.Jacek Masiulaniec
- Drop static qualifiers. - Drop unused -d switch. - Use 0/1 exit codes instead of <sysexits.h> defines. ok gilles@
2008-12-13Declare alias_parse in smtpd.h, and fix callers that pass it wrongJacek Masiulaniec
number of arguments. ok gilles@
2008-12-12Format string checking for bsnprintf.Jacek Masiulaniec
ok gilles@
2008-12-12Kill references to smtpdb(8).Jacek Masiulaniec
ok gilles@
2008-12-11- last snprintf -> bsnprintfGilles Chehade
2008-12-11- snprintf -> bsnprintfGilles Chehade
2008-12-11- snprintf -> bsnprintfGilles Chehade
2008-12-11- snprintf -> bsnprintfGilles Chehade
2008-12-11- snprintf -> bsnprintfGilles Chehade
- makemap and newaliases need util.c now
2008-12-11- snprintf -> bsnprintfGilles Chehade
2008-12-11- snprintf -> bsnprintfGilles Chehade
2008-12-11- fix a bug that would cause the runner to hit a fatal() when running outGilles Chehade
of luck under load. Long story made short: the runner process opens the queue and sequentially opens each bucket to process messages. If a message is delivered by MDA/MTA after the opendir(), then the queue process will garbage collect the message from the queue and the runner will attempt to opendir() a path that no longer exists. Reported by Daniel Lidberg <daniel.lidberg@gmail.com>, observed by jacekm@ and debugged by me, that's collaborative work ;-)
2008-12-11- document showqueue and showrunqueueGilles Chehade
2008-12-11- missing prototypeGilles Chehade
2008-12-11- bsnprintf() is a wrapper to snprintf() that can be used when we handle anGilles Chehade
encoding error or a truncation the same way. This will turn many of our snprintf() checks into boolean checks.
2008-12-10That the "aliases" and "virtual" maps satisfy m_src == S_DB is checkedJacek Masiulaniec
too late, ie. at alias resolution time, and it's only a log_info. Move the check to parse.y, and make daemon die if m_src != S_DB. ok gilles@
2008-12-07Simplify queue_record_incoming_envelope.Jacek Masiulaniec
ok gilles@
2008-12-07Disable EV_READ when sending IMSG_PARENT_AUTHENTICATE.Jacek Masiulaniec
This is for consistency, code is not reached yet. ok gilles@
2008-12-07Replace evbuffer_add_printf calls with wrapper function, session_respond,Jacek Masiulaniec
which additionally suffixes <CRLF>, and enables EV_WRITE. Remove bufferevent_enable(.., EV_WRITE) from session_command and session_pickup so that EV_WRITE is enabled in exactly one place, session_respond. Change some responses slightly to make code fit 80 columns. ok gilles@
2008-12-07- getaddrinfo() uses negative values for its error defines, our use of anGilles Chehade
u_int8_t to hold the value leads to invalid checking in runner_batch_resolved(), this lead to a crash in MTA because we assumed a batch had its mx resolved when it had not. while at it, be more strict about errors we don't know and fatal(), it should not happen. ok jacekm@, ok chl@
2008-12-07- fix function name in fatal()Gilles Chehade
2008-12-07Don't check / reset s->s_msg.datafp where its state is obviously known.Jacek Masiulaniec
2008-12-06Make queue_delete_incoming_message not fatal on ENOENT condition.Jacek Masiulaniec
Also, fix function name in fatals. ok gilles@
2008-12-06Get rid of anonymous unions. Discussed with and ok gilles@Paul de Weerd
2008-12-06In session_destroy, use "if (s->s_state >= S_MAIL)", and notJacek Masiulaniec
"if (s->s_state > S_MAIL)". Otherwise, session timeout after MAIL FROM would leave mess in queue. ok gilles@
2008-12-06Don't include <err.h> where log.c API must be used.Jacek Masiulaniec
ok gilles@
2008-12-06- fix spelling and grammar, From Nicholas Marriott <nicm__@ntlworld.com>Gilles Chehade
2008-12-06Unbreak -Werror.Jacek Masiulaniec
ok gilles
2008-12-06the ellipsis allows more than one argument being specified.Igor Sobrado
discussed with gilles@ ok jmc@
2008-12-06smtpctl(8) was committed after 4.4.Igor Sobrado
ok gilles@
2008-12-06NULL-ify s_msg.datafp upon fclose unconditionally.Jacek Masiulaniec
ok gilles
2008-12-06- teach smtpctl how to inspect queue and runqueue, it supports two commandsGilles Chehade
`showqueue' which displays the content of the queue (all envelopes) `showrunqueue` which displays envelopes scheduled for delivery. The utility will be improved and extended, but for now we need at least this basic support to help debug queue-related issues. Output format is spamdb-alike: type|envelope uid|sender|recipient|last delivery date|retry count ok jacek@
2008-12-06evbuffer_readline already strips <CRLF> so that callers don't have to.Jacek Masiulaniec
ok gilles
2008-12-06- it is now possible to specify an interface instead of an address or aGilles Chehade
hostname in a listen statement (ie: listen on lo0) request by deraadt@ a while ago, ok jacekm@
2008-12-05- more err/errx -> fatal/fatalx, warn/warnx -> log_warn/log_warnxGilles Chehade
contains bits based on an old diff from Jacek Masiulaniec and other bits from me.
2008-12-05- err -> fatal(), old diff from Jacek Masiulaniec <jacekm@dobremiasto.net>Gilles Chehade
2008-12-05- cosmethic, no functionnal changeGilles Chehade
2008-12-05tweaks;Jason McIntyre
2008-12-05- smtpctl utility to control the smtpd, don't expect too much yet as it isGilles Chehade
just an empty clone of relayctl with the glue needed to have it exchange imsg with smtpd correctly. code mostly by pyr@, reviewed by chl@ and I a while ago.
2008-12-05- last part of the new queue code: the runner process (unprivileged andGilles Chehade
chrooted) is now in charge of doing the scheduling of deliveries, and the dispatching of messages to MDA and MTA. queue process only does inserts/updates/removals from the queue and can no longer be so busy that it delays answers to imsg from smtp server.
2008-12-04- in session_read(), set EV_WRITE if we are going to send a "transactionGilles Chehade
failed" error. found by Jacek Masiulaniec <jacekm@dobremiasto.net>
2008-12-04Declare printf-style functions with __attribute__((format(printf,x,x)))Chad Loder
and fix some of the errors caught by this. Part of a general push to make yyerror() -Wformat clean throughout the tree.
2008-12-04- allow smtpd to build againGilles Chehade
2008-12-04move smtpd build to smtpd subdir so we can traverse to newaliases and makemapTodd T. Fries
ok gilles@
2008-12-04some basic cleanup;Jason McIntyre
2008-12-04- when in state S_DATACONTENT, do not disable EV_READ if the last line weGilles Chehade
read is empty, instead return and only disable EV_READ when we read "."
2008-12-04- when doing the session timeout lookup, do not remove the last sessionGilles Chehade
that timed out twice.
2008-12-04- fix event masking for DATA and make DATA look more like MAIL and RCPTGilles Chehade
with regard to communication with queue process (one state before sending imsg, another state when imsg has returned). this fixes an issue that I observed when clients send DATA and content without even looking at server replies.
2008-12-04obvious 'missing space' typo in message, ok gilles@ krw@Ian Darwin