Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sendmail

0 views
Skip to first unread message

Chris

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to
Hi there,

I'm trying to set my box up so I can use the 'mail' program to send email
from a shell. There's something magical about typing 'mail whoever'
whenever one wants to send mail instead of starting up some over-featured
program. But....

I'm using sendmail as my mail agent rather than my ISPs smtp server. The
big problem her was that my mail was going out with
ch...@localhost.localdomain as the return address, I'd naturally prefer it
to be misc...@eis.net.au which is my real address. I've managed to
correct the domain but can't find a way to change my user name (as
sendmail reads it ) to 'mischief'.

If anyone can help with this I'd much appreciate it,

Thanks, and regards

Chris.


al...@tugger.net

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to
Chris <ch...@eis.net.au> wrote:
: Hi there,

: I'm using sendmail as my mail agent rather than my ISPs smtp server. The


: big problem her was that my mail was going out with
: ch...@localhost.localdomain as the return address, I'd naturally prefer it
: to be misc...@eis.net.au which is my real address. I've managed to
: correct the domain but can't find a way to change my user name (as
: sendmail reads it ) to 'mischief'.

I believe you need the line:

DMeis.net.au

in the sendmail.cf file, so your sendmail will know to masquerade as the
other server.

: If anyone can help with this I'd much appreciate it,

: Thanks, and regards

: Chris.

--
Alex Kamantauskas
Tugger Networks

Juhani Reissell

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to
Chris <ch...@eis.net.au> writes:

>
> Hi there,
>
> I'm trying to set my box up so I can use the 'mail' program to send email
> from a shell. There's something magical about typing 'mail whoever'
> whenever one wants to send mail instead of starting up some over-featured
> program. But....
>

> I'm using sendmail as my mail agent rather than my ISPs smtp server. The
> big problem her was that my mail was going out with
> ch...@localhost.localdomain as the return address, I'd naturally prefer it
> to be misc...@eis.net.au which is my real address. I've managed to
> correct the domain but can't find a way to change my user name (as
> sendmail reads it ) to 'mischief'.
>

> If anyone can help with this I'd much appreciate it,

You can use either the genericstable or the userdb feature. Here's
my .m4 file:

include(`../cf/m4/cf.m4')dnl # <-- fix the path here.
VERSIONID(`v0.1')
OSTYPE(linux)
FEATURE(`genericstable')
FEATURE(`nouucp')
FEATURE(`local_procmail', `/usr/bin/procmail')
FEATURE(`masquerade_envelope')
define(`SMART_HOST', smtp:klunssi.hki.fi)
LOCAL_CONFIG
# Class G for use with the generics table.
# The generics table is accessed with the key <user>. Class G enables lookups
# for user@{any alias to localhost}. The @{ ... } part is stripped
# before the table is accessed.
CG $j
MAILER(local)
MAILER(smtp)

From the resulting .cf file I then commented out the "do masquerading"
lines from the (local) sender rewriting rulesets (S10, S30) to look as
following:

#
# Envelope sender rewriting
#
S10
R<@> $n errors to mailer-daemon
R@ <@ $*> $n temporarily bypass Sun bogosity
R$+ $: $>50 $1 add local domain if needed
#R$* $: $>94 $1 do masquerading


#
# Header sender rewriting
#
S30
R<@> $n errors to mailer-daemon
R@ <@ $*> $n temporarily bypass Sun bogosity
R$+ $: $>50 $1 add local domain if needed
#R$* $: $>93 $1 do masquerading

This setup does three things for me:
1) all outgoing mail is relayed to smarthost (klunssi.hki.fi).
2) for outgoing mail both envelope and header sender are rewritten as
per the genericstable. (See the docs for how to set it up.)
3) no masquerading is done for local mail.

HTH,

poku

0 new messages