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