summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2012-10-08disk space is cheap but we still want to limit the default size of a bodyGilles Chehade
to a sane default for everyone.
2012-10-08when building a db map, always lowercase the key before a lookup in makemapGilles Chehade
smtpd already does it, but this allows spotting a cycle at makemap time, so user isn't surprised at runtime. while at it, be more tolerant when user specifies /etc/mail/aliases instead of /etc/mail/aliases.db
2012-10-08update to 1.2.4Robert Nagy
2012-10-08skip RR if type is not MX. Use hostname if the list of MX is emptyEric Faurot
after the loop. spotted by huku at grhack.net ok gilles@
2012-10-07Implement a simple wait queue API. The idea is to allow multiple "waiters"Eric Faurot
to wait on the same "tag" for a deferred result. A waiter is a callback and a void *argument. The first waiter (the one for which waitq_wait() returns true) is supposed to run some code that leads to waitq_run() being run, which will destroy that waitq and call all callbacks in turn. Not used at the moment, but will be soon. ok gilles@ chl@
2012-10-07We need to provide a sendmail-like interface to makemap so that some toolsGilles Chehade
that assume sendmail do not break ... add support for reading map source from stdin, for specifying the DBTYPE of a map, and teach OUR makemap to emulate sendmail interface. ok eric@
2012-10-07convert iobuf_queue()'s to iobuf_fqueue(). (idea from gilles@)Charles Longeau
introduce iobuf_xinit() and iobuf_xfqueue(). (idea from eric@) ok gilles@
2012-10-07bump max number of connections to a route from 5 to 10, the limit is tooGilles Chehade
low as experienced by myself and another user. discussed with and ok eric@
2012-10-06fix usage(); ok dlgJason McIntyre
2012-10-06inetd Xr no longer relevant; ok dlgJason McIntyre
2012-10-05further tweak the maps description; ok gillesJason McIntyre
2012-10-05tweak previous; ok gillesJason McIntyre
2012-10-04spacingReyk Floeter
2012-10-04default map source to S_PLAIN, this allows us to simplify smtpd.conf:Gilles Chehade
map aliases source plain "/etc/mail/aliases" can be reduced to: map aliases "/etc/mail/aliases"
2012-10-04delay the call to log_debug() for displaying the backends used untilEric Faurot
the "real" debug mode is set. ok gilles@ chl@
2012-10-04change to from=<...>, to=<...> instead of to=<...> for loggingTodd T. Fries
from gilles@ ok eric@
2012-10-03when requesting MX entries, the result can be appear in random orders.Gilles Chehade
the logic for inserting them in a lka session when acting as backup MX did not take account for one specific case that could lead to an early exit without smtpd getting a chance to detect the entry corrsponds to itself. in such case, a backup MX woud try to connect to itself and bounce in the loop detection code ... or it would sometimes work.
2012-10-03we reintroduced a bug that was fixed 2 years ago with the aliases rewrite:Gilles Chehade
During the entire expansion process, a username may be larger than MAXLOGNAME because it may be an alias going through another expansion. We should use a buffer that's large enough to fit a mailaddr user-part so we avoid hitting a truncation check leading to a fatal(). ok eric@, ok chl@
2012-10-03- add a EXPAND_DEPTH define for ... expansion depthGilles Chehade
- bump the expansion depth from 5 to 10 - add the current node depth to log_debug() ok eric@, ok chl@
2012-10-03disallow root deliveries for "deliver to filename" and "deliver to mda"Gilles Chehade
rules, we only allow them for mbox and maildir though users should really create a root alias ... discussed with eric@ and chl@, ok both
2012-10-03don't try to cope with iobuf_init() failure, make it fatal() instead.Charles Longeau
from eric@ input ok gilles@
2012-10-03Only show "inflight" debugging message if compiled with DEBUG > 1.Reyk Floeter
2012-10-03Inherit and pass the relay table flags correctly.Reyk Floeter
2012-10-03Support more than one relay backup table. Instead of duplicating theReyk Floeter
code for main and backup table all over the place, turn the relay tables into a list attached to the relay. This improves the code and allows some other tricks with multiple tables later.
2012-10-02while it's of little harm, it's also been 5.5 years (and 8 releases),Okan Demirmen
remove the db conversion from BTREE to HASH. ok beck@
2012-10-02check iobuf_init() return value.Charles Longeau
ok gilles@ eric@
2012-10-01Add some fairly random PEN (private enterprise numbers).Reyk Floeter
2012-10-01Support the 0.0.0.0 and 255.255.255.255 IPv4 addresses in the ipAddrTable.Reyk Floeter
This fixes an issue which aborted the address traversal / SNMP walk when an "any"/0.0.0.0 address was configured on an interface. The problem was found with a pppoe(4) device that is typically configured with 0.0.0.0 on startup. Found and fix tested by Gerhard Roth
2012-09-30use xmalloc(), xcalloc() and xmemdup() helpersCharles Longeau
ok gilles@
2012-09-30- add decision to the rule so that we can actually perform a reject matchGilles Chehade
ie: reject from 192.168.1.0/24 for domain "openbsd.org" accept from 192.168.0.0/16 for domain "openbsd.org" deliver to mbox it was documented but not working. ok eric@ & chl@
2012-09-29use xstrdup() helperCharles Longeau
ok eric@ gilles@
2012-09-29some mfa_session cleanups.Eric Faurot
- move mfa_session() prototype to smtpd.h - make mfa session use a tree - make static functions static - merge mfa_session_init() into mfa_session() ok chl@
2012-09-29finally remove rule member from struct envelope.Eric Faurot
"wow!" gilles@
2012-09-29Remove support for "as user" for local deliveries.Eric Faurot
It's not documented and not implemented. ok gilles@
2012-09-28framed-ip-address and framed-ip-netmask were not working.YASUOKA Masahiko
pointed out by Andrew Ngo.
2012-09-28some smtpd.{c,h} cleanups:Eric Faurot
- move struct child to smtpd.c - make it use a tree keyed on the pid - change child_add to take the title directly as a const char * - remove useless child_lookup() and child_del() - remove CHILD_INVALID ok chl@ gilles@
2012-09-28use xmemdup() and xcalloc() helpersCharles Longeau
ok eric@
2012-09-28Move mda_session to mda.c, and make it use a tree instead of a list,Eric Faurot
but still use uint32_t keys since ithe key is used as peerid in msg. ok gilles@
2012-09-28smtpd.h/control.c cleanups:Eric Faurot
- move session_socket_* prototypes under util.c - move struct ctl_conn in control.c - make static functions static - remove unused functions - call unlink() in control_shutdown() - make control_close() take a ctl_conn * instead of a fd ok chl@ gilles@
2012-09-28sync manpage with codeCamiel Dobbelaar
ok reyk
2012-09-27use xstrdup() helperCharles Longeau
ok eric@ gilles@
2012-09-27When merging messages from an update, decrement the message counter if theEric Faurot
message already exists in the main queue, otherwise it's counted twice. ok gilles@
2012-09-27fatal -> fatalxEric Faurot
2012-09-27clarify the alias expansion code.Eric Faurot
The session manages a list of nodes to process. A node has a link to the parent node from which it has been expanded, and a link to the rule that led to its creation. Depending on its type and the associated rule, each node is either "expanded" to create new nodes or "submitted" to create a final envelope. Nodes which have already been seen, either processed or not, are discarded to avoid loops. The expansion process is bootstrapped by creating an EXPAND_ADDRESS node from the original dest, with no rule and no parent. It is done when all nodes have been expanded or if an error occurs before. The expand depth is limited 5 levels. The whole expansion fails if the limit is reached. While there, make sure that only one .forward file is queried at a time, and only append the subfolder tag in the maildir case. Fixe issues with some virtual map setups where the dest would get mixed up, and make the whole expansion process generally easier to follow. ok chl@ gilles@
2012-09-27simplify calloc() + strlcpy()/memcpy() dance with xmemdup()Charles Longeau
use xcalloc() helper remove newly unused variable ok gilles@ eric@
2012-09-27use xmalloc()/xcalloc() helpersCharles Longeau
while there unify usage of log_trace() in ramstat_set() ok gilles@ eric@
2012-09-27simplify malloc() + strlcpy() dance with xstrdup()Charles Longeau
ok gilles@ eric@
2012-09-26fix memory leak in case of fdopen() failureCharles Longeau
ok eric@ gilles@
2012-09-26Stop using the delivery_data union (field "to") in delivery_mda.Eric Faurot
It's confusing and not necessary as it's only used for "buffer". Instead, just add a "buffer" member in the structure and rename "as_user" to "user". The delivery_data union becomes an anonymous union in expandnode, which is the only other place where it's used. ok gilles@
2012-09-26last stage of rfc changes, using consistent Rs/Re blocks, and moving theJason McIntyre
references into a STANDARDS section;