[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: next release



Hello,
I've send the following message some time ago.
As it looks like you are back whith zmailer I dare send it again...
TIA

------------------------
we had a problem using sm with a custom mailbox deliver which needed
info about envelope to: info.
we had a setup like *.domain.tld -> mailbox
and users retrieve mail via pop and redistribute it internally.

If To: is missing (mailing lists, Bcc) we lost track of original recipient.

looking at sm.c we made a couple of small changes that maybe are interesting

for someone else.

We don't know if this is ok, its working but we are not completely sure if
this is the way to do it.

By the way in sm.c there are a couple of flags which CAN'T work because
flags was defined as short, and this define:

#define MO_BSMTPHELO		0x20000 /* Add HELO/EHLO to the BSMTP */

is long...

diff is against this morning CVS.

Thanks...



diff -u sm.c sm-orcpt.c
--- sm.c        Tue Oct  2 17:25:30 2001
+++ sm-orcpt.c Tue Nov 13 10:50:34 2001
@@ -121,7 +121,8 @@
 
 struct maildesc {
        char    *name;
-       short   flags;
+       /*PERT-NB short for long */
+       long    flags;
        char    *command;
 #define MD_ARGVMAX 20
        char    *argv[MD_ARGVMAX];
@@ -150,6 +151,9 @@
 #define MO_BSMTPHELO           0x20000 /* Add HELO/EHLO to the BSMTP */
 
 #define MO_XENVELOPES          0x40000 /* Write various X-Envelope-*:
headers to mesage */
+/* PERT-NB define for X-Orcpt */
+#define MO_XORCPT              0x80000 /* Write X-Orcpt : header to mesage
*/
+/* PERT-NB END */
 
 struct exmapinfo {
        int     origstatus;
@@ -767,6 +771,23 @@
          }
        }
 
+/* PERT-NB X-Orcpt if O option */
+       if (mp->flags & MO_XORCPT) {
+         const char *uu;
+         char **hdrs;
+         do {
+           hdrs = has_header(startrp,"X-Orcpt:");
+           if (hdrs) delete_header(startrp, hdrs);
+         } while (hdrs);
+         for (rp = startrp; rp != endrp; rp = rp->next) {
+           if (rp->orcpt) {
+               uu = rp->orcpt;
+               append_header(rp,"X-Orcpt: %s",rp->orcpt);
+           }
+        }
+       }
+/* PERT-NB END */
+
        if (mp->flags & MO_CRLF) {
          fwriteheaders(startrp, tafp, "\r\n", convertmode, maxwidth, NULL);
          fprintf(tafp, "\r\n");
@@ -1292,6 +1313,8 @@
          case 'D':             /* this mailer wants a Date: line */
                m.flags |= MO_WANTSDATE;        break;
          case 'e':     m.flags |= MO_XENVELOPES;       break;
+/* PERT-NB O option for X-Orcpt */
+         case 'O':     m.flags |= MO_XORCPT;   break;
          case 'E':     m.flags |= MO_ESCAPEFROM;       break;
          case 'f':     m.flags |= MO_FFROMFLAG;        break;
          case 'F':             /* this mailer wants a From: line */

----------------------------------------------------------------------------
-----

Nicolás Baumgarten
Pert Consultores 


Nicolás Baumgarten
Pert Consultores 
nico@pert.com.ar
  
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi