Sending mail with Plan9

I have been fiddling with the mail setup on my CPU server.

This machine has to deliver all mail to my ISPs smtp so I set the rewrite script to rewrite.gateway. The ISPs smtp rejected my mail though because it expected a From: line different to my $user@$site or the default $fd set in remotemail. I added a

From: "ckeen" <foo@bar.com>

line to /mail/box/ckeen/headers but this does not seem to have any effect. I thus added a names.remote file with

ckeen foo@bar.com

and changed remotemail with this diff:

14c15,19
< exec /bin/upas/smtp -h $fd $addr $sender $*
---
>
> remotename=`{/bin/upas/aliasmail $sender}
> if ( test -n $remotename ) { sender = $remotename }
>
> exec /bin/upas/smtp -a  -h $fd $addr $sender $*

This does the work for me.

Code on this site is licensed under a 2 clause BSD license, everything else unless noted otherwise is licensed under a CreativeCommonsAttribution-ShareAlike3.0UnportedLicense