summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2011-11-28use STATUS_* filter codes, instead of -1/0/1 hard coded valuesCharles Longeau
ok gilles@
2011-11-28fix STATE_COUNT countCharles Longeau
ok eric@ gilles@
2011-11-23Fix Segmentation Fault when launching mailq(8)Charles Longeau
Bug reported by Mark Patruck <mark at wrapped.cx> ok gilles@ eric@
2011-11-21get rid of the "enqueue/" queue; use "incoming/" instead.Eric Faurot
ok gilles@ chl@
2011-11-16remove unused functionsEric Faurot
ok gilles@ chl@
2011-11-16Do not unlink an offline message until it has been correctly enqueued.Eric Faurot
While there, simplify the offline_enqueue() function by doing all the sanity checks in the forked process, and remove all fatal(): on error, the offline message is left untouched in the directory. Also, get rid of the path_starts_with() check since all paths to offline messages are now constructed internally. ok gilles@ chl@
2011-11-16fix obvious variable substitution mistakeCharles Longeau
change code type back to int8_t ok gilles@
2011-11-15- change callback prototypes in filter.c to allow stricter checksGilles Chehade
- introduce STATUS_WAITING, filters will reroute async DNS queries through LKA in a near future - filter_api.c will contain our filter API (empty for now) - Makefile to build libsmtpdfilter (not linked to the build,dev stuff only)
2011-11-15wooooops defines missing from previous commitGilles Chehade
2011-11-15Qwalk, our API to linearly walk over the persistent queue, did not take theGilles Chehade
queue_backend into account and assumed a filesystem with a specific layout. This commit does plenty of things: - make qwalk an abstraction in the queue_backend API, and impose queue drivers to implement qwalk_open(), qwalk() and qwalk_close(); - move previous qwalk_open(), qwalk() and qwalk_close() to the fsqueue driver since they were fsqueue specific ... - make qwalk API work with msgid/evpid instead of pathnames since we're going to use the queue_backend API to load envelopes by evpid anyway; - makes smtpd use *solely* the queue_backend API when manipulating the queue. pathnames were removed from smtpd.h and moved into the fsqueue which means we can now store a queue anywhere ... as long as we write the ten functions or so required for a queue driver ;-) ok eric@, ok chl@
2011-11-14when receiving an unexpected imsg, print its name.Charles Longeau
with help and ideas from eric@ ok eric@ gilles@
2011-11-14make sure that the offline directory has the right owner/permsEric Faurot
before enqueueing offline mail. ok gilles@
2011-11-14The spool and offline directories are backend-independent, so theyEric Faurot
must be created early by smtpd, rather than in fsqueue. ok gilles@ chl@
2011-11-10Use STDIN_FILENO instead of magic constant 0Charles Longeau
ok gilles@
2011-11-07Let the smtpd process handle the enqueueing of offline messages atEric Faurot
startup, rather than playing tricks with the runner. This will allow further simplifications and improvements in the runner/queue. ok gilles@
2011-11-06No need to save/restore the batch_id since the envelope is not dumpedEric Faurot
as a structure anymore. ok chl@ gilles@
2011-11-06Do not dump the envelope status. It's useless and not reloaded anyway.Eric Faurot
ok chl@ gilles@
2011-11-03since smtpctl doesn't need to be build along with client.c,Charles Longeau
client.c doesn't need to be build with -DCLIENT_NO_SSL anymore, so get rid of #ifdef CLIENT_NO_SSL ok eric@
2011-11-02simpler implementation of smtpctl local enqueuer that does not need libevent.Eric Faurot
ok gilles@
2011-10-27Use PRI{x,d}64 in format strings instead of %llx, %lld or %qd to print ↵Charles Longeau
{u_,}int64_t or time_t While there, cast some time_t to int64_t These will fix build warnings for portable smptd ok gilles@ eric@
2011-10-27Don't offer or negotiate SSLv2 and, since we don't do SSL sessionPhilip Guenthe
caching, don't try to negotiate an RFC 4507-style session ticket, as it would be useless and some (broken and non-compliant) servers choke on TLS extension negotiation. ok gilles@
2011-10-26retain alphabetical order;Jason McIntyre
2011-10-26- fix smtpctl pause/resume so the ramqueue scheduling is done correctlyGilles Chehade
- rename IMSG and smtpctl pause/resume parameters - update man page tested by me, ok chl@, eric@
2011-10-25rewrite the sender user/domain as specified in the manpage when matchingEric Faurot
a "relay... as" rule. mikeb can now send mails. ok gilles@ mikeb@
2011-10-23retain alphabetical order;Jason McIntyre
2011-10-23- smtpctl schedule no longer works, instead, use 'smtpctl schedule-id <id>'Gilles Chehade
- introduce 'smtpctl schedule-all' ok eric@
2011-10-23plug leakEric Faurot
spotted by chl@ ok chl@
2011-10-23a few important fixes:Eric Faurot
- use correct endianness when dumping/loading port - use the right flag set when dumping/loading flags - keep and use the authmap name when needed, rather than an id that might change when smtpd is restarted - dump/load the authmap name with the envelope - remove the rule struct from rq_batch as only the relay info is useful ok gilles@
2011-10-23relay_as is not used anuwhereEric Faurot
ok gilles@
2011-10-23introduce Q_CORRUPT and queue_backend operation to move a message fromGilles Chehade
schedule queue to corrupt queue upon envelope loading failure. tested by me, ok eric@
2011-10-23add missing format stringCharles Longeau
ok eric@ gilles@
2011-10-23add a missing DH_free() after ssl_set_ephemeral_key_exchange().Charles Longeau
tested by gilles@ ok gilles@ eric@
2011-10-23fsqueue no longer stores envelopes by dumping the structure, instead use aGilles Chehade
couple of load/dump functions to convert to and from a human readable fmt. while at it kill struct delivery and merge back its fields to the envelope. this basically means we shouldn't require users to flush their queues every time we make a change to struct envelope. work is not done, but we're at a better state than the binary fsqueue so we'll improve it in-tree. has been running on my own box for the last 12 hours or so ok eric@, chl@
2011-10-22correctly set relay when expanding envelopesEric Faurot
ok gilles@
2011-10-22tweak previous;Jason McIntyre
2011-10-22Add a log_trace() call to toggle logging of specific debugging info inEric Faurot
verbose mode, and an associated -T command line option. Use it for the imsg traces. Requested by gilles@ who doesn't like verbose to be too verbose. ok gilles@ chl@
2011-10-13Drop a reference to the client SSL_CTX after SSL_new(), so that it isEric Faurot
correctly freed by SSL_free() at the end of the session. Plug a leak in the mta. ok! gilles@
2011-10-11fix parsing of :include: aliasesGilles Chehade
2011-10-10document that virtual maps require a domain keyGilles Chehade
2011-10-09show messages sent between processes in debug modeEric Faurot
ok gilles@ chl@
2011-10-03- fix a segv caused by a deep recursion introduced with a recent quick-fixGilles Chehade
and triggering if clients sent a large number of DATA lines in one write
2011-10-03clarify that network sources are to be specified in CIDR notationGilles Chehade
by David Walker, ok jmc@
2011-09-28removing annoying debug logGilles Chehade
2011-09-27check closefrom() return valueCharles Longeau
use STDERR_FILENO instead of hard coded value ok gilles@
2011-09-19Quick fix to avoid fatal() when we receive a line which have a length of ↵Charles Longeau
exactly 1024. Better fix comming soon. Committing on behalf of gilles@
2011-09-18a single ramqueue message may be shared by many ramqueue envelopes to beGilles Chehade
delivered to many ramqueue hosts, therefore storing the rq_host pointer in the rq_msg envelope is wrong and causes baaaaad behavior. this commit fixes reliability issues in runner process, experienced and reported by many
2011-09-12- introduce filtermask in struct smtpdGilles Chehade
- do not forward lines to mfa when FILTER_DATALINE is not set in filtermask prevents smtpd from handling mails slowly while I'm hacking on filters support
2011-09-11remove unused headerCharles Longeau
ok gilles@
2011-09-01move a log_debug() call to a less annoying spot so that it does not getGilles Chehade
called for each single line of DATA exchanged between smtp and mfa
2011-09-01Introduce a small set of functions to manage stat counters in aEric Faurot
simpler and hopefully saner way. ok gilles@ chl@