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

Exim configuration issue: sending from different domain

389 views
Skip to first unread message

Haines Brown

unread,
Apr 29, 2012, 10:41:07 AM4/29/12
to
I'm running Debian Squeeze, with exim4, and using mutt for mail.

My machine has this:

$ hostname --fqdn
engels.HistoricalMaterialism.info

However, for mail I use hai...@histomat.net, which I also own. Outgoing
messages fall into a black hole, particularly with email lists to which
I subscribed with the histomat.net address. I fiddled with different
configurations for exim without luck, and the manual is way over my
head.

For example, in exim4-reconfiguration I have:

mail sent by smarthost; received via SMTP or fetchmail

System mail name: histomat.net

Is "system mail name" just the domain for email (histomat.net), the
message envelope, and not the system name (historicalmaterialism.info)?

Outgoing smarthost: mail.historicalmaterialism.info::587

Does this refer to the actual host (historical materialism) or to the
envelope address for mail?

Hide local mailname: Yes (since my local mail name is for
historicalmaterialism.info domain, I figure I have to do this)

Visible domainname: histomat.net

I assume this only affects the header and has nothing to do with
whether the mail server will accept my messages.

Which exim configuration sets the envelope address?

Haines Brown

Richard Kettlewell

unread,
Apr 29, 2012, 12:11:56 PM4/29/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> I'm running Debian Squeeze, with exim4, and using mutt for mail.
>
> My machine has this:
>
> $ hostname --fqdn
> engels.HistoricalMaterialism.info
>
> However, for mail I use hai...@histomat.net, which I also own.
> Outgoing messages fall into a black hole, particularly with email
> lists to which I subscribed with the histomat.net address. I fiddled
> with different configurations for exim without luck, and the manual is
> way over my head.

The Debian exim4 configuration is documented at:
http://pkg-exim4.alioth.debian.org/README/README.Debian.html

However, I've long found it easier to ignore it and write a
configuration by hand using the Exim manual.

> For example, in exim4-reconfiguration I have:
>
> mail sent by smarthost; received via SMTP or fetchmail
>
> System mail name: histomat.net
>
> Is "system mail name" just the domain for email (histomat.net), the
> message envelope,

Yes.

> and not the system name (historicalmaterialism.info)?
>
> Outgoing smarthost: mail.historicalmaterialism.info::587
>
> Does this refer to the actual host (historical materialism) or to the
> envelope address for mail?

The former.

> Hide local mailname: Yes (since my local mail name is for
> historicalmaterialism.info domain, I figure I have to do this)
> Visible domainname: histomat.net

Setting 'hide local mailname' only makes sense if you use a different
visible domain name from the system mailname.

> I assume this only affects the header and has nothing to do with
> whether the mail server will accept my messages.
>
> Which exim configuration sets the envelope address?

The envelope address should be <username>@<mailname>.

You should have a look at your logfiles, which hopefuly will make it
clear what addresses are actually being used in practice.

--
http://www.greenend.org.uk/rjk/

Haines Brown

unread,
Apr 30, 2012, 8:40:08 AM4/30/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

> Haines Brown <hai...@historicalMaterialism.info> writes:
>> I'm running Debian Squeeze, with exim4, and using mutt for mail.
>>
>> My machine has this:
>>
>> $ hostname --fqdn
>> engels.HistoricalMaterialism.info
>>
>> However, for mail I use hai...@histomat.net, which I also own.
>> Outgoing messages fall into a black hole, particularly with email
>> lists to which I subscribed with the histomat.net address. I fiddled
>> with different configurations for exim without luck, and the manual is
>> way over my head.

Richard, thank you for the clarifications.

>> Outgoing smarthost: mail.historicalmaterialism.info::587
>>
>> Does this refer to the actual host (historical materialism) or to the
>> envelope address for mail?
>
> The former.

OK. Since I'm using two email accounts simultaneouly, I reconfigured
exim4 to use a semicolon-separated list of both outgoing smart hosts:

mail.historicalmaterialism.info::587;mail.histomat.net::587

Incidentally, neither can be pinged, although I can ping
mail.histomat.info. I own this domain, but don't have it set up for
mail.

An oddity I just noticed is:

$ domainname
(none)

In /etc/hosts I have:

127.0.1.1 engels.HistoricalMaterialism.info engels

My /etc/resolv.conf has a line for the nameserver address, but no
domain or search lines.

I would like to test exim4. It seems the way to do this is to use

# exim -bhc 192.168.0.100

I use this to send a message from one of my email addresses to
the other. However, I get:

...
mail from:hai...@histomat.net
>>> using ACL "acl_check_mail"
>>> processing "accept"
>>> accept: condition test succeeded
250 OK
rcpt to:bro...@historicalmaterialism.info
>>> using ACL "acl_check_rcpt"
>>> processing "accept"
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed
>>> processing "deny"
>>> check domains = +local_domains
>>> historicalmaterialism.info in "@:localhost"? no (end of list)
>>> historicalmaterialism.info in "+local_domains"? no (end of list)
>>> deny: condition test failed
>>> processing "deny"
...

Shouldn't I be able to do this?

Haines


J G Miller

unread,
Apr 30, 2012, 8:55:21 AM4/30/12
to
On Monday, April 30th, 2012 08:40:08 -0400, Haines Brown wrote:

> OK. Since I'm using two email accounts simultaneouly, I reconfigured
> exim4 to use a semicolon-separated list of both outgoing smart hosts:
>
> mail.historicalmaterialism.info::587;mail.histomat.net::587

I do not think you understand the purpose of the smarthost specification.

Does the documentation say that you can use "::" to specify a port?

The smarthost is where mail which is routed to go via smarthost is sent.

> I own this domain, but don't have it set up for mail.

So sending e-mail messages to it for routing on elsewhere is not
going to do any good, is it?


> An oddity I just noticed is:
>
> $ domainname
> (none)

That is not an oddity but your lack of understanding what domainname
command does.

domainname - show or set the system's NIS/YP domain name

Since you do not have NIS installed on your system, it is not
going to show a NIS domain name.

> >>> check hosts = :
> >>> host in ":"? no (end of list)

I think this is just proving the point that you cannot use ::

Richard Kettlewell

unread,
Apr 30, 2012, 9:50:06 AM4/30/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> Richard Kettlewell <r...@greenend.org.uk> writes:
>> Haines Brown <hai...@historicalMaterialism.info> writes:

>>> Outgoing smarthost: mail.historicalmaterialism.info::587
>>>
>>> Does this refer to the actual host (historical materialism) or to the
>>> envelope address for mail?
>>
>> The former.
>
> OK. Since I'm using two email accounts simultaneouly, I reconfigured
> exim4 to use a semicolon-separated list of both outgoing smart hosts:
>
> mail.historicalmaterialism.info::587;mail.histomat.net::587
>
> Incidentally, neither can be pinged, although I can ping
> mail.histomat.info. I own this domain, but don't have it set up for
> mail.

That's just two different names for the same IP address. Listing it
twice won't do anything very useful. The important thing is that it
must be configured accept your outbound email.

> An oddity I just noticed is:
>
> $ domainname
> (none)

domainname is a NIS tool; ignore.
That doesn't seem to be a complete session.

--
http://www.greenend.org.uk/rjk/

Richard Kettlewell

unread,
Apr 30, 2012, 9:50:39 AM4/30/12
to
J G Miller <mil...@yoyo.ORG> writes:
> Haines Brown wrote:

>> OK. Since I'm using two email accounts simultaneouly, I reconfigured
>> exim4 to use a semicolon-separated list of both outgoing smart hosts:
>>
>> mail.historicalmaterialism.info::587;mail.histomat.net::587
>
> I do not think you understand the purpose of the smarthost specification.
>
> Does the documentation say that you can use "::" to specify a port?

Perhaps you should try reading it!

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
Apr 30, 2012, 12:02:24 PM4/30/12
to
On Monday, April 30th, 2012, at 14:50:39h +0100, Richard Kettlewell exclaimed:

>> Does the documentation say that you can use "::" to specify a port?
>
> Perhaps you should try reading it!

It is not I who is having the problem configuring exim, so perhaps your
advice would be better conveyed to the original poster.

And this is your standard response when anybody asks a question about
what the documentation actually says? You are being just as rude
as saying RTFM.

And the answer is yes, using a :: is the correct format for
specifying a port number in the Debian configuration.

Richard Kettlewell

unread,
Apr 30, 2012, 12:12:48 PM4/30/12
to
J G Miller <mil...@yoyo.ORG> writes:
> Richard Kettlewell exclaimed:

>>> Does the documentation say that you can use "::" to specify a port?
>>
>> Perhaps you should try reading it!
>
> It is not I who is having the problem configuring exim, so perhaps
> your advice would be better conveyed to the original poster.

They weren't showing any signs of pontificating on the question from a
position of wilful ignorance.

--
http://www.greenend.org.uk/rjk/

Haines Brown

unread,
Apr 30, 2012, 2:13:30 PM4/30/12
to
J G Miller <mil...@yoyo.ORG> writes:

> On Monday, April 30th, 2012 08:40:08 -0400, Haines Brown wrote:
>
>> OK. Since I'm using two email accounts simultaneouly, I reconfigured
>> exim4 to use a semicolon-separated list of both outgoing smart hosts:
>>
>> mail.historicalmaterialism.info::587;mail.histomat.net::587
>
> I do not think you understand the purpose of the smarthost specification.

No, I don't. For one thing, "smart host" seems to characterize both my
own machine and that of the recipient mail server. Here I combined the
addresses of the outgoing smart host mail servers on which I have mail
accounts. Does this not simply duplicate the mail received by the
recipient? Shouldn't outgoing mail work with either address? Does the
choice make any difference, since both mail servers should work?

Haines

Haines Brown

unread,
Apr 30, 2012, 2:26:17 PM4/30/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

> Haines Brown <hai...@historicalMaterialism.info> writes:
>> Richard Kettlewell <r...@greenend.org.uk> writes:
>>> Haines Brown <hai...@historicalMaterialism.info> writes:

>> OK. Since I'm using two email accounts simultaneouly, I reconfigured
>> exim4 to use a semicolon-separated list of both outgoing smart hosts:
>>
>> mail.historicalmaterialism.info::587;mail.histomat.net::587

> That's just two different names for the same IP address. Listing it
> twice won't do anything very useful. The important thing is that it
> must be configured accept your outbound email.

OK, so both addresses for the outgoing smart host should work? I should
go back to just one. Does it make any difference which I use as long as
I have mail accounts on both servers?

>> I would like to test exim4. It seems the way to do this is to use
>>
>> # exim -bhc 192.168.0.100
>>
>> I use this to send a message from one of my email addresses to
>> the other. However, I get:

> That doesn't seem to be a complete session.

It's not. I assumed the first failure sufficed. Here's the whole baby:

# exim -bhc 192.168.0.100

**** SMTP testing session as if from host 192.168.0.100
**** but without any ident (RFC 1413) callback.
**** This is not for real!

>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? yes (matched "*")
>>> looking up host name for 192.168.0.100
>>> IP address lookup using gethostbyaddr()
>>> IP address lookup failed: h_errno=1
LOG: no host name found for IP address 192.168.0.100
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
220 engels.HistoricalMaterialism.info ESMTP Exim 4.72 Mon, 30 Apr 2012 14:19:40 -0400
helo mail
>>> mail in helo_lookup_domains? no (end of list)
250 engels.HistoricalMaterialism.info Hello mail [192.168.0.100]
mail from: hai...@histomat.net
>>> using ACL "acl_check_mail"
>>> processing "accept"
>>> accept: condition test succeeded
250 OK
rcpt to: glo...@gloriabrownministry.net
>>> using ACL "acl_check_rcpt"
>>> processing "accept"
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed
>>> processing "deny"
>>> check domains = +local_domains
>>> gloriabrownministry.net in "@:localhost"? no (end of list)
>>> gloriabrownministry.net in "+local_domains"? no (end of list)
>>> deny: condition test failed
>>> processing "deny"
>>> check domains = !+local_domains
>>> gloriabrownministry.net in "!+local_domains"? yes (end of list)
>>> check local_parts = ^[./|] : ^.*[@%!`#&?] : ^.*/\\.\\./
>>> gloria in "^[./|] : ^.*[@%!`#&?] : ^.*/\.\./"? no (end of list)
>>> deny: condition test failed
>>> processing "accept"
>>> check local_parts = postmaster
>>> gloria in "postmaster"? no (end of list)
>>> accept: condition test failed
>>> processing "deny"
>>> check !acl = acl_local_deny_exceptions
>>> using ACL "acl_local_deny_exceptions"
>>> processing "accept"
>>> check hosts = ${if exists{/etc/exim4/host_local_deny_exceptions}{/etc/exim4/host_local_deny_exceptions}{}}
>>> host in ""? no (end of list)
>>> accept: condition test failed
>>> processing "accept"
>>> check senders = ${if exists{/etc/exim4/sender_local_deny_exceptions}{/etc/exim4/sender_local_deny_exceptions}{}}
>>> hai...@histomat.net in ""? no (end of list)
>>> accept: condition test failed
>>> processing "accept"
>>> check hosts = ${if exists{/etc/exim4/local_host_whitelist}{/etc/exim4/local_host_whitelist}{}}
>>> host in ""? no (end of list)
>>> accept: condition test failed
>>> processing "accept"
>>> check senders = ${if exists{/etc/exim4/local_sender_whitelist}{/etc/exim4/local_sender_whitelist}{}}
>>> hai...@histomat.net in ""? no (end of list)
>>> accept: condition test failed
>>> end of ACL "acl_local_deny_exceptions": implicit DENY
>>> check senders = ${if exists{/etc/exim4/local_sender_callout}{/etc/exim4/local_sender_callout}{}}
>>> hai...@histomat.net in ""? no (end of list)
>>> deny: condition test failed
>>> processing "accept"
>>> check hosts = +relay_from_hosts
>>> host in ": 127.0.0.1 : ::::1"? no (end of list)
>>> host in "+relay_from_hosts"? no (end of list)
>>> accept: condition test failed
>>> processing "accept"
>>> check authenticated = *
>>> accept: condition test failed
>>> processing "require"
>>> check domains = +local_domains : +relay_to_domains
>>> gloriabrownministry.net in "empty"? no (end of list)
>>> gloriabrownministry.net in "+local_domains : +relay_to_domains"? no (end of list)
>>> require: condition test failed
550 relay not permitted
LOG: H=(mail) [192.168.0.100] F=<hai...@histomat.net> rejected RCPT glo...@gloriabrownministry.net: relay not permitted
data
503-All RCPT commands were rejected with this error:
503-relay not permitted
503 valid RCPT command must precede DATA

Haines

Richard Kettlewell

unread,
Apr 30, 2012, 2:41:19 PM4/30/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> Richard Kettlewell <r...@greenend.org.uk> writes:
>> Haines Brown <hai...@historicalMaterialism.info> writes:
>>> Richard Kettlewell <r...@greenend.org.uk> writes:
>>>> Haines Brown <hai...@historicalMaterialism.info> writes:

>>> OK. Since I'm using two email accounts simultaneouly, I reconfigured
>>> exim4 to use a semicolon-separated list of both outgoing smart hosts:
>>>
>>> mail.historicalmaterialism.info::587;mail.histomat.net::587
>>
>> That's just two different names for the same IP address. Listing it
>> twice won't do anything very useful. The important thing is that it
>> must be configured accept your outbound email.
>
> OK, so both addresses for the outgoing smart host should work? I should
> go back to just one. Does it make any difference which I use as long as
> I have mail accounts on both servers?

The name you use to reach it is completely irrelevant; all that matters
is that the computer it identifies is configured to send your mail on to
its destination.
I suspect you've not filled in "Machines to relay mail for" correctly,
i.e. whatever it's set to doesn't include that IP address.

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
Apr 30, 2012, 4:20:28 PM4/30/12
to
On Monday, April 30th, 2012, at 14:13:30h -0400, Haines Brown wrote:

> For one thing, "smart host" seems to characterize both my
> own machine and that of the recipient mail server.

QUOTE
A Smart Host is an SMTP server that will accept mail from
another server and then deliver the mail for that server.
UNQUOTE

So there is your originating host which you use an MUA (mail
user agent, eg mutt) which does have an MTA (mail transfer agent, eg exim4)
but this does not try to deliver mail to its fail destination but
merely passes it on to the "smarthost" MTA which decides how and where
to send the message.


MUA ---------> MTA -----> MTA ==========> Internet ====> remote delivery

mutt exim4 smart host


The smart host could be within your LAN or more typically an
external site eg the ISP outgoing mail host.

A typical example of how a smart host is used is, a user has
a machine connected to an ISP. The ISP blocks all outgoing
port 25 traffic from its customers in order to curb spam.

It is therefore necessary for the user to pass their outgoing
e-mail to the ISP mailer (the smarthost) in order for the mail
to be delivered.

The other advantage of this is that the e-mail message is delivered
as coming from a verifiable IP address of that of the ISP's e-mail
server, whereas mail sent directly from your machine may be rejected
by some remote sites as being non-valid because the "From" address
host-name does not match the IP address reverse lookup.

I hope this explains the purpose of the smart host.

Now do I understand correctly, or have I misunderstood from your
question

"Which exim configuration sets the envelope address?"

that what you in fact want to do is to re-write the e-mail
headers to show your genuine official external e-mail address{es}
in the From and maybe Reply-tof fields and not that of your local
network or that of your ISP?

In that case you need to invoke re-writing rules on outgoing
e-mails.

To give an example, in my local network e-mail is exchanged
with a fake domain name which must never appear on e-mail
sent to external sites and must use my real external e-mail
address as shewn in the header of this Usenet message.

This is where the file email-addresses comes into play.
The default location is /etc, but I have tweaked the exim4
configuration so that it is located under /etc/exim4.

I have setup a specific transport for e-mail going off site
remote_smtp-smarthost (as opposed to remote_smtp which is
used for mail delivery via SMTP to other hosts on the LAN)
which then invokes rewriting of the e-mail header using
the data in the /etc/exim4/email-addresses

remote_smtp_smarthost:
driver = smtp
debug_print = "Transport: remote_smtp_smarthost for $local_part@$domain"
headers_rewrite = CHECK_HEADERS_REWRITE \
${lookup{$1}lsearch{CONFDIR/email-addresses}{$value}fail}
hosts_try_auth = <; \
${if exists{CONFDIR/passwd.client}\
{${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$host_address}}}\
{}}
return_path = ${if match{$return_path}{CHECK_RETURN_PATH}\
{${lookup{$1}\
lsearch{CONFDIR/email-addresses}{$value}fail}}\
fail}

The format of the email-addresses file is

local_username: mailu...@realmailhost.realdomain

which would be something like

fred: frederi...@mail.hanover.org

In my case I have a macro definition in 01_exim4-config_listmacrosdefs

MAIN_SMTP_SMARTHOST = smtp.my_isp.com

This machine obviously must be configured with an MTA to receive
mail and to forward it to its intended recipients.

since I do not use the Debian "all in one magic" config file for dpkg-reconfigure, but
do have individual configuration files using macro definitions under conf.d

> Here I combined the addresses of the outgoing smart host mail servers
> on which I have mail accounts.

But that is not going to do what you want. It does not rewrite the
mail headers but merely sends the message as is to those hosts and
since you say one of them is not configured for mail, it is is going
to fail when it tries to connect to that.

I apologize in advance if the above is decreed to be

John F. Morse

unread,
Apr 30, 2012, 5:08:02 PM4/30/12
to
It could be neither!

http://en.wikipedia.org/wiki/Smart_host

One example I use:

Exim4 (configured to use a Smart Host) =>

Smart Host (my Postfix MTA) =>

My ISP's MTA (a Smart Host) =>

The recipient's ISP

Then it could be the Recipient's MTA and/or MDA, or the recipient could
POP3/IMAP into his ISP's MDA.


--
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?

John F. Morse

unread,
Apr 30, 2012, 5:14:37 PM4/30/12
to
J G Miller wrote:

> QUOTE
> A Smart Host is an SMTP server that will accept mail from
> another server and then deliver the mail for that server.
> UNQUOTE
>


--- another server and then deliver the mail for that server.

+++ another server and then relay the mail for that server to
+++ another server.

;-)

Joe

unread,
Apr 30, 2012, 6:01:43 PM4/30/12
to
On Sun, 29 Apr 2012 10:41:07 -0400
Haines Brown <hai...@historicalMaterialism.info> wrote:

> I'm running Debian Squeeze, with exim4, and using mutt for mail.
>
> My machine has this:
>
> $ hostname --fqdn
> engels.HistoricalMaterialism.info
>

> However, for mail I use hai...@histomat.net, which I also own.
> Outgoing messages fall into a black hole, particularly with email
> lists to which I subscribed with the histomat.net address. I fiddled
> with different configurations for exim without luck, and the manual
> is way over my head.
>
> For example, in exim4-reconfiguration I have:
>
> mail sent by smarthost; received via SMTP or fetchmail
>
> System mail name: histomat.net
>
> Is "system mail name" just the domain for email (histomat.net), the
> message envelope, and not the system name
> (historicalmaterialism.info)?
>
> Outgoing smarthost: mail.historicalmaterialism.info::587
>
> Does this refer to the actual host (historical materialism) or to the
> envelope address for mail?

It refers to a real SMTP server somewhere else. If your system has only
one SMTP server, and that server is expected to send outgoing mail
directly to the destination SMTP server, there is no smarthost
involved. The correct category in exim4-reconfigure is just Internet
site. Workstations will use this machine as a smarthost.

An SMTP server will use another SMTP server as a smarthost in order
that all outgoing mail passes through the smarthost. This is normally
done if the local SMTP server is unable to send mail directly e.g. if
it is on a dynamic public IP address. A smarthost generally requires
authentication, and may use encryption. It is possible to use a
smarthost for some domains only, or several different smarthosts for
different domains, which requires learning a bit about 'transports' and
'routers' in exim4.
>
> Hide local mailname: Yes (since my local mail name is for
> historicalmaterialism.info domain, I figure I have to do this)
>
> Visible domainname: histomat.net
>
> I assume this only affects the header and has nothing to do with
> whether the mail server will accept my messages.
>
> Which exim configuration sets the envelope address?
>

/etc/mailname sets the default email domain name. If you create an
email in mutt as the user fred, this is what will be appended to
'fred@'. This is what most people need, and what will happen if you
don't explicitly override it elsewhere. If you use a full email address
when creating an email, this will override the default. You can set up
several accounts in email clients which can send 'from' different
domains. You can also set up explicit default email addresses for
various users in /etc/email-addresses.

Most exim4 configurations are in /etc/exim4.

The exim4-config questionnaire changes the file update-exim4.conf.conf,
which is then used by the command update-exim4.conf. This is the
preferred configuration file for everything that can be done here, and
that covers most simple installations. You can manually edit this file,
and it has a man page, which is worth reading even if you don't intend
manual editing. Running the questionnaire again will recreate this file
and lose any manual edits.

There is also a large and scary file called exim4.conf.template, or
optionally, the directory conf.d contains the same set of configuration
options split into small files. Either one or the other method is used,
and the value dc_use_split_config in update-exim4.conf.conf determines
which.

The file exim4.conf.localmacros contains miscellaneous system-wide
configurations which are used in exim4.conf.template. For the list of
macros, see the exim4 specification document. Again, anything that can
be done here rather than in exim4.conf.template should be done here.

The FQDN in the outgoing email HELO can be automatically determined,
but the name of the exim4 host may not be the name you wish to send as
HELO. The value of primary_hostname in exim4.conf.template or in
conf.d/main/01_exim4-config_listmacrodefs will override the automatic
setting. The HELO hostname must exist as an A record in public DNS for
most mail servers (including mine) to accept directly-sent email. Or
you can leave exim4 to make the HELO automatically, and create an A
record for that with your domain host for that domain.

The big problem with exim4 is that it is extremely versatile, and the
same thing may be done in several different ways, only one of which is
the best way. Doing something the right way now may not work because of
something else done previously.

If you have only used the questionnaire, then you are probably OK, and
redoing it will remove previous changes. Here's a slightly edited
version of my update-exim4.conf.conf. I do have extensive changes made
in exim4.conf.template, but I don't think they override anything here.

# This is a Debian specific file

dc_eximconfig_configtype='internet'
dc_other_hostnames='..[several domains here]..'
dc_local_interfaces=''
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='192.168.99.0/24:192.168.115.0/24'
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home'

The dc_relay_nets should include all addresses from which you are
prepared to relay unconditionally, generally your local workstations.
The server itself is automatically included, as many applications will
want to send email. I use several domain names, but I don't need to
list them explicitly as dc_relay_domains as all the email comes from
machines in these networks.

I have a local DNS server, if you don't you might want to set
dc_minimaldns='true'. The dc_localdelivery is correct for maildirs, as
I use an IMAP server, the default is mail_spool.

My primary_hostname value is 'mail.jretrading.com', for which I have
an A record which points to my IP address. It happens to also be my MX
record, but that isn't essential.

I hope this is enough to get you going.

--
Joe

Haines Brown

unread,
Apr 30, 2012, 9:25:33 PM4/30/12
to
J G Miller <mil...@yoyo.ORG> writes:

> On Monday, April 30th, 2012, at 14:13:30h -0400, Haines Brown wrote:
>
>> For one thing, "smart host" seems to characterize both my
>> own machine and that of the recipient mail server.
>
> QUOTE
> A Smart Host is an SMTP server that will accept mail from
> another server and then deliver the mail for that server.
> UNQUOTE

From exim4-config: "mail sent by smarthost; received via SMTP or
fetchmail." I read this as: outgoing mail send from a smarthost and
incoming received from a smarthost mail server.

> I hope this explains the purpose of the smart host.

Yes it does. Thank you.

>
> Now do I understand correctly, or have I misunderstood from your
> question
>
> "Which exim configuration sets the envelope address?"
>
> that what you in fact want to do is to re-write the e-mail
> headers to show your genuine official external e-mail address{es}
> in the From and maybe Reply-tof fields and not that of your local
> network or that of your ISP?

No. My machine set up with this hostname:

$ hostname -f
engels.HistoricalMaterialism.info

But I subsequently created a domain mail account: histomat.net, and
I have been using that address to send mail.

In fact there may have been a clash between emacs configuration and the
value I had for /etc/mailname, which was histomat.net. When I changed it
to historicalmaterialism.info, some mail from a couple days ago may have
been sent from a cache, for it suddently showed up on a list. But
success not verified yet.

> I apologize in advance if the above is decreed to be "pontificating on
> the question from a position of wilful ignorance."

Your explanations very much appreciated.

Haines BArown

Haines Brown

unread,
Apr 30, 2012, 9:43:56 PM4/30/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

Haines Brown <hai...@historicalMaterialism.info> writes:

>>>> I would like to test exim4. It seems the way to do this is to use
>>>>
>>>> # exim -bhc 192.168.0.100

>> It's not. I assumed the first failure sufficed. Here's the whole baby:
>>
>> # exim -bhc 192.168.0.100

>> 550 relay not permitted
>> LOG: H=(mail) [192.168.0.100] F=<hai...@histomat.net> rejected RCPT glo...@gloriabrownministry.net: relay not permitted
>> data
>> 503-All RCPT commands were rejected with this error:
>> 503-relay not permitted
>> 503 valid RCPT command must precede DATA
>
> I suspect you've not filled in "Machines to relay mail for" correctly,
> i.e. whatever it's set to doesn't include that IP address.

You've lost me. "Machines to relay mail for" in exim4-reconfig I have
always left blank, and I believe my mail system worked until I changed
something else.

If my hostname is engels.historicalmaterialism.info, and that is what is
in /etc/mailname, and that is what I have for "system mail name" in
exim4-reconfig, and the "name of outgoing smarthost" is
mail.historicalmaterialism.info::587, then I would think mail should go
out whether or not I "hide local mail name in outgoing mail".

Does not mail relaying mean that I ask my machine to relay incoming mail
to some other host? Besides, my machine here (its router) does not have
a fixed IP address, but is assigned an address at the whim of the gods.

Haines

Richard Kettlewell

unread,
May 1, 2012, 4:14:56 AM5/1/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:

> Richard Kettlewell <r...@greenend.org.uk> writes:
>
> Haines Brown <hai...@historicalMaterialism.info> writes:
>
>>>>> I would like to test exim4. It seems the way to do this is to use
>>>>>
>>>>> # exim -bhc 192.168.0.100
>
>>> It's not. I assumed the first failure sufficed. Here's the whole baby:
>>>
>>> # exim -bhc 192.168.0.100
>
>>> 550 relay not permitted
>>> LOG: H=(mail) [192.168.0.100] F=<hai...@histomat.net> rejected RCPT glo...@gloriabrownministry.net: relay not permitted
>>> data
>>> 503-All RCPT commands were rejected with this error:
>>> 503-relay not permitted
>>> 503 valid RCPT command must precede DATA
>>
>> I suspect you've not filled in "Machines to relay mail for" correctly,
>> i.e. whatever it's set to doesn't include that IP address.
>
> You've lost me. "Machines to relay mail for" in exim4-reconfig I have
> always left blank, and I believe my mail system worked until I changed
> something else.

What was the "something else" that you changed?

> If my hostname is engels.historicalmaterialism.info, and that is what is
> in /etc/mailname, and that is what I have for "system mail name" in
> exim4-reconfig, and the "name of outgoing smarthost" is
> mail.historicalmaterialism.info::587, then I would think mail should go
> out whether or not I "hide local mail name in outgoing mail".

It's nothing to do with any of those settings.

> Does not mail relaying mean that I ask my machine to relay incoming mail
> to some other host?

Relaying means receiving mail from some other machine and delivering it
non-locally.

The 'exim -bhc' command tells your local exim to report what it would do
for an inbound connection from 192.168.0.100. If you've not done
anything to tell it that 192.168.0.100 is authorized to send mail
through your exim, then the mail will be rejected. That's what the
'machines to relay for' setting is for.

This is nothing new; it has always worked like that.

> Besides, my machine here (its router) does not have a fixed IP
> address, but is assigned an address at the whim of the gods.

Then you will need to specify an address range.

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
May 1, 2012, 5:04:31 AM5/1/12
to
On Mon, 30 Apr 2012 21:25:33 -0400, Haines Brown wrote:

> No.

I am afraid I have lost the plot entirely then. ;)

Could you please explain in simple terms, what it is
that you want to do then?

> My machine set up with this hostname:
>
> $ hostname -f
> engels.HistoricalMaterialism.info

Do you want that name to appear in your From and Reply To
fields of outgoing messages?

> But I subsequently created a domain mail account: histomat.net, and
> I have been using that address to send mail.

Please explain in what way you have been "using that address".

Is histomat.net a real host on the Internet or an MX record
pointing to a real host on the Internet configured with an
MTA to send an receive e-mail?

> In fact there may have been a clash between emacs configuration

I thought you said you used mutt for writing e-mail messages?

How does emacs enter into this? Are using mh-e and not mutt?

> and the value I had for /etc/mailname, which was histomat.net.

/etc/mailname is what is used by exim4 as the name of the host
to add to "Received" lines.

Apparently people think that exim4 should use /etc/mailname for
identifying the host during outgoing SMTP transactions (HELO)
and incoming SMTP transactions, but it does not.

<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411101>

> When I changed it to historicalmaterialism.info, some mail from a couple
> days ago may have been sent from a cache, for it suddently showed up on a list.

Changing /etc/mailname would not have had such effect as far as I am aware.

> But success not verified yet.

Do you mean that you now think that because you have changed /etc/mailname
that is causing your mail to be delivered to the mailing list, but you have
not checked to see if futher messages are being delivered successfully?

/etc/mailname is not used by *exim4* (behavior with other MTAs is different)
in the routing of e-mail so changing it will have no effect on the success or
failure of mail delivery

Haines Brown

unread,
May 1, 2012, 6:46:13 AM5/1/12
to
J G Miller <mil...@yoyo.ORG> writes:

> On Mon, 30 Apr 2012 21:25:33 -0400, Haines Brown wrote:
>
>> No.
>
> I am afraid I have lost the plot entirely then. ;) Could you please
> explain in simple terms, what it is that you want to do then?

I apologize for making things too complicated.

My host name is engels.historicalmaterialism.info.

I've subscribed to lists with the name hai...@histomat.net, which is a
domain I own.

Lists validate incoming messages by looking at their envelopes. So I
need to have histomat.net as envelope name.

Emacs configuration asks for "system mail name", which refers to the
envelop name of messages. So I need to put histomat.net there.

Emacs configuration also asks for the name of the outgoing smart
host. The phrase "outgoing smart host" I gather means the smart host to
which outgoing mail is sent. My mail account is
mail.historicalmaterialism.info::587, and so I use that.

I understand that "hide local name" in mail has nothing to do with
whether the mail gets to its intended recipient, but only what appears
in the header of the messages. So I can put anything I want. I put
hai...@histomat.net.

Finally, /etc/mailname is the domain name that applications use to get
mail. The only application is mutt. The set hostname= line in mutt is
commented, and so it uses /etc/mailname. My /etc/mailname is set to
historicalmaterialism.info. I have no problem receiving mail with that
mailname.

>> My machine set up with this hostname:
>>
>> $ hostname -f
>> engels.HistoricalMaterialism.info
>
> Do you want that name to appear in your From and Reply To
> fields of outgoing messages?

No.

>> But I subsequently created a domain mail account: histomat.net, and
>> I have been using that address to send mail.
>
> Please explain in what way you have been "using that address".

When I subscribe to a list, I provide the UID hai...@histomat.net.

> Is histomat.net a real host on the Internet or an MX record
> pointing to a real host on the Internet configured with an
> MTA to send an receive e-mail?

It is a real domain name and a real email account on a mail server. It
is not a host machine that sends and receives mail. Because it is a real
account on a mail server, I assume it has an MX record.

>> In fact there may have been a clash between emacs configuration
>
> I thought you said you used mutt for writing e-mail messages?

Sorry, typo. I meant exim configuration. I do use mutt for messages.

>> and the value I had for /etc/mailname, which was histomat.net.
>
> /etc/mailname is what is used by exim4 as the name of the host
> to add to "Received" lines.

I don't understand. "Received lines" where? Doesn't this only refer to
incoming mail? I suppose that on a LAN, were Bob to send a message to
Jane, for Jane's applications to handle the message, it needs a domain
name, which mailname supplies. I have the sense that mailname has
nothing to do with outgoing messages, but it supplies incoming messages
with a domain name known to the host's applications.

> Apparently people think that exim4 should use /etc/mailname for
> identifying the host during outgoing SMTP transactions (HELO)
> and incoming SMTP transactions, but it does not.
>
> <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411101>

> /etc/mailname is not used by *exim4* (behavior with other MTAs is
> different) in the routing of e-mail so changing it will have no effect
> on the success or failure of mail delivery

Ah! So it seems it is only used by mutt for incoming mail.

I still need a way to see what is being used as the envelope address of
my outgoing mail.

Haines

Haines Brown

unread,
May 1, 2012, 6:59:31 AM5/1/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

> Haines Brown <hai...@historicalMaterialism.info> writes:

>>>> It's not. I assumed the first failure sufficed. Here's the whole baby:
>>>>
>>>> # exim -bhc 192.168.0.100
>>
>>>> 550 relay not permitted
>>>> LOG: H=(mail) [192.168.0.100] F=<hai...@histomat.net> rejected RCPT glo...@gloriabrownministry.net: relay not permitted
>>>> data
>>>> 503-All RCPT commands were rejected with this error:
>>>> 503-relay not permitted
>>>> 503 valid RCPT command must precede DATA
>>>
>>> I suspect you've not filled in "Machines to relay mail for" correctly,
>>> i.e. whatever it's set to doesn't include that IP address.

I don't think I'm trying to relay mail. That is, I'm not trying to
reroute incoming messages to another host. All I need to do is to set
the envelop address of outgoing mail to a name (histomat.net) other than
the hostname from which the mail is being sent
(historicalmaterialism.net).

>> You've lost me. "Machines to relay mail for" in exim4-reconfig I have
>> always left blank, and I believe my mail system worked until I changed
>> something else.
>
> What was the "something else" that you changed?

No idea. I didn't think I had a problem because mail sent to other
people were received, and by the time I realized that mail sent to lists
was not received I had forgotten what change I made.

>> If my hostname is engels.historicalmaterialism.info, and that is what is
>> in /etc/mailname, and that is what I have for "system mail name" in
>> exim4-reconfig, and the "name of outgoing smarthost" is
>> mail.historicalmaterialism.info::587, then I would think mail should go
>> out whether or not I "hide local mail name in outgoing mail".
>
> It's nothing to do with any of those settings.

Are you simply saying that "hide local mail name" only affects what is
in the header From: line of outgoing messages and has nothing to do with
whether or not mail gets delivered? So I assume.

Haines

Richard Kettlewell

unread,
May 1, 2012, 7:16:28 AM5/1/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> Richard Kettlewell <r...@greenend.org.uk> writes:
>> Haines Brown <hai...@historicalMaterialism.info> writes:

>>>>> It's not. I assumed the first failure sufficed. Here's the whole baby:
>>>>>
>>>>> # exim -bhc 192.168.0.100
>>>
>>>>> 550 relay not permitted
>>>>> LOG: H=(mail) [192.168.0.100] F=<hai...@histomat.net> rejected RCPT glo...@gloriabrownministry.net: relay not permitted
>>>>> data
>>>>> 503-All RCPT commands were rejected with this error:
>>>>> 503-relay not permitted
>>>>> 503 valid RCPT command must precede DATA
>>>>
>>>> I suspect you've not filled in "Machines to relay mail for" correctly,
>>>> i.e. whatever it's set to doesn't include that IP address.
>
> I don't think I'm trying to relay mail. That is, I'm not trying to
> reroute incoming messages to another host. All I need to do is to set
> the envelop address of outgoing mail to a name (histomat.net) other than
> the hostname from which the mail is being sent
> (historicalmaterialism.net).

"exim -bhc 192.168.0.100" is a test for whether relaying works from
192.168.0.100 (whatever that is). If you're not interested in relaying,
there's not much point in testing whether relaying works.

>>> If my hostname is engels.historicalmaterialism.info, and that is what is
>>> in /etc/mailname, and that is what I have for "system mail name" in
>>> exim4-reconfig, and the "name of outgoing smarthost" is
>>> mail.historicalmaterialism.info::587, then I would think mail should go
>>> out whether or not I "hide local mail name in outgoing mail".
>>
>> It's nothing to do with any of those settings.
>
> Are you simply saying that "hide local mail name" only affects what is
> in the header From: line of outgoing messages and has nothing to do with
> whether or not mail gets delivered? So I assume.

It won't affect anything whatsoever, if your configuration still matches
your original description, for the reason given in my original response
- 'hide local mail name' just means replacing your mail name with the
visible domain name in outbound messages, but you've set those things to
be the same.

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
May 1, 2012, 9:16:17 AM5/1/12
to
On Tuesday, May 1st, 2012, 06:46:13h -0400, Haines Brown wrote:

> I apologize for making things too complicated.

No need to apologize for doing that ;) What you do need to remember though
is that you know what you are doing and what you want, but for slow people
like me, you have to carefully explain what it is you want to do ;)

> My host name is engels.historicalmaterialism.info.
>
> I've subscribed to lists with the name hai...@histomat.net, which is a
> domain I own.

Okay fair enough.

> Lists validate incoming messages by looking at their envelopes. So I
> need to have histomat.net as envelope name.

Envelope mean has no meaning.

So I ask again, do you want your outgoing e-mail messages to have
the From: and maybe Reply-To fields not shewn as

hai...@engels.historicalmaterialism.info

but as

hai...@histomat.net

[Which is what I thought you wanted and when I asked if you did,
you said no.]

If you do not want your From and Reply To fields shewn as that,
what on earth do you mean by "envelope"? The To address or
the Return to Sender address (which is the From and Reply To
fields).

> Emacs configuration asks for "system mail name", which refers to the
> envelop name of messages. So I need to put histomat.net there.

Please explain what you mean by Emacs configuration.

Emacs does not need a system mail name unless your invoke rmail or
mh-e from within Emacs.

> Emacs configuration also asks for the name of the outgoing smart
> host.

So just to be absolutely clear, *please state clearly and precisely*
what you do to cause this "Emacs configuration" dialog to present
its-self and ask for your "system mail name" and "outgoing smart host"?

> The phrase "outgoing smart host" I gather means the smart host to
> which outgoing mail is sent. My mail account is
> mail.historicalmaterialism.info::587, and so I use that.

If that is your external mailer which has an MTA running then
that is correct. Pinging that site shows that it is a "hosted"
server.

Presumably whoever is providing that e-mail service for you,
has set it up on port 587 (the alternative SMTP submission port)
in order to get around any ISPs blocking outgoing port 25.

<http://www.pcmag.COM/article2/0,2817,1838667,00.asp>

> I understand that "hide local name" in mail has nothing to do with
> whether the mail gets to its intended recipient

How do you get to this dialog "hide local name"?

> Finally, /etc/mailname is the domain name that applications use to get
> mail.

No it is not used by applications to *get* mail.

From the manual page

DESCRIPTION

The file /etc/mailname is a plain ASCII configuration file, which on a
Debian system contains the visible mail name of the system. It is used
by many different programs, usually programs that wish to send or relay
mail, and need to know the name of the system.

The file contains only one line describing the fully qualified domain
name that the program wishing to get the mail name should use (that is,
everything after the @).

As I have already explained exim4 *does not* use this file in sending
or receiving e-mail.

For mutt, if you do not set "hostname" and "from" variables in ~/muttrc,
the mutt will use the string in /etc/mailname to populate the From and maybe
Reply To field addresses.

Something which I think you do not understand is this.

You as a user use the program mutt to create a mail message. mutt (the MUA,
mail user agent) does not deliver the email message but passes it on to exim4
your mail tranfer agent MTA. If you want outgoing e-mail addresses to have
your external e-mail address in the From: and Reply-To fields, then exim4
has to be configured to rewrite these *as I previously explained* and provided
a necessary transport configuration file to do this.


sender
------ recipient
---------
MAIL MAIL
USER -------> TRANSFER ----> [ MTA ] -----> MTA ----> [MDA] ----> MUA
AGENT AGENT [ smarthost]

mutt, nmh, exim4,
rmail, exmh, procmail,
mh-e, mailx sendmail
|
|
|
rewrite
From and
Reply To
fields HERE



MDA is a Mail Delivery Agent and could involve POP3 IMAP (eg Dovecot) and eg fetchmail

> When I subscribe to a list, I provide the UID hai...@histomat.net.

So you want <hai...@histomat.net> to appear in your outgoing
"From" and "Reply To fields", as I keep asking??? Yes????

> It is a real domain name and a real email account on a mail server. It
> is not a host machine that sends and receives mail. Because it is a real
> account on a mail server, I assume it has an MX record.

Well as I said, the MX record still has to point to a real
host with a properly configure e-mail service for sending
and receivign.

> I don't understand. "Received lines" where?

In the mail message. Every time a message is processed by an MTA,
a well behaved MTA adds a Recieved line at the top of the message
header identifying itself and saying from whom it received the message.

I think you have never looked at the header of an e-mail message
properly.

For example

Received: from [195.249.40.189] (helo=wd5a.webdomain.dk)
by atticus.yoyo.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.76) (envelope-from <webm...@dream-zone.dk>) id 1S8wA0-0006VJ-0g
for mil...@yoyo.ORG; Sat, 17 Mar 2012 16:07:17 +0000
Received: from wd5a.webdomain.dk (localhost [127.0.0.1])
by wd5a.webdomain.dk (8.13.1/8.13.1) with ESMTP id q2HG7DVg007108
for <mil...@yoyo.ORG>; Sat, 17 Mar 2012 17:07:13 +0100
Received: (from virtual@localhost)
by wd5a.webdomain.dk (8.13.1/8.13.1/Submit) id q2HG7DHm007107;
Sat, 17 Mar 2012 17:07:13 +0100

> Doesn't this only refer to incoming mail?

No, your MTA adds a Received from line to outgoing e-mail messages as well
before it passes it on the destination MTA (in your case the smart host MTA,
not the destination MTA).

> I suppose that on a LAN, were Bob to send a message to
> Jane, for Jane's applications to handle the message, it needs a domain
> name, which mailname supplies.

How many times do I have to keep repeating -- exim4 does not use /etc/mailname

> Ah! So it seems it is only used by mutt for incoming mail.

No!!! mutt only reads the e-mail messages which the MTA has deposited
in /var/mail/${USER} or in some cases in the user's Maildir structure.

mutt does not send or get mail. It only composes messages which is passes
on to the MTA for delivery and reads messages which have been received by
the MTA.

> I still need a way to see what is being used as the envelope address of
> my outgoing mail.

That is easy -- send an e-mail message to your external e-mail address.

Richard Kettlewell

unread,
May 1, 2012, 10:08:18 AM5/1/12
to
J G Miller <mil...@yoyo.ORG> writes:
> On Tuesday, May 1st, 2012, 06:46:13h -0400, Haines Brown wrote:

>> My host name is engels.historicalmaterialism.info.
>>
>> I've subscribed to lists with the name hai...@histomat.net, which is a
>> domain I own.
>
> Okay fair enough.
>
>> Lists validate incoming messages by looking at their envelopes. So I
>> need to have histomat.net as envelope name.
>
> Envelope mean has no meaning.

It's a standard term for the transport-level addressing information.
For examlpe, the addresses supplied to MAIL FROM and RCPT TO in SMTP.

>> I suppose that on a LAN, were Bob to send a message to Jane, for
>> Jane's applications to handle the message, it needs a domain name,
>> which mailname supplies.
>
> How many times do I have to keep repeating -- exim4 does not use
> /etc/mailname

It may be used by update-exim4.conf to set qualify_domain, in fact.

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
May 1, 2012, 10:27:28 AM5/1/12
to
On Tue, 01 May 2012 15:08:18 +0100, Richard Kettlewell wrote:

> It's a standard term for the transport-level addressing information.
> For examlpe, the addresses supplied to MAIL FROM and RCPT TO in SMTP.

My ignorance (but not wilfil), or possible memory failure on that point then --
I always thing of the HELO, MAIL FROM, and RCPT TO as being a transitory
SMTP dialog rather than an envelope.

>> How many times do I have to keep repeating -- exim4 does not use
>> /etc/mailname
>
> It may be used by update-exim4.conf to set qualify_domain, in fact.

But update-exim4.conf is not used by exim4 its-self but the Debian
management interface to exim4.

Haines Brown

unread,
May 1, 2012, 11:51:54 AM5/1/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

> J G Miller <mil...@yoyo.ORG> writes:
>> On Tuesday, May 1st, 2012, 06:46:13h -0400, Haines Brown wrote:

>>> Lists validate incoming messages by looking at their envelopes. So I
>>> need to have histomat.net as envelope name.

[Envelope:] It's a standard term for the transport-level addressing
information. For examlpe, the addresses supplied to MAIL FROM and RCPT
TO in SMTP.

Yes, so I understand.

>>> I suppose that on a LAN, were Bob to send a message to Jane, for
>>> Jane's applications to handle the message, it needs a domain name,
>>> which mailname supplies.
>>
>> How many times do I have to keep repeating -- exim4 does not use
>> /etc/mailname

No, I understand that. It is used by mutt.

In exim4 configuration, when I specify the system mail name as
"historicalMaterialism.info", mail should be acceptable to the mail
server, mail.historicalmaterialism.info::587.

I have mutt set up to construct the From: line in the header as:
From: Haines Brown <hai...@histomat.net>. That is, in .muttrc is the
line: my_hdr From: Haines Brown <hai...@histomat.net>. This suceeds with
individual recipients, but not with lists. Or at least I don't know
how to test a list without sending it a "only testing" message.

I just ventured being rude and subscribed to a list that did not bother
to describe its purpose, and sent a message asking about it. The message
fell into a black hole. If I mistype the To: line, I get a bounce
message from the mail server stating that the address is unknown. How do
I interpret this? The server seems to know who I am and routes my mail,
but apparently the envelope it constructs for my message is unworkable
and presumably the destination mail server (listserv), can't handle it.
One list to which I'm subscribed sends back a message that it does not
recognize me as a subscriber (I subscribed as hai...@histomat.net), and
asks me to send the message to the list moderator to confirm it, which
he does and it ends up going through.

Haines Brown



Richard Kettlewell

unread,
May 1, 2012, 12:00:54 PM5/1/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:

> Richard Kettlewell <r...@greenend.org.uk> writes:
>
>> J G Miller <mil...@yoyo.ORG> writes:
>>> On Tuesday, May 1st, 2012, 06:46:13h -0400, Haines Brown wrote:
>
>>>> Lists validate incoming messages by looking at their envelopes. So I
>>>> need to have histomat.net as envelope name.
>
> [Envelope:] It's a standard term for the transport-level addressing
> information. For examlpe, the addresses supplied to MAIL FROM and RCPT
> TO in SMTP.
>
> Yes, so I understand.
>
>>>> I suppose that on a LAN, were Bob to send a message to Jane, for
>>>> Jane's applications to handle the message, it needs a domain name,
>>>> which mailname supplies.
>>>
>>> How many times do I have to keep repeating -- exim4 does not use
>>> /etc/mailname
>
> No, I understand that. It is used by mutt.
>
> In exim4 configuration, when I specify the system mail name as
> "historicalMaterialism.info", mail should be acceptable to the mail
> server, mail.historicalmaterialism.info::587.

Why do you think that to be the case?
- Do you have it in writing from your mail provider?
- Have you seen it accept and forward such messages in the past?
- Are you just relying on the similarity of the name you're addressing
it by?

My earlier remark that you should look at your mail logs still holds.

> I just ventured being rude and subscribed to a list that did not bother
> to describe its purpose, and sent a message asking about it. The message
> fell into a black hole. If I mistype the To: line, I get a bounce
> message from the mail server stating that the address is unknown. How do
> I interpret this?

Post the complete bounce message here.

--
http://www.greenend.org.uk/rjk/

Haines Brown

unread,
May 1, 2012, 12:31:34 PM5/1/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

> Haines Brown <hai...@historicalMaterialism.info> writes:
>> Richard Kettlewell <r...@greenend.org.uk> writes:
>>> Haines Brown <hai...@historicalMaterialism.info> writes:

> "exim -bhc 192.168.0.100" is a test for whether relaying works from
> 192.168.0.100 (whatever that is). If you're not interested in relaying,
> there's not much point in testing whether relaying works.

Ah! I have trouble understanding the manual (some 140 pages long, if I
recall).

>> Are you simply saying that "hide local mail name" only affects what
>> is in the header From: line of outgoing messages and has nothing to
>> do with whether or not mail gets delivered? So I assume.
>
> It won't affect anything whatsoever, if your configuration still matches
> your original description, for the reason given in my original response
> - 'hide local mail name' just means replacing your mail name with the
> visible domain name in outbound messages, but you've set those things to
> be the same.

In the test message described in my other post just sent, the visible
domain name was "histomat.net". I subscribed to a list. On its
subscription web page I identified myself as hai...@histomat.net. It
sent me a welcome message, and I managed to unsubscribe from the list
with email. That is, listserv at that end understands what I'm up to,
but the test message I sent to the list didn't show up. Perhaps a
moderator filtered it?

In reading the SMTP spec, I got the impression that when my mail server
rebuilds the envelope, it borrows from the From: line in the mail
header. Is this true?

Haines Brown

Richard Kettlewell

unread,
May 1, 2012, 1:44:06 PM5/1/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> In the test message described in my other post just sent, the visible
> domain name was "histomat.net". I subscribed to a list. On its
> subscription web page I identified myself as hai...@histomat.net. It
> sent me a welcome message, and I managed to unsubscribe from the list
> with email. That is, listserv at that end understands what I'm up to,
> but the test message I sent to the list didn't show up. Perhaps a
> moderator filtered it?

Configuring mailing lists to ignore test messages seems sensible.

> In reading the SMTP spec, I got the impression that when my mail
> server rebuilds the envelope, it borrows from the From: line in the
> mail header. Is this true?

No, although they will often happen to match for other reasons.

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
May 1, 2012, 2:07:18 PM5/1/12
to
On Tuesday, May 1st, 2012, at 11:51:54h -0400, Haines Brown wrote:

> [Envelope:] It's a standard term for the transport-level addressing
> information. For examlpe, the addresses supplied to MAIL FROM and RCPT
> TO in SMTP.

So as I said my lack of recognition of the term and apologies for
my lack of understanding.

Thus if you want to see what exim4 is doing in the SMTP dialog and how
it is announcing itself with which mail name it is actually using,
you can run exim in debug and verbose mode to see that.

QUOTE

send a message to the remote address:


exim4 -v -odf us...@remote.host

This is a test message.
.


This time, the -v option causes Exim to display the *SMTP dialogue* as well
as the log lines.

UNQUOTE

Trying the above will show you immediately the SMTP "enveloped"
what is being used as mailname in the HELO and SENDER fields.

In my case I also see

"root@fictious_domain_name" from from: rewritten as "mil...@yoyo.ORG" by rule 1
SMTP<< 250 ok: Message 240005004 accepted
SMTP>> QUIT

thanks to the rewriting of outoing e-mail addresses which I already shewed
you how to do.

Haines Brown

unread,
May 1, 2012, 2:55:37 PM5/1/12
to
Richard Kettlewell <r...@greenend.org.uk> writes:

> Haines Brown <hai...@historicalMaterialism.info> writes:
>
>> Richard Kettlewell <r...@greenend.org.uk> writes:

>> In exim4 configuration, when I specify the system mail name as
>> "historicalMaterialism.info", mail should be acceptable to the mail
>> server, mail.historicalmaterialism.info::587.
>
> Why do you think that to be the case?
> - Do you have it in writing from your mail provider?

Well, in effect, yes. That is, in my Account Manager on my provider's
website, in Email Manager, are listed two accounts. One, histomat.net,
has user Haines; the other, historicalMaterialism.info, has brownh as
user. In neither case have I enabled forwarding or autoreply. It says
the SMTP hostname for one account is mail.histomat.net and for the other
is mail.historicalmaterialism.info. In both cases I have to supply the
port 587.

> - Have you seen it accept and forward such messages in the past?

I presume, yes, at least to the extent that I had no trouble with email
from 2010 until perhaps 2-3 months ago.

> - Are you just relying on the similarity of the name you're addressing
> it by?

I'm not clear about your question. I assume that if there's an mail
account on the mail server, it should accept mail using its address. I
assume that a message sent otherwise will be rejected by the mail
server. If I prefer the histomat name, the question is what needs to
be changed in exim to use it? System mail name, even though that
conflicts with my hostname?


>
> My earlier remark that you should look at your mail logs still holds.

I believe I indicated before there's nothing of interest in it. Here is
a successful test message sent to an individual person:

2012-05-01 10:52:40 1SPERU-0003Zq-3A
<= hai...@historicalmaterialism.info U=haines P=local S=660
id=2012050114...@historicalMaterialism.info
2012-05-01 10:52:42 1SPERU-0003Zq-3A
=> glo...@gloriabrownministry.net R=smarthost T=remote_smtp_smarthost
H=mail.historicalmaterialism.info [216.239.1$
2012-05-01 10:52:42 1SPERU-0003Zq-3A Completed

Here are messages sent to the listserv I temporarily joined. These are a
subscription request, a confirmation of a subscription, a test message
that fell into a black hole and a signoff message.

2012-05-01 11:02:40 1SPEb9-0003vk-Sg
<= LIST...@LISTSERV.NEWMILFORDPS.ORG
H=localhost (engels.HistoricalMaterialism.info) [::1]
P=esmtp S=2745
id=LISTSERV%20120501110...@LISTSERV.NEWMILFORDPS.ORG
2012-05-01 11:02:40 1SPEb9-0003vk-Sg
=> haines <haines@localhost> R=local_user T=mail_spool
2012-05-01 11:02:40 1SPEb9-0003vk-Sg Completed

2012-05-01 11:26:35 1SPEyI-00049n-Qf
<= owner-T...@LISTSERV.NEWMILFORDPS.ORG
H=localhost (engels.HistoricalMaterialism.info) [::1] P=esmtp
S=6170 id=LISTSERV%20120501112...@LISTSERV.NEWMILFORDPS.ORG
2012-05-01 11:26:35 1SPEyI-00049n-Qf
=> haines <haines@localhost> R=local_user T=mail_spool
2012-05-01 11:26:35 1SPEyI-00049n-Qf Completed

2012-05-01 11:28:41 1SPF0L-0004BA-Az
<= hai...@historicalmaterialism.info U=haines P=local S=804
id=2012050115...@historicalMaterialism.info
2012-05-01 11:28:43 1SPF0L-0004BA-Az
=> test...@newmilfordps.org R=smarthost T=remote_smtp_smarthost
H=mail.historicalmaterialism.info [216.239.128.27]
X=TLS1.0:RSA_AES_256_CBC_SHA1:32
DN="serialNumber=qeS6etOzdvC-1UD4qKB3b8gt3fSaB-Ok,C=US,ST=C$
2012-05-01 11:28:43 1SPF0L-0004BA-Az Completed

2012-05-01 11:29:38 1SPF1G-0004Bx-2c
<= hai...@historicalmaterialism.info U=haines P=local S=662
id=2012050115...@historicalMaterialism.info
2012-05-01 11:29:39 1SPF1G-0004Bx-2c
=> test...@listserve.newmilfordps.org R=smarthost
T=remote_smtp_smarthost H=mail.historicalmaterialism.info
[216.239.128.27] X=TLS1.0:RSA_AES_256_CBC_SHA1:32
DN="serialNumber=qeS6etOzdvC-1UD4qKB3b8gt3fSaB-Ok...
2012-05-01 11:29:39 1SPF1G-0004Bx-2c Completed

2012-05-01 11:31:29 1SPF33-0004DK-99
<= hai...@historicalmaterialism.info U=haines P=local S=660
id=2012050115...@historicalMaterialism.info
2012-05-01 11:31:31 1SPF33-0004DK-99
=> test...@listserv.newmilfordps.org R=smarthost
T=remote_smtp_smarthost H=mail.historicalmaterialism.info
[216.239.128.27] X=TLS1.0:RSA_AES_256_CBC_SHA1:32
DN="serialNumber=qeS6etOzdvC-1UD4qKB3b8gt3fSaB-Ok,...
2012-05-01 11:31:31 1SPF33-0004DK-99 Completed

2012-05-01 12:00:43 1SPFVL-0004Tv-Ek
<= hai...@historicalmaterialism.info U=haines P=local S=699
id=2012050116...@historicalMaterialism.info
2012-05-01 12:00:45 1SPFVL-0004Tv-Ek
=> test-list-si...@listserv.newmilfordps.org
<TEST-LIST-si...@LISTSERV.NEWMILFORDPS.ORG> R=smarthost
T=remote_smtp_smarthost H=mail.historicalmaterialism.info
[216.239.128.27] X=TLS1.0:RSA_$
2012-05-01 12:00:45 1SPFVL-0004Tv-Ek Completed

I did not see anything amiss.


>> I just ventured being rude and subscribed to a list that did not bother
>> to describe its purpose, and sent a message asking about it. The message
>> fell into a black hole. If I mistype the To: line, I get a bounce
>> message from the mail server stating that the address is unknown. How do
>> I interpret this?
>
> Post the complete bounce message here.

Although now unsubscribed (should make no difference), I sent a message
with a bogus address:

From MAILER...@mail.histomat.net Tue May 01 14:46:10 2012
Return-path: <MAILER...@mail.histomat.net>
Envelope-to: haines@localhost
Delivery-date: Tue, 01 May 2012 14:46:10 -0400
Received: from localhost ([::1] helo=engels.HistoricalMaterialism.info)
by engels.HistoricalMaterialism.info with esmtp (Exim 4.72)
(envelope-from <MAILER...@mail.histomat.net>)
id 1SPI5S-000712-K0
for haines@localhost; Tue, 01 May 2012 14:46:10 -0400
Delivered-To: hai...@histomat.net
Received: from mail.histomat.net [216.239.128.27]
by engels.HistoricalMaterialism.info with POP3 (fetchmail-6.3.18)
for <haines@localhost> (single-drop); Tue, 01 May 2012 14:46:10 -0400 (EDT)
Received: from mail-hub-a.omnis.com (mail-hub-a.omnis.com [216.239.128.241])
by skadi.omnis.com (Postfix) with ESMTP id 043F5828260
for <hai...@histomat.net>; Tue, 1 May 2012 18:46:53 +0000 (GMT)
Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26])
by mail-hub-a.omnis.com (Postfix) with ESMTP id E57294CEE05
for <hai...@histomat.net>; Tue, 1 May 2012 11:46:52 -0700 (PDT)
Received: by smtp.omnis.com (Postfix)
id B2F8045739B; Tue, 1 May 2012 11:46:52 -0700 (PDT)
Date: Tue, 1 May 2012 11:46:52 -0700 (PDT)
From: Mail Delivery System <MAILER...@omnis.com>
Subject: Undelivered Mail Returned to Sender
To: hai...@histomat.net
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="AD19E457222.1335898012/smtp.omnis.com"
Message-Id: <2012050118465...@smtp.omnis.com>
X-Virus-Scanned: clamav-milter 0.97.3 at mail-hub-a.omnis.com
X-Virus-Status: Clean

Notification:

This is the Postfix program at host smtp.omnis.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

<test...@listserve.newmilfordps.org>: Host or domain name not
found. Name service error for name=listserve.newmilfordps.org
type=A: Host not found

Delivery report:

Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; smtp.omnis.com
X-Postfix-Queue-ID: AD19E457222
X-Postfix-Sender: rfc822; hai...@histomat.net
Arrival-Date: Tue, 1 May 2012 11:46:52 -0700 (PDT)

Final-Recipient: rfc822; test...@listserve.newmilfordps.org
Original-Recipient: rfc822;test...@listserve.newmilfordps.org
Action: failed
Status: 5.4.4
Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error
for name=listserve.newmilfordps.org type=A: Host not found

Undelivered Message:

Content-Type: message/rfc822

Return-Path: <hai...@histomat.net>
Received: from mail-hub-e.omnis.com (mail-hub-e.omnis.com [216.239.128.245])
by smtp.omnis.com (Postfix) with ESMTP id AD19E457222
for <test...@listserve.newmilfordps.org>; Tue, 1 May 2012 11:46:52 -0700 (PDT)
Received: from engels.HistoricalMaterialism.info (64-252-187-241.adsl.snet.net [64.252.187.241])
(Authenticated sender: bro...@historicalmaterialism.info)
by mail-hub-e.omnis.com (Postfix) with ESMTPSA id 623C5126EEE
for <test...@listserve.newmilfordps.org>; Tue, 1 May 2012 11:46:52 -0700 (PDT)
Received: from haines by engels.HistoricalMaterialism.info with local (Exim 4.72)
(envelope-from <hai...@historicalmaterialism.info>)
id 1SPI5B-00070J-D4
for test...@listserve.newmilfordps.org; Tue, 01 May 2012 14:45:53 -0400
Date: Tue, 1 May 2012 14:45:53 -0400
From: Haines Brown <hai...@histomat.net>
To: test...@listserve.newmilfordps.org
Subject: test
Message-ID: <2012050118...@historicalMaterialism.info>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: GNU/Linux 2.6.32-5-686-bigmem Debian squeeze
X-URL: www.historicalMaterialism.info
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Virus-Scanned: clamav-milter 0.97.3 at mail-hub-e.omnis.com
X-Virus-Status: Clean
...

Haines


Richard Kettlewell

unread,
May 2, 2012, 4:12:36 AM5/2/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> I did not see anything amiss.

Agreed. I think your mail is working fine. If a mailing list is
ignoring your test message, that's probably because it's (sensibly)
configured to ignore anything that can be easily recognized as test
messages.

--
http://www.greenend.org.uk/rjk/

Haines Brown

unread,
May 2, 2012, 9:42:40 AM5/2/12
to
J G Miller <mil...@yoyo.ORG> writes:

> Thus if you want to see what exim4 is doing in the SMTP dialog and how
> it is announcing itself with which mail name it is actually using,
> you can run exim in debug and verbose mode to see that.

> Trying the above will show you immediately the SMTP "enveloped"
> what is being used as mailname in the HELO and SENDER fields.

With this setup, mail sent to a list falls into a black hole rather than
a message that does not recognize me as subscribed when I had system
mail name set to historicalmaterialism.info.

hostname: engels.historicalmaterialism.info
mailname: histomat.net
exim system mail name: histomat.net
exim smarthome mail server: mail.histomat.net::587

I started a dialog on the list so that I might use it as a text
platform. So now I use exim debugging to see what happens. I assume the
message just sent to the list will fall into a black hole. Here's the
dialog

$ /usr/sbin/exim -v -odf h-w...@h-net.msu.edu
<text of message>
.
LOG: MAIN
<= hai...@histomat.net U=haines P=local S=2469
delivering 1SPZRR-0005eW-1J
R: smarthost for h-w...@h-net.msu.edu
T: remote_smtp_smarthost for h-w...@h-net.msu.edu
Transport port=25 replaced by host-specific port=587
Connecting to mail.histomat.net [216.239.128.27]:587 ... connected
SMTP<< 220 relay.omnis.com ESMTP Postfix - (mail-hub-e.omnis.com)
SMTP>> EHLO engels.HistoricalMaterialism.info
SMTP<< 250-mail-hub-e.omnis.com
250-PIPELINING
250-SIZE 20480000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
SMTP>> STARTTLS
SMTP<< 220 2.0.0 Ready to start TLS
SMTP>> EHLO engels.HistoricalMaterialism.info
SMTP<< 250-mail-hub-e.omnis.com
250-PIPELINING
250-SIZE 20480000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
SMTP>> AUTH PLAIN **********************************************
SMTP<< 235 2.7.0 Authentication successful
SMTP>> MAIL FROM:<hai...@histomat.net>
SIZE=3540 AUTH=hai...@histomat.net
SMTP>> RCPT TO:<H-W...@h-net.msu.edu>
SMTP>> DATA
SMTP<< 250 2.1.0 Ok
SMTP<< 250 2.1.5 Ok
SMTP<< 354 End data with <CR><LF>.<CR><LF>
SMTP>> writing message and terminating "."
SMTP<< 250 2.0.0 Ok: queued as 84E01126EC6
SMTP>> QUIT
LOG: MAIN
=> h-w...@h-net.msu.edu <H-W...@h-net.msu.edu> R=smarthost
T=remote_smtp_smarthost H=mail.histomat.net [216.239.128.27]
X=TLS1.0:RSA_AES_256_CBC_SHA1:32
DN="serialNumber=qeS6etOzdvC-1UD4qKB3b8gt3fSaB-Ok,
C=US,ST=California,L=Torrance,O=Omnis Network\,
LLC,CN=*.omnis.com"
LOG: MAIN
Completed

So this looks like the message succeeded, but in fact it fell into a
hole. My only question is about the EHLO line. It is the same as HELO
except it gives the server feedback. This line is saying that the server
sees the message is coming from the host
engels.historicalmaterialism.info. While I updated my email address for
the list to hai...@histomat.net, it was about the time that I began to
have trouble communicating with it.

If I reconfigure exim with historicalmaterialism.info system name, I
suspect the list server will get the message, but tell me it does not
recognize my old address. Somehow by making the system mail name
histomat.net in exim configuration, the list server does not even get
it.

Haines


Haines Brown

unread,
May 2, 2012, 10:27:40 AM5/2/12
to
I changed the name of the smarthost mail server:

hostname: engels.historicalmaterialism.info
mailname: histomat.net
exim system mail name: histomat.net
exim smarthost mail server: mail.historicalmaterialism.info::587

Am I correct that changing the last item merely changed the mail server
being used? I sent the same test message as in my previous message. It
again fell into a black hole. The only difference in the debug message
is this H= line, which is now the mail.historicalmaterialism mail server
instead of the mail.histomat.net server:

LOG: MAIN
=> h-w...@h-net.msu.edu <H-W...@h-net.msu.edu>
R=smarthost T=remote_smtp_smarthost
H=mail.historicalmaterialism.info [216.239.128.27]
X=TLS1.0:RSA_AES_256_CBC_SHA1:32
DN="serialNumber=qeS6etOzdvC-1UD4qKB3b8gt3fSaB-Ok,
C=US,ST=California,L=Torrance,O=Omnis Network\, LLC,CN=*.omnis.com"

Now I again reconfigure exim to make system mail name:
historicalMaterialism.info. The debug result the same.

SMTP>> AUTH PLAIN ************************************************
SMTP<< 235 2.7.0 Authentication successful
SMTP>> MAIL FROM:<hai...@histomat.net> SIZE=3553
AUTH=hai...@historicalmaterialism.info
SMTP>> RCPT TO:<H-W...@h-net.msu.edu>

LOG: MAIN
=> h-w...@h-net.msu.edu <H-W...@h-net.msu.edu> R=smarthost
T=remote_smtp_smarthost H=mail.historicalmaterialism.info
[216.239.128.27] X=TLS1.0:RSA_AES_256_CBC_SHA1:32
DN="serialNumber=qeS6etOzdvC-1UD4qKB3b8gt3fSaB-Ok,C=US,
ST=California,L=Torrance,O=Omnis Network\, LLC,CN=*.omnis.com"

Now AUTH is hai...@historicalMaterialism.info, but but there is no such
animal, but only a haines@histomat and
bro...@historicalmaterialism.info. I suspect this artificial address
may be one of my problems. I seem to have authorized access to the
mail server, but I don't know what the AUTH line after MAIL FROM:
means and why it appends the system mail name to the user name.

Haines

Richard Kettlewell

unread,
May 2, 2012, 11:17:55 AM5/2/12
to
Haines Brown <hai...@historicalMaterialism.info> writes:
> I changed the name of the smarthost mail server:
>
> hostname: engels.historicalmaterialism.info
> mailname: histomat.net
> exim system mail name: histomat.net
> exim smarthost mail server: mail.historicalmaterialism.info::587
>
> Am I correct that changing the last item merely changed the mail server
> being used?

It doesn't change anything whatsoever because, as you have already been
told, it's a different name for the same IP address.

--
http://www.greenend.org.uk/rjk/

Haines Brown

unread,
May 2, 2012, 12:12:44 PM5/2/12
to
No, I had incorrectly assumed that the IP address might access a number
of mail accounts.
0 new messages