summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2009-03-23various minor improvements; ok jacekm gillesJason McIntyre
2009-03-23repair library use. this was detected on the vax, a nice static linkingTheo de Raadt
architecture. it was silently creating broken code on other architectures.
2009-03-23good god no you do not use LDFLAGS to pull in librariesTheo de Raadt
2009-03-23Fixed a leaking of a fd each time a file is delivered to a mbox, whichTobias Stoeckmann
was introduced in revision 1.7. ok and log message by gilles
2009-03-22fix a bug in the resolution of forward files which would cause usernamesGilles Chehade
not to be taken into account if they had no ~/.forward file AND were the result of an alias expansion that expanded to more than one username. while at it, I spotted another bug where I would check T_MDA_MESSAGE on the flags field instead of the type field. the bug could cause two MDA message to end up in the same batch which is no longer valid.
2009-03-22trivial message repair, ok jacek@Ian Darwin
2009-03-20initialize variable before using it as a counter in a loopGilles Chehade
spotted and fix by Matthew Haub <matthew.haub@alumni.adelaide.edu.au>
2009-03-19since maps may contain secrets, carry ownership and perms from source fileJacek Masiulaniec
to db file; ok gilles@
2009-03-19make action_type == 0 mean A_INVALID, not A_RELAY; ok gilles@Jacek Masiulaniec
2009-03-19when listen was declared without a port parameter, it would get it wrongGilles Chehade
because of a missing htons()
2009-03-19in the event of a timeout, mxhost is passed to TAILQ_REMOVE before it isGilles Chehade
initialized. spotted and diff by Matthew Haub <matthew.haub@alumni.adelaide.edu.au>
2009-03-18remove debug X-Cipher and turn it into a useful log_info()Gilles Chehade
2009-03-18previous commit removed "else" conditionGilles Chehade
2009-03-18we can no longer create batches of MDA deliveries, so make sure runnerGilles Chehade
does not do a batch lookup when dealing with a MDA message
2009-03-18unbreak make release, spotted by todd and kurtJacek Masiulaniec
2009-03-18in mta, when remote host advertises AUTH, do not attempt to authenticateGilles Chehade
unless we do have F_AUTH set on the mxhost (which means we explicitely mentionned authentication in config) and we did find credentials in the secrets map. issue and initial diff from Rivo Nurges <rix@estpak.ee>
2009-03-17update a bit, but more work is needed on this man page, working on it andGilles Chehade
will commit an up to date version tomorrow
2009-03-17move smtpd.conf to etc/mail/ directory. it is not installed yet by theGilles Chehade
build
2009-03-16change smtpd.conf to what it will be by default:Gilles Chehade
- only listen on lo0 - support aliases - accept mail for "localhost" and the system hostname - accept relaying mail for all domains
2009-03-16in accept rules, support "for local" as a destination which is an alias toGilles Chehade
"localhost" and system hostname. this allows us to ship with a config file that goes: accept for local deliver to mbox , and which will allow us to have mail working sanely out of the box.
2009-03-16update smtpctl.8 with new smtpctl commandsGilles Chehade
2009-03-16smtpctl goes to usr.sbin; ok gilles@Jacek Masiulaniec
2009-03-16makemap goes to libexec/smtpd; ok gilles@Jacek Masiulaniec
2009-03-16- mention /etc/mail/virtual in FILES sectionGilles Chehade
2009-03-16mention /etc/mail/secrets in the FILES sectionGilles Chehade
2009-03-16this file has been deprecated for a while and will not be updated, soGilles Chehade
lets just remove it as some people may believe it actually describes the architecture ...
2009-03-15since we are going to share code in smtp sessions and mta sessions, we needGilles Chehade
to also share the statistics structure, still being worked on
2009-03-15the mda process no longer uses struct batch as its central structure toGilles Chehade
deal with deliveries, it now uses struct session just like mta and smtp processes. we now keep the mbox and message descriptors in the session, saving space in struct message which is now as small as we can make it. While at it, plugged a memory leak and did some cosmethic changes This was the last planned change to our struct message which means that later changes will no longer require a queue flush before rebuild.
2009-03-15save 4 bytes per message by moving the datafp field of struct message toGilles Chehade
struct session where it really belongs.
2009-03-12Add new function time_to_text to correctly display the date.pea
Use it to display the date in received from header and when we store headers. ok jacekm@
2009-03-11getmxbyname() returning a value != 0 does not necessarily means it failedpea
ok gilles@
2009-03-11fix log_info(), while other processes know about message uid, the smtpGilles Chehade
process only knows about message id bug spotted by pea@
2009-03-10implement basic logging, needs more work; ok gilles@Jacek Masiulaniec
2009-03-10when calling external mda, use restricted environment; ok gilles@Jacek Masiulaniec
2009-03-10run external mda with cwd set to $HOME or /; ok gilles@Jacek Masiulaniec
2009-03-10kill few lines, saving one seteuid(2) call; ok gilles@Jacek Masiulaniec
2009-03-10- Use setsid(2) to create new process group for external mda.Jacek Masiulaniec
- Unignore SIGPIPE, otherwise it remains ignored in forked mda. - Use closefrom(2) to close all descriptors apart from stdin/stdout/stderr. ok gilles@
2009-03-10it's simpler to use pipe(2) than socketpair(2) to communicate withJacek Masiulaniec
external mda; ok gilles@
2009-03-10fork(2) or socketpair(2) failures are temporary, delivery attempt should beJacek Masiulaniec
retried later; ok gilles@
2009-03-10ascribe copyright to code taken from OpenSSH, pointed out by deraadtJacek Masiulaniec
2009-03-09run external mda directly, not via sh -c; this steals addargs() APIJacek Masiulaniec
from OpenSSH; ok gilles@
2009-03-09Drop ALIAS_TEXT, plain maps got implemented in a different way; ok gilles@Jacek Masiulaniec
2009-03-09add hunk that should have been included in rev. 1.12, fixes occasionalJacek Masiulaniec
crash; ok gilles@
2009-03-09add basic support for outgoing authentication (AUTH PLAIN over ssl) whichGilles Chehade
can be turned on by adding "enable auth" to a "relay via" rule. this made me rework the mx resolution so that it is done by the mta process and not the runner process anymore.
2009-03-08adapt example to reflect a recent change in parse.yGilles Chehade
2009-03-08supporting delivery to a mbox that's not in _PATH_MAILDIR is not supported,Gilles Chehade
if someone comes with good rationale why this is needed, we'll consider it, meanwhile it's more work than it looks like and it brings a lot of pain. discussed with jacekm@ and deraadt@
2009-03-08when operating in enqueue mode, it was easy to make smtpctl fatal() byGilles Chehade
writing a small app that sent out of order imsg's. prevent this by use of a state machine and read event masking. issue spotted by jacekm@, temporary fix by me. there are ideas around this, but we want to experiment them a bit and they are low priority.
2009-03-08shrink struct message a bit by removing a couple fields which are no longerGilles Chehade
used and by moving the rcpt count in struct session where it really belongs while at it, remove some unused splay tree generation in mfa
2009-03-08~/.forward files handling was fixed recently so that it is the privilegedGilles Chehade
process that does the opening, this commit does some cleanup, and fixes a bug I experienced today which was caused by a use-after-free. I did some testing to make sure a user cannot cause smtpd to deadlock, or loop, with broken setups (self-referencing forwards/aliases, empty files, broken files...), but if you are playing with aliases/forwards PLEASE let me know of any bug you run into.
2009-03-06missing prototypeGilles Chehade