[wellylug] Re: sendmail probs

Ewen McNeill wellylug at ewen.mcneill.gen.nz
Sun Aug 24 13:10:02 NZST 2003


In message <20030824234738.GC5890 at Mercury>, Persian writes:
>On Sat, Aug 23, 2003 at 09:37:51 +1200, Ewen McNeill wrote:
>> - You have an entry for your computer in /etc/hosts which contains
>>   something sensible
>
>I am sorry but what is 'something sensible'?
>this is my /etc/hosts
>
>127.0.0.1       localhost.localdomain   localhost Mercury
>-------------------------------------------------

And this is why your mail is coming from "localhost.localdomain".
Your sendmail.cf file contains:

Cwlocalhost

which tells sendmail "your short name is "localhost".  The /etc/hosts
file you quote says "the full name of the short name 'localhost' is
'localhost.localdomain'", so that's what you're getting.

You can override this setting by putting a "CwSOMETHING" entry into
sendmail.mc and running make in the /etc/mail directory.

But the bigger problem is that if you don't have your own domain name
registered it's difficult to pick something "sensible" to put in their.

You _might_ be able to get away with "ihug.co.nz" as the full name
(since they're your ISP), but it's not really correct and may cause
other problems.

You _might_ also be able to avoid the problem by creating the file
/etc/mailname with one line in it:

-=- cut here -=-
ihug.co.nz
-=- cut here -=-

which tells (some) programs to use that address as the domain for your
email.

>Now also my local-host-names file is empty, so what should it say?

It is a list of other domains for which your mail server is willing to
receive mail.  You shouldn't need to put anything in there for just a
workstation.

It's ages since I've set up a workstation to use mutt, etc, where it
didn't have a registered domain name (or subdomain) to use, so I'm a bit
rusty on doing it.  (And Evolution, etc, talk directly to a remote mail
server -- eg at the ISP -- and by pass the workstation's mail server, so
they don't have this problem.)

Off the top of my head I think you might want to:
- put your normal username (ie, the one you log into your machine with)
  into /etc/mail/trusted-users  (or similar; whatever file is mentioned in the
  sendmail.cf line starting "Ft"), so you can get mutt to specify the
  address (and restart sendmail).   This tells sendmail that you're a
  honest, decent, person who can be trusted to set your email address
  properly in your mail program (ie, mutt)

- add "set envelope_from=yes" to your .muttrc and restart mutt

The "localhost.localdomain" bit should probably be hidden by that,
providing (a) you use the IHug mail server, and (b) they're willing to
accept "localhost.localdomain" (which it looks like they will for now).

Ewen



More information about the wellylug mailing list