summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
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@
2010-10-18Missing semicolons to appease yyextract, ok gilles@Stuart Henderson
2010-10-09these need to be re-added tooGilles Chehade
2010-10-09missing from previous commitGilles Chehade
2010-10-09no longer compiled, i will reintroduce them later, lots of stuff needs toGilles Chehade
be done before we can write queue backends anyway ...
2010-10-09backout the "new" queue code commited 4 months ago. it has many good ideas,Gilles Chehade
is way more optimized than what we had earlier and there's definitely stuff we want to keep, however it is early optimization that doesn't account for many features and makes them hard (if not impossible) to write without ugly workarounds that ruin the purpose of the optimizations. the backout goes to 30 May's right before the commit and catches up on all the non-queue related commits that happened since then. i'll work on reintroducing the ideas from this queue when the basic features we expect from a MTA are implemented. suggested on tech@ about a week ago, no objections, several "please make smtpd move forward" mails from hackers and tech readers.
2010-09-20- fix a regression caused by latest commit (long story made short: do notGilles Chehade
attempt to expand the local delivery buffer when relaying mail, it was kind of ok before but no longer is) - use the same buffer for local deliveries to files and commands tested by jmc@ and I
2010-09-12oga@ spotted a bug in lka_expand() which caused it to miscalculate theGilles Chehade
length of its expand buffer. this commit introduces a new lka_expand() that has been simplified, that fixes the bug and that is more robust. callers of lka_expand() can now determine that it has failed and throw the recipient at session time. lka_expand() rewrite by oga@, changes around it by me, tested on a few different setups but no feedback from tech@ so ... let me know if it's breaking something for you
2010-09-08when I fixed the ruleset matching on rules that had more than one conditionGilles Chehade
by expanding them to several rules, I forgot to copy the tags to the expanded rules. this commit unbreaks matching rules by tag. documentation follows shortly ... spotted and fixed by me a while ago, jacekm@ timeout
2010-09-08had planned to commit the change after oga@ and I are done with littleGilles Chehade
changes to lka_expand() but it looks like a bit more work :-)
2010-09-08add support for sender expansion in smtpd.conf:Gilles Chehade
%U for sender localpart %D for sender domainpart diff sent to tech@ by Gregory Edigarov <greg@bestnet.kharkov.ua>, timeout by jacekm@, ok by me