]> git.ipfire.org Git - people/ms/dma.git/log
people/ms/dma.git
14 years agodma: adjust syslog logging levels
Simon Schubert [Thu, 16 Jul 2009 09:40:39 +0000 (11:40 +0200)] 
dma: adjust syslog logging levels

Most invocations of syslog used LOG_ERR.  Clearly this is not good
practise.  Adjust the levels to be reasonable.

14 years agodma: always send EHLO after tls setup
Simon Schubert [Thu, 16 Jul 2009 09:30:10 +0000 (11:30 +0200)] 
dma: always send EHLO after tls setup

We have to send EHLO even after a STARTTLS, so unconditionally send it
after connection/tls setup.

14 years agodma: prevent races from sharing fd between children
Simon Schubert [Thu, 9 Jul 2009 21:24:35 +0000 (23:24 +0200)] 
dma: prevent races from sharing fd between children

On fork, fds are shared between children.  If two processes work on
different recipients, but on the same queue file, they might get
confused when the fd (and thus the offset) is shared.  Prevent this by
re-opening the queue file after fork.

Reported-by: Daniel Roethlisberger <daniel@roe.ch>
14 years agodma: restructure set_username
Simon Schubert [Thu, 9 Jul 2009 20:30:40 +0000 (22:30 +0200)] 
dma: restructure set_username

Restructure to perform early exit and check for strdup() error.

14 years agodma: constify bounce reason and avoid strdup
Simon Schubert [Thu, 9 Jul 2009 20:21:26 +0000 (22:21 +0200)] 
dma: constify bounce reason and avoid strdup

We don't need to care about freeing the bounce reason string, because
bounce is only called once.  Convert all bounce reason strings to
const char * and avoid calling strdup() on them.  Dynamic strings from
asprintf() need some de-const massaging.

14 years agodma: ignore a whole slew of sendmail options
Simon Schubert [Thu, 9 Jul 2009 12:37:17 +0000 (14:37 +0200)] 
dma: ignore a whole slew of sendmail options

Probably some more left.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: better logic for guessing username
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)] 
dma: better logic for guessing username

Apply better logic to guess the username when getlogin(3) is not
available for some reason, e.g. no login session at all, no access
to utmp/wtmp, etc.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: add the MAILNAME and MAILNAMEFILE config options
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)] 
dma: add the MAILNAME and MAILNAMEFILE config options

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: add FULLBOUNCE config option
Simon Schubert [Thu, 9 Jul 2009 19:19:40 +0000 (21:19 +0200)] 
dma: add FULLBOUNCE config option

FULLBOUNCE will include the full message in the bounce

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: provide proper bounce error message
Simon Schubert [Thu, 9 Jul 2009 19:15:54 +0000 (21:15 +0200)] 
dma: provide proper bounce error message

This may not be the best solution - the error message buffer has now
turned dynamic, but the only alternative I see is to make it a static
array in net.c... and I'm not quite sure if I want to do that just now.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: lock temp files on creation
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)] 
dma: lock temp files on creation

Lock the temporary files after creating them to protect from a "dma -q"
run at just the wrong time causing a double delivery attempt for
the same message.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: various code hardening
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)] 
dma: various code hardening

(as found by the Debian hardening wrapper)

- check the result of fgets()
- loop the network writes until the whole thing is sent
- check one more write() result

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: note that the -q option requires an unused argument
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)] 
dma: note that the -q option requires an unused argument

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: fix two typos and a word order problem
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)] 
dma: fix two typos and a word order problem

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: also list locked queue files
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)] 
dma: also list locked queue files

When listing the queue, show all messages, even those that are
currently locked for delivery.  Indicate the lock with a '*' after
the queue ID.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: bounce message instantly on permanent remote delivery errors
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)] 
dma: bounce message instantly on permanent remote delivery errors

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: treat a QUIT error as merely a warning
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)] 
dma: treat a QUIT error as merely a warning

RFC 2821 only mandates that a QUIT error should abort an unfinished
transaction, and since we've reached this point, the DATA command has
succeeded and the message has been accepted for delivery by the remote
end.  Thus, just warn about it.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: properly log last remote status message
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)] 
dma: properly log last remote status message

Store the last error or status message received from the remote server in
the neterr[] buffer and display it instead of the meaningless %m in
remote delivery syslog messages.

Submitted-by: Peter Pentchev <roam@ringlet.net>
14 years agodma: several fixes to make dma build on non-BSD OS's
Simon Schubert [Thu, 9 Jul 2009 12:37:14 +0000 (14:37 +0200)] 
dma: several fixes to make dma build on non-BSD OS's

- replace open(..., O_EXLOCK) with a new open_locked() routine;
- define the __unused function attribute;
- do not redefine PATH_MAX.

Submitted-by: Peter Pentchev <roam@ringlet.net>
15 years agodma(8): Raise WARNS to 6.
Sascha Wildner [Tue, 24 Feb 2009 22:00:55 +0000 (23:00 +0100)] 
dma(8): Raise WARNS to 6.

15 years agoRevert 4dcaa51ba4d4238e035a802067366a28527cd570
Matthias Schmidt [Sun, 8 Feb 2009 10:42:34 +0000 (11:42 +0100)] 
Revert 4dcaa51ba4d4238e035a802067366a28527cd570

This reverts the .forward commit.  I committed the code to early, there are some
bugs inside (queue handling broken and some security issues).  I back this out
until we have more time to fix all the issues or rewrite some parts from scratch.

This brings dma back in a fully working state, only the .forward stuff is gone.

Tested-by: Daniel Roethlisberger <daniel@roe.ch> and me
Ok-to-back-out: corecode@

15 years agoSilence warnings.
Sascha Wildner [Tue, 30 Sep 2008 17:47:21 +0000 (17:47 +0000)] 
Silence warnings.

15 years agoAs a safety measure, don't install dma with setuid bit until it has undergone
Simon Schubert [Fri, 19 Sep 2008 00:36:57 +0000 (00:36 +0000)] 
As a safety measure, don't install dma with setuid bit until it has undergone
a thorough review.

15 years agoCommit the remainder of Max's dma work (with minor modifications).
Matthias Schmidt [Tue, 16 Sep 2008 17:57:23 +0000 (17:57 +0000)] 
Commit the remainder of Max's dma work (with minor modifications).
See Max mail on kernel@ [1] for further details.

* Support of .forward files (Note: dma is now setuid root)
* Send multiple mails at once
* Fix some style(9) issues (mostly return())

Some style(9) issues are still in the code.  I take care if I have some
spare time :)  Please test!

Submitted-by: Max Lindner <gisanka@gmail.com>
Sponsored-by: Google Summer of Code 2008
[1] http://leaf.dragonflybsd.org/mailarchive/kernel/2008-08/msg00045.html

15 years ago1) Small mdoc nit 2) regardless if -> regardless of.
Sascha Wildner [Sat, 6 Sep 2008 14:17:56 +0000 (14:17 +0000)] 
1) Small mdoc nit 2) regardless if -> regardless of.

15 years agoRemove the now untrue statement about plain SMTP login only.
Matthias Schmidt [Tue, 2 Sep 2008 15:16:59 +0000 (15:16 +0000)] 
Remove the now untrue statement about plain SMTP login only.

15 years agoAdd CRAM-MD5 authentication support for the DragonFly Mail Agent. This is the
Matthias Schmidt [Tue, 2 Sep 2008 15:11:49 +0000 (15:11 +0000)] 
Add CRAM-MD5 authentication support for the DragonFly Mail Agent. This is the
first piece of Max's work for the Google Summer of Code 2008.  All other
new features will follow after evaluation/review :)

Besides the CRAM code there is new code within base64.c (BSD licensed and
from the University of Stockholm) and within crypto.c derived from RFC 2104.

Note: This code is tested and works.  If you find a bug, please report back
to the bugs@ list.

Thanks a lot for the good work Max.

Submitted-by: Max Lindner <gisanka@googlemail.com>
Sponsored-by: Google Summer of Code 2008
16 years agoSweep over our manual pages and remove .Pp before a .Bd or .Bl without
Sascha Wildner [Fri, 2 May 2008 02:05:08 +0000 (02:05 +0000)] 
Sweep over our manual pages and remove .Pp before a .Bd or .Bl without
-compact because it has no effect.

16 years agoAnother round of typo fixes (mostly in messages).
Sascha Wildner [Sun, 20 Apr 2008 13:44:26 +0000 (13:44 +0000)] 
Another round of typo fixes (mostly in messages).

16 years agoFix various typos in our manual pages.
Sascha Wildner [Mon, 14 Apr 2008 08:17:09 +0000 (08:17 +0000)] 
Fix various typos in our manual pages.

16 years agoRework some bits of the networking code.
Matthias Schmidt [Tue, 4 Mar 2008 11:36:09 +0000 (11:36 +0000)] 
Rework some bits of the networking code.

 o Rename TLSINIT to NOSSL
 o Rename read_remote_command to read_remote.  Replace the remote read method
   with code from femail.c written by Henning Brauer of OpenBSD and licensed
   under a BSD license.  Return the first figure of the return code and check
   the appropriate values.
 o Read the server greeting at first and send EHLO afterwards.
 o Remove check_for_smtp_error().  It is included in read_remote().

This commit fixes some of the issues in issue953.  More code to come.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue953

16 years agoo Remove version number
Matthias Schmidt [Tue, 5 Feb 2008 13:00:36 +0000 (13:00 +0000)] 
o Remove version number
o Minor style changes

16 years agoAdd a new config option to dma(8). If a user wants to use plain text SMTP
Matthias Schmidt [Mon, 4 Feb 2008 10:11:41 +0000 (10:11 +0000)] 
Add a new config option to dma(8).  If a user wants to use plain text SMTP
login over an insecure connection, he has to set the INSECURE option in
the config file.  Otherwise plain text login is only available over encrypted
connections.

Discussed-with: corecode@

16 years agoo Remove per-user config file support
Matthias Schmidt [Mon, 4 Feb 2008 08:58:54 +0000 (08:58 +0000)] 
o Remove per-user config file support
o Remove old-style-connect with gethostbyname() etc.  It was #ifdefed out
  and getaddrinfo() will do the job.

16 years agoMention -O and bump .Dd
Matthias Schmidt [Sun, 3 Feb 2008 19:07:45 +0000 (19:07 +0000)] 
Mention -O and bump .Dd

16 years agoAllow -q to take an argument (which is ignored) and add fake -O option to
Matthias Schmidt [Sun, 3 Feb 2008 18:41:40 +0000 (18:41 +0000)] 
Allow -q to take an argument (which is ignored) and add fake -O option to
make dma(8) more sendmail(8) compatible and some startup scripts happy.

Reported-by: swildner@
16 years agoIt's actually postfix(1).
Sascha Wildner [Sun, 3 Feb 2008 18:02:12 +0000 (18:02 +0000)] 
It's actually postfix(1).

16 years agoFix some compiler warnings and make dma(8) compile clean on FreeBSD. Commit
Matthias Schmidt [Sun, 3 Feb 2008 11:06:17 +0000 (11:06 +0000)] 
Fix some compiler warnings and make dma(8) compile clean on FreeBSD.  Commit
submitted patch with minor modifications.

Submitted-by: Xin LI <delphij@delphij.net>
16 years agoFix buildworld: add -I${.CURDIR} so aliases_parse.c can find dma.h.
Sascha Wildner [Sat, 2 Feb 2008 23:57:35 +0000 (23:57 +0000)] 
Fix buildworld: add -I${.CURDIR} so aliases_parse.c can find dma.h.

16 years agoRemove leading zero in .Dd.
Sascha Wildner [Sat, 2 Feb 2008 18:43:46 +0000 (18:43 +0000)] 
Remove leading zero in .Dd.

16 years agoAdd the DragonFly Mail Agent dma(8) to the base.
Matthias Schmidt [Sat, 2 Feb 2008 18:20:51 +0000 (18:20 +0000)] 
Add the DragonFly Mail Agent dma(8) to the base.

dma is a small Mail Transport Agent (MTA), designed for home and office
use.  It accepts mails from locally installed Mail User Agents (MUA) and
delivers the mails either locally or to a remote destination.  Remote
delivery includes several features like TLS/SSL support and SMTP authen-
tication (AUTH LOGIN only).

dma is not intended as a replacement for real, big MTAs like sendmail(8)
or postfix(8).  Consequently, dma does not listen on port 25 for incoming
connections.

Current list of features:
- Local mail delivery with alias-support
- Remote mail delivery either direct or via a smarthost
- TLS/SSL and STARTTLS support for encrypted connections
- virtualusers (address rewriting) support
- SMTP authentication (currently only plain SMTP login)
- Sendmail compatible command line options
- IPv6 support

Code-collaboration-with: codecode@
Man-page-collaboration-with: swildner@
Approved-by: dillon@