Operating System - Tru64 Unix
1830233 Members
1779 Online
109999 Solutions
New Discussion

Re: return address is from mail relay

 
SOLVED
Go to solution
Michael Schulte zur Sur
Honored Contributor

return address is from mail relay

Hi all,

how can I avoid that a mail that is sent from a Tru64 machine gets the return address of a general purpose relay, I have specified with mailsetup?

Thanks for any advice.

Michael
2 REPLIES 2
Ivan Ferreira
Honored Contributor
Solution

Re: return address is from mail relay

I think that in sendmail there is a rule that does what you don't want:

Msmtpr, P=[IPC], F=mDFMuX, S=13, R=23, A=IPC $h, E=\r\n

# (we pull off the local hostname in all cases, and then selectively add it
# back on. we would add it back if the user is root or one of the others
# for which we want to know the hostname. Otherwise we want to look like we
# are a local user on the relay machine. This is to allow for "cleaner"
# addresses when crossing mail domains. --FMA)
#
S13
R@ $@@ handle error addr "<>"
R$*<@$j>$* $>3$1$2 strip local host name
R$*<@$+>$* $:$>9$1<@$2>$3 canonicalize domain
R$=N $@$1<@$j> qualify nonhidden users
R$- $:$1??$(aliases $1 $: $) Look up local aliases
R$-??$+ $@$1<@$j> Found it - reformat
R$-?? $:$1 undo dammage
R$- $@$1<@$W> fix up return addr


S23
R$+ $@$>13$1 nothing special here

# usernames which will be @host qualified on outbound localdom mail

FN/var/adm/sendmail/local.users


Try configuring sendmail like this:

# mailsetup


MAIL SETUP

Mailsetup configures the sendmail(8) utility. This allows users
on your cluster to send and/or receive mail in a networked
environment.

Mailsetup will prompt you for information. Some of these questions
have a default answer contained within square brackets. If you
simply press , the default answer is assumed.


Continue ([y]/n) ? y


TYPE OF MAIL SETUP

You may perform a quick setup, or an advanced setup of mail. A
quick setup is ideal for workstations that wish to have all of
their mail handled by a centralized machine. Quick setup:

- Forwards all mail to a relay machine. This implies
that users can create and send mail, but cannot read
it on the cluster.

- Formats the mail so that it looks as it was created on
the relay.

- Uses TCP/IP (SMTP) to send the mail to the relay.

- Since no mail is delivered locally, to read your mail
you must login to another host. Usually this is
a central time share machine.


Do you wish to do a quick setup ([y]/n) ? n


HOST DEFINITION

The unqualified hostname is the cluster alias for this cluster
without the domain extension. For example: a cluster called
`foo.dec.com' would have an unqualified name of `foo'.


Enter the unqualified cluster alias for this cluster [ clu-test ]:

[ clu-test ] is this correct ([y]/n) ? y


DOMAIN DEFINITION

If your cluster is part of a registered domain, that name should
be defined here. Some example domains are ZK3.DEC.COM, MIT.EDU,
CSS.GOV and CS.INDIANA.EDU.

If you do not have a domain, enter `LOCAL' here.


Enter the DNS (BIND) domain name for this cluster [ asu.personal.com.py ]:

[ asu.personal.com.py ] is this correct ([y]/n) ? y


TOP LEVEL DOMAIN DEFINITION

A top level domain is needed if your organization uses any other
protocols besides TCP/IP to deliver mail (e.g. DECnet or UUCP).
The top domain is used to encapsulate mail addresses for these
non-IP protocols before sending mail out over the Internet.

An example of a top domain is `DEC.COM'. `DEC.COM' is the top
domain for the `ZK3.DEC.COM' domain.

Enter the Top domain name for this cluster [ com.py ]:

[ com.py ] is this correct ([y]/n) ? n
Do you wish to leave this entry blank?

Blank entry (y/[n]) ? n

Enter the Top domain name for this cluster [ com.py ]: personal.com.py

[ personal.com.py ] is this correct ([y]/n) ? y


ADDING A GENERAL RELAY

Most sites should define a general relay. If your cluster cannot
resolve how to deliver a mail message, the mail is forwarded to
this general relay for processing.


Do you wish to add a general purpose relay ([y]/n) ? y

Use the fully qualified name if the relay is a TCP/IP node.


Enter the general purpose relay [ ]: mail.personal.com.py

[ mail.personal.com.py ] is this correct ([y]/n) ? y


TRANSPORT FOR GENERAL RELAY

What protocol do you wish to use when you forward mail to your
general relay? If it is a TCP/IP node, enter `tcp'; if you
send mail to the relay via UUCP, enter `uucp'.

If you use any other protocol besides TCP/IP to send mail to
the general relay, you must configure and set up that protocol.

Enter the transport used to send to relay (tcp or uucp)

Enter the transport [ tcp ]:

[ tcp ] is this correct ([y]/n) ? y


SETUP OF SMTP RELAY FORWARDING POLICY

Many sites cannot send mail directly throughout the Internet.
Typically, these sites can directly reach any host within their
top-level-domain (e.g. any mail address ending in `personal.com.py'),
but to send mail outside of their local area, they use a relay
to forward their mail.

This section allows you to select which messages to forward to
your general relay. It is suggested that you send as much mail
directly to its final destination as you can, and send all the
rest to your relay (mail.personal.com.py).

You can set up your SMTP mail relay forwarding in one of the
following ways:

1) Send all mail outside of top domain (personal.com.py) to relay.
2) Send all mail outside of local domain (asu.personal.com.py) to relay.
3) Send all mail not local to this cluster (clu-test) to relay.

Enter the relay policy [ 1 ]: 2

[ 2 ] is this correct ([y]/n) ? y



MAIL HUB/CENTRAL MAIL SERVER

A Mail Hub is a machine that can handle mail sent to `user@domain'.
It has aliases for everyone in your local domain. When it receives
mail addressed to `user@asu.personal.com.py', it looks up `user' in the
alias file and forwards the mail to its final destination.

Note: if you are planning mail for your site, it is recommended
that you configure at least one host as a Mail Hub and set up
DNS (BIND) MX records. The MX records will direct mail sent
to `@asu.personal.com.py' to your Mail Hub.

Is clu-test a Mail Hub (y/[n]) ? y


SHARING A COMMON ALIAS FILE

A Common Alias file creates the illusion that everyone in your local
domain exists on a single machine. This means that instead of
sending mail to `user@host.asu.personal.com.py', you can send it to `user',
regardless of which machine that their mailbox resides on.

Do you want *all* machines in your local domain (asu.personal.com.py)
to share a common alias file identifying every user in your
domain? This is usually done by YP, DNS (BIND), or by copying an
alias file to all the hosts in your domain.


Is clu-test sharing a common alias file (y/[n]) ? n



TCP RETURN ADDRESS FORMAT

When mail leaves your local domain (asu.personal.com.py), your return
address needs to be qualified. You can qualify it in one of the
following ways:

1) sender@clu-test.asu.personal.com.py - qualify with your cluster name.
2) sender@mail.personal.com.py - qualify with your relay's name.
3) sender@asu.personal.com.py - qualify with only your domain name.

Option #3 (`asu.personal.com.py') is recommended, but requires at least one
host in your local domain to be configured as a Mail Hub.
Mailsetup was unable to find any Mail Hubs for your domain.


Enter the tcp address format [ 3 ]: 1

[ 1 ] is this correct ([y]/n) ? y


LOCAL USERS AND ALIASES

Some user names, such as `root', `daemon', and `system', are
common to all machines. To avoid confusion any outgoing mail
sent by these local users are always qualified with your
cluster's name, e.g. "From: root@clu-test".

The following is the list of local users:

daemon imap mailer-daemon news nobody pop
postmaster rdist root uucp

Do you wish to modify this local users/aliases list (y/[n]) ? n

Do you want aliases in /var/adm/sendmail/aliases to be considered local?

Aliases considered local ([y]/n) ? y
UUCP SECTION

This section sets up your machine for UUCP mail. If you use UUCP
at your site or need to set up a UUCP relay answer `yes' to the
the following question.


Do you wish to recognize UUCP style addresses ([y]/n) ? n


DECnet SECTION

This section sets up your machine for DECnet mail. If you use
DECnet in your organization, or need to deal with DECnet style
addresses answer `yes' to the following question.


Do you wish to recognize DECnet style addresses ([y]/n) ? n


UMC SECTION

This section sets up your machine for UMC mail. If you use UMC
at your site or need to deal with UMC style addresses answer `yes'
to the following question.


Do you wish to recognize UMC style addresses ([y]/n) ? n


NICKNAMES FOR THIS CLUSTER

Are there any other names that are used to send mail to this
cluster? For instance, if you have changed this cluster's alias (or
plan to in the near future), a nickname allows sendmail to
recognize both names, "clu-test" and the nickname, as synonyms
for this cluster.

Another good use for nicknames occurs when a cluster receives mail
from multiple different networks. A cluster's alias may not be the
same on all of the different networks. Again, nicknames allow
sendmail to recognize these different names as synonyms for this
cluster.

The node members and the cluster alias for this cluster will get
added to the list of nicknames. We recommend that you do not
delete them, as mailsetup will append the node members
and the cluster alias to the list of nicknames.


Do you wish to enter nicknames for this cluster (y/[n]) ? n


MAILSETUP CONFIGURATION COMPLETE

Do you wish to complete the installation? If you answer `yes',
the new configuration will replace `sendmail.cf', and sendmail
will be restarted.


Complete the setup ([y]/n) ?

Restarting sendmail...
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Michael Schulte zur Sur
Honored Contributor

Re: return address is from mail relay

Hi Ivan,

that did the trick. It seems that the quick setup chooses to qualify the return address with the relay address. I ran the non quick setup and then the return address became the host that sent the mail.

greetings,

Michael