[EXIM] RFC 976 & Exim

Top Page
Delete this message
Reply to this message
Author: Georg v.Zezschwitz
Date:  
To: exim-users
CC: gvz
Subject: [EXIM] RFC 976 & Exim

Hello,

I'm afraid Exim when invoked as rmail does not operate compliant
to RFC 976.

In RFC 976 (UUCP Mail Interchange Format Standard) the first line
of a message passed on stdin to rmail is described as follow:

The standard input of the command should begin with a single line

      From domain!user date remote from system


   followed immediately by the RFC-822 format headers and body of the
   message.  It is possible that there will be additional From_ lines
   preceding this line - these lines may be added, one line for each
   system the message passes through.  It is also possible that the
   "system" fields will be stacked into a single line, with many !'s in
   ... 
    (it states a lot of difficult staff :-) )


I don't know how to cope with this requirement correctly.

Exim is not built for UUCP, and I don't know, if the UUCP-clients that
caused difficulties where even compliant to RFC 976.

However, I had a look at the smail code. Smail transforms the
new sender address by taking "system" from the end of the line
and adding it to the front, making things look like this:

system!domain!user

(This is only what I guess from the source lines)

I implemented this behaviour in accept.c.

However, my implementation still ignores a lot of cases mentioned
in RFC 976, e.g. multiple "From_"-lines, "stacked" user addresses
and a leading ">" e.g.

But it makes some of my customers happy.

Another behaviour of Exim is that it wants the 'Date' part of
the From_-line strictly in the international style. However,
the popular German UUCP-program "Crosspoint" loves writing it
a german way which might be wrong, but RFC 976 does not state
how the date in the From_-line has to be formatted.

Therefore, I shortened the "regexp"-rule for the From_-line.


Hope this helps some UUCP-guys,


Georg


Diff for accept.c:
839,840c839,840
<         char *errmess, *newsender, *cp;
<         int start, end, domain, i;
---

>         char *errmess, *newsender;
>         int start, end, domain;

846,864d845
<         /* If we don't have a full user@FQDN yet */
<         if (!strchr(buffer, '@')) {
<           /* Do we have an RFC 976-From_-line ? */
<           cp = strstr (next->text, " remote from ");
<           if (cp) {
<             cp += 13;
<             i = 0;
<             while (*cp > ' ' && i<254) 
<               buffer [i++] = *cp++;
<             buffer [i++] = '!';
<             buffer [i] = 0;
<             cp = buffer+i;
<             if (i+length > 255)
<               length = 255-i;
<             strncpy(cp, regexp_From->startp[1], length);
<             length += i;
<             buffer[length] = 0;
<           }
<         }



And the new rule for exim.c:

276c276,277
< "^From +([^ ]+) ");
---
> "^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +"
> "[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]");




--
*** Exim information can be found at http://www.exim.org/ ***