Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "common.h"
2
#include "send.h"
3
 
4
#define isspace(c) ((c)==' ' || (c)=='\t' || (c)=='\n')
5
 
6
/*
7
 *  Translate the last component of the sender address.  If the translation
8
 *  yields the same address, replace the sender with its last component.
9
 */
10
extern void
11
gateway(message *mp)
12
{
13
	char *base;
14
	String *s;
15
 
16
	/* first remove all systems equivalent to us */
17
	base = skipequiv(s_to_c(mp->sender));
18
	if(base != s_to_c(mp->sender)){
19
		s = mp->sender;
20
		mp->sender = s_copy(base);
21
		s_free(s);
22
	}
23
}