[EXIM] shrug

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Dave C.
Datum:  
To: exim-users
Betreff: [EXIM] shrug

I don't know if this would be useful to anyone else or not, but I
suppose I can make it available and PH10 can put it in the contrib dir
if he wants.

We have a WorldGroup BBS (I beleive the TCP/IP package it is using is
MajorTCP). When a new user is created, Worldgroup sends a message to
SYSOP from that user with the new users account information. The BBS
supports a concept of "Internet aliases" which is the ID used when
email is sent from that user out to the Internet. Each users "internet
alias" is initialzed to their user name (rewritten with . in place of
space) AFTER the email from that user is sent to sysop. Email to SYSOP
on our BBS is forwarded to an Internet account via SMTP. When it is
sent, the BBS sends it FROM that user, who does not yet have an
internet alias set up.. Hence the bbs sends a MAIL-FROM: line of:

MAIL FROM: (No Alias Created)@the.bbs'.domain.

(And also uses this string in the From-Header)

This is obviously a gross violation of RFC's, but there is no way to
fix it short of an expensive TCP/IP package upgrade for the BBS.

Since this is such an esoteric problem, PH10 rightly didnt want to put
an option in the main exim source to support it. However, with some
pointers from him, I managed to wedge in some code that fixes these
addresses on the fly. (Both in the SMTP envelope sender and the header
sender)

I have recently grabbed the new beta 1.891, and obviously needed to put
that code in there.. When I did that, I made a simple patch file. It
has occured to me that there is some small chance that someone else
might have a similar (or the same) problem, so here is that patch.

---------------------------------------------------------------------
David J. Chiodo \ Microwave Systems  \ Campbell Network Systems
 <djc@???> <davec@???>  \ 820 Monroe NW Ste 411
  Domain Administrator <dns@???>   \ Grand Rapids  MI 49503
   Customer Support <support@???>   \ 616-774-3131 <info@???>
Fax 616-774-3933    Tollfree 1-888-694-INET    http://www.cns.net


--- parse.c.orig    Wed Mar 18 20:22:12 1998
+++ parse.c    Wed Mar 18 20:24:47 1998
@@ -517,10 +517,41 @@
 uschar *s = (uschar *)mailbox;
 uschar *t = (uschar *)yield;
 
 *domain = 0;
 
+/* The following code by djc@??? allows broken 
+   MAIL FROM: lines that are sent by Worldgroup BBS systems
+*/
+
+/* Addresses in the form (foo bar)@baz.frob get converted to "foo bar"@???  */
+
+if (s[0] == '(')
+{ char *ket = strchr(s, ')');
+  if (ket != NULL)
+  {  *s = '\"';
+     *ket = '\"'; }
+  }
+
+/* Addresses in the form <(foo bar)@baz.frob> get converted to <"foo bar"@???> */
+
+if (s[0] == '<')
+ if (s[1] == '(')
+  { { char *ket = strchr(s, ')');
+      char *keu = strchr(s, '(');
+      if (ket != NULL)
+      { *keu = '\"';
+        *ket = '\"';
+      }
+    }
+  }
+
+/* The preceding code by djc@??? allows broken 
+   MAIL FROM: lines that are sent by Worldgroup BBS systems
+*/
+
+
 /* At the start of the string we expect either an addr-spec or a phrase
 preceding a <route-addr>. If groups are allowed, we might also find a phrase
 preceding a colon and an address. If we find an initial word followed by
 a dot, strict interpretation of the RFC would cause it to be taken
 as the start of an addr-spec. However, many mailers break the rules