Hello Stuart,
you wrote:
Dear all, i am using XMailServer with DBMail v1.0 and am having a problem
with all messages appearing corrupted. [db stores them corrupted..]
The mail[s] gets delivered to the database, but get an extra snip of
information at the beginning of the message gets appended. please see below
for a pop3 dump of a message, noting the lines between the ssuk and the
<<MAIL-DATA>>
retr 1
+OK 637 octets
ssuk
S140C2
MAIL FROM:<test2 at nospam.net>
RCPT TO:<test at nospam.net>
<<MAIL-DATA>>
Received: from mail.nospam.net (x.100.1.33)
I got the same problem when I started using dbmail recently, the
solution is easy, the XMail author provides a tool, called econv to
remove the additional headers, mainly developed for the XMail mailing
list which runs with ecartis, but it may be used also for prcessing the
mail for other delivery agents, get the tool here:
http://www.xmailserver.org/econv.c
I'm running on NT and use this in my mailproc.tab I added this line (no
linebreak and [TAB] means onr real tabstop):
"external"[TAB]"0"[TAB]"7"[TAB]"D:/MailRoot/bin/dbmail.cmd"[TAB]"@@TMPFILE"
[TAB]"@@RCPT"
and the called dbmail.cmd looks like this:
@echo off
D:/MailRoot/bin/econv --mbox --input %1 > temp_mail.tmp
H:/usr/sbin/dbmail-smtp -d %2 < temp_mail.tmp
del %1
del temp_mail.tmp
exit
I wanted to be the two calls to external programs on one line:
.../econv --mbox --input %1 | H:/usr/sbin/dbmail-smtp -d %2 <
but it seems that Windows isn't supoprting pipes, therefore I create a
temporary file and let dbmail-smtp read from the file instead of stdin.
If you use @@TMPFILE in the .tab file, then you must care yourself that
the temporary file is deleted too, but as I mentioned, you can do it all
in place on Linux with a shell script using a pipe, then I suggest to
not use @@TMPFILE but @@FILE which is the actual file which comes from
XMail. See the docs for the details of filter usage.
BTW, I have not ported dbmail to NT, I used Cygwin to build it here and
it is running well;)
Gerrit