[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] wrote:
> > > with a few sub-domains for mail.
> > > We would like to put a notice at the buttom of all mail
> > > passing our server
> > > How do I do that in qmail.
>
> > Why would you want qmail to do that? Seems to me that the
> > web-mail program should insert the footnote for you. Most free
> > web-mail programs are capable of inserting the footnote.
>
> I run it as an ordinary pop server with free dial-in
> and not as a web-mail server.
>
> Your help is much appriciated.

Okay.. here is how you want to do this. First, compile qmail like regular and
install it. Then apply the appended patch to qmail-smtpd.c so that it will add
the footer you want. Compile qmail again and install the new qmail-smtpd to
something like /var/qmail/bin/qmail-smtpd-footer. Then set things up so that
when your customers send e-mail they connect to an ipaddress which is served by
qmail-smtpd-footer program, so that this mail will get branded. But make sure
that your MX records point to an ipaddress so which is running the standard
qmail-smtpd, so that your incoming mail will not get branded.

I don't see it mentioned in the tcpserver from ucspi-tcp-0.84 man page how to
make it bind to a specific ipaddress. You might need to hack tcpserver, but
first take a look at the latest version and see if it supports this. Or you
could always just use two boxes for incoming and outgoing e-mail.

The patch to qmail-smtpd.c to make it add footers is appended.

Hope this helps.

 - David Harris
   Principal Engineer, DRH Internet Services


--- qmail-1.03/qmail-smtpd.c    Tue Sep 14 12:46:49 1999
+++ qmail-1.03_footer/qmail-smtpd.c     Tue Sep 14 12:39:45 1999
@@ -369,6 +369,12 @@
   int hops;
   unsigned long qp;
   char *qqx;
+
+  int footerloop;
+  char* footer =
+       "\n"
+    "---------------------------------------------------\n"
+    "Get your own free POP mail at http://whatever.com/\n";

   if (!seenmail) { err_wantmail(); return; }
   if (!rcptto.len) { err_wantrcpt(); return; }
@@ -380,6 +386,10 @@

   received(&qqt,"SMTP",local,remoteip,remotehost,remoteinfo,fakehelo);
   blast(&hops);
+
+  for (footerloop = 0;footer[footerloop];footerloop++)
+    put(footer+footerloop);
+
   hops = (hops >= MAXHOPS);
   if (hops) qmail_fail(&qqt);
   qmail_from(&qqt,mailfrom.s);

Reply via email to