summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2011-04-14bye bye queue_hash() you can now rest in peace.Gilles Chehade
2011-04-14- implement missing operations for fsqueue:Gilles Chehade
fsqueue_envelope_create(), fsqueue_message_purge() - kill deprecated functions in queue_shared.c At this point fsqueue backend is almost complete, all that is left to do is to move the qwalk() API inside the queue_backend API, then make sure smtpd is no longer calling anything queue related directly.
2011-04-14no functionnal changeGilles Chehade
2011-04-14- implement fsqueue_message_create() and fsqueue_message_commit()Gilles Chehade
- change a few prototypes to allow bounce messages to use the queue_backend API until it gets merged in - kill functions of the queue API that have been deprecated
2011-04-14remove annoying log_debug()Gilles Chehade
2011-04-14fsqueue now provides fsqueue_message_fd_r() and fsqueue_message_fd_rw() toGilles Chehade
obtain a read{-only,/write} descriptor to the message file. make sure smtpd uses the new API everywhere it needs a fd, and kill the many functions that were used until now.
2011-04-14fsqueue_message_delete() should use fsqueue_hash() not queue_hash() as i'mGilles Chehade
going to kill it with lots of violence soon.
2011-04-14fsqueue queue backend will implement a filesystem queue:Gilles Chehade
- fsqueue->setup() performs the queue initialization; - fsqueue->message() controls messages; - fsqueue->envelope() controls envelopes; This commit brings the following to fsbackend: fsqueue_setup(), fsqueue_message_delete(), fsqueue_envelope_load(), fsqueue_envelope_update(), fsqueue_envelope_delete(). It also makes smtpd use the queue_backend API for these operations.
2011-04-14smtpd makes too many assumptions about the structure and layout of itsGilles Chehade
disk-based queue, it makes it near impossible to make changes to it without editing twenty files... how am i going to implement mongodb support ? :-) bring a new queue_backend API which hides the details of the disk-based queue to smtpd. it is not "plugged in" yet and I'm filling the holes.
2011-04-13following an idea from jacekm@, smtpd now uses a ram-queue instead of doingGilles Chehade
a continuous walk on the disk-queue. the implementation differs from what jacekm@ commited (and I backed out) a while ago in that it uses a queue and a host tree required for upcoming features. code will be improved in tree, it requires changes to be done in queue and bounce API, I just wanted to commit a working version first ... tested by todd@ and I
2011-04-02add stat counters for the lookup agentEric Faurot
ok gilles@
2011-04-02saner and hopefully correct implementation for dname_from_fqdn().Eric Faurot
especially, make sure to write the ending '\0'. ok gilles@
2011-03-31cleanup and simplification following the asr update.Eric Faurot
- use a specific dispatch function for each type of query - make the host handler work on a list of hosts by default (single host queries are just a particular case) and use that to resolve the MX list - various other code cleanup - remove unused headers - remove orphaned prototypes - update copyright ok gilles@
2011-03-29remove unused code now that reverse lookups are done through asr.Eric Faurot
ok gilles@
2011-03-29make use the cname query interface from asr for reverse lookupsEric Faurot
ok gilles@
2011-03-27add a function to factorize resetting of dnssession events.Eric Faurot
ok gilles@
2011-03-27add missing CVS markers and update copyright year.Eric Faurot
ok gilles@
2011-03-26missing file in previous commitEric Faurot
ok gilles@
2011-03-26Fix the MX lookup process:Eric Faurot
- the MX records were not always properly inserted into the sorted array, which led to some MX being silently dropped. - if an MX address could not be resolved, mail delivery would fail, even though other valid MX exist for that domain. Now only report the failure if no server address can be found at all. grrrreeat gilles@
2011-03-26check that we actually have a stdio stream opened for the message beforeGilles Chehade
trying to close it in a mta session. in case of DNS errors; this pointer will remain NULL and cause a segv in MTA_DONE state.
2011-03-26Tweak the asr API to make things a bit smoother on the user side.Eric Faurot
Then asr_run() call now returns ASR_COND when a condition on a FD is expected. The exact condition (readable or writeable) is specified in the asr_result structure, along with the fd and timeout. ok gilles@
2011-03-26Merge a reverse lookup query implementation into asr.Eric Faurot
Not used by the rest of smtpd for now. ok gilles@
2011-03-26have the client API receive a stdio stream rather than a fd to the messageGilles Chehade
fd. this shifts responsibility for the fclose to the caller, prevents a memory leak and makes everyone happy. diff by Jared Yanovich, thanks !
2011-03-26use an index for iterating into the mx list.Eric Faurot
ok gilles@
2011-03-23The asr structure must always be freed in asr_done(). This is aEric Faurot
left-over from a former implementation where asr_ctx didn't exist and struct asr was refcounted. spotted by Jared Yanovich. ok gilles@
2011-03-23Simplify resolver initialization. This is done only onceEric Faurot
since resolv.conf reloading is handled automatically by asr. ok gilles@
2011-03-23remove unused states in enumEric Faurot
ok gilles@
2011-03-21do not close msgfd in bounce_session(), it is closed by client_close()Gilles Chehade
2011-03-21- reset smtp_client pointer to NULL after client_close()Gilles Chehade
- datafd is closed in client_close()
2011-03-21fix a memory leak in client.c and properly close envelope inGilles Chehade
queue_shared.c diff from Jared Yanovich, sent to bugs@ by Jonny Mosco
2011-03-15let smtpd use user-provided Diffie-Hellman parameters for ephemeral keyGilles Chehade
exchange. if no DH parameters are found, fallback to builtin parameters as was done until now. since we now accept user-provided DH parameters, make smtpd more strict and fatal() if the parameters are bogus. bump the key size of the DH parameters from 512bits to 1024bits, it might be bumped further after some more research. thanks to mikeb@ for his suggestions diff ok mikeb@ , man ok jmc@
2011-03-09smtpctl show stats displays inet4/inet6 repartition for incoming sessionsGilles Chehade
2011-03-09make similar code .. more similarTodd T. Fries
ok gilles@ previous commit should have read: when copying 'struct sockaddr' data, use sa_len not sizeof(struct sockaddr_in) this fixes truncation of IPv6 addresses in the mail delivery path ok gilles@
2011-03-09*** empty log message ***Todd T. Fries
2011-03-03fix ss_to_text() and ss_to_ptr() so IP addresses are logged correctlyGilles Chehade
on big-endian machines ... spotted and tested by landry@ (and I)
2010-12-19If MX lookup fails, fallback to using the host itself. This has always beenGilles Chehade
the behavior but I introduced a regression when switching to ASR. bug reported by jmc@, bugfix tested by jmc@ and I
2010-12-18document "certificate" a little better;Jason McIntyre
based on a diff from Sunil Nimmagadda ok gilles
2010-12-12use memcpy instead of a cast/deref dance that was reading pastJonathan Gray
the end of the buffer. tested by and ok gilles@
2010-12-03be more strict on socket lifetime (fixes a fd leak).Eric Faurot
ok gilles@
2010-11-29replace the fork-based-non-blocking-resolver-hack by shiny async resolverGilles Chehade
written by eric@. it is still experimental but still better than what we had earlier so ... we'll improve in tree :) diff by me with *lots* of help from eric@, tested by todd and I (and a few people out there)
2010-11-28remove unused functionsGilles Chehade
2010-11-28remove all unused headersGilles Chehade
2010-11-28remove unused headersGilles Chehade
2010-11-28a bit of .h cleanups, no functionnal changeGilles Chehade
2010-11-24add *maxactive statsTodd T. Fries
"ok and no need to keep them for yourself" gilles@
2010-11-24we can't accept up to MAX_LOCALPART_SIZE (128 bytes) for the user partGilles Chehade
of an email address at session time, then fatal() when we can't fit it in a LOGIN_NAME_MAX (32 bytes) buffer in the aliases expansion code. fix aliases functions to use a buffer that's appropriate, preventing a fatal() from being triggered in aliases_exist(). bug experienced by and reported by Jason Houx, if you're testing smtpd you want to update.
2010-11-15Do not fatal if an attempt to open a message envelope results in ENOENT.Joel Sing
This prevents smtpd from exiting if 'smtpctl schedule' is run with a valid but non-existent message ID. Whilst here make ENOSPC fatal since this should not happen. ok gilles@
2010-10-29smtpd no longer knows a map called "secrets" which holds credentials forGilles Chehade
authenticated relaying. one can create many maps holding credentials and name them however he/she wants, just like any other map. teach smtpd how to select a credentials map at the rule-level allowing a setup to relay through the same MX with different credentials depending on the source. smtpd.conf.5 updated to reflect changes with help from jmc@
2010-10-28teach smtpd how to handle per-rule delays for message expiry, this allowsGilles Chehade
some rules to have a longer expiry delay than the default: accept for [...] relay expire 8d # will stay 8 days in queue I added the man page bits so I don't forget but I need to reword it a bit
2010-10-18Mention that commands may be abbreviated, as done in other *ctl manuals.Stuart Henderson
ok gilles@