Masquerade support

Jari Eskelinen <[email protected]> Fri, 20 May 2005 13:45:28 +0300
Newsgroups gmane.mail.nullmailer
Message-ID <[email protected]>
Hi everyody,

I was wondering that if there is (well I know there is not, but this 
could be TODO :-) masquerading spport for sender and to -adrresses in 
nullmailer?

Let me explain. I have multiple desktop computers under my finger whose 
won't have FQDN. So I really can't define host + domain to my computers 
which would be "correct". This introduces problem: If my computers sends 
automaticly generated mail via MTA (like logcheck, chkrootkit etc. 
does), From: and envelope-from etc. addresses will have invalid address, 
like jarpatus@localhost. Most MTA's will support out-of-the-box (meaning 
configuration program can do it in most distros) masquerading of host + 
domain so I could rewrite this address to jarpatus@something which would 
be right. BUT. This requires me to have mailbox having the same username 
than I have in sender computer. What happens if, let's se, 
postmaster@localhost will send mail? It will be rewritten as 
postmaster@something and trust me, real postmaster won't like to get 
bounces because me.

So solution I see would be rewriting BOTH username and host+domain from 
outgoing mails. This is, of course, possible with all full-featured 
MTA's but really I think it's overkill to use postfix in my laptop. 
Currently I use postfix and it's sender_canonical_maps feature to 
accomplish this. Nullmailer insted seems to be just great for laptops, 
workstations etc, but AFAIK it's lacking this feature.

One cuold ask that why to bother, just send mails with sender address 
user@localhost, bounces, replies etc. will go nowhere. That's what I was 
doing before but recently my ISP changed behaviour of their SMTP sever - 
it won't accept anymore posts if From -field is invalid.

It would also be great to have possibility to rewrite To: -addresses in 
posts going to localhost. This can be, of course, accomplished with 
/etc/aliases (does. nullmailer support it?), but there is no point to 
manage aliases file when most workstations will need to send their 
system generated mails to one person only. So all local posts should e 
rewritten to go to me, no exceptions. There are little possiility of 
error with /etc/aliases, if somehow some program sends mail to user 
which for I haven't created alias for.

Summa summarum: Would this be something that could be implemented in 
nullmailer? Also if I approach this problem from wrong directiong, 
please tell me. This far I have only got laughs that 'm stupid because I 
want to read workstations emails or that I should read them locally or I 
would have to get FQDN to all my workstation or or. But if anybody have 
REAL solution, please please tell me.

Ps. Tried also masqmail, didn't really do masking like this.

Best regards,
   Jari Eskelinen