Mailing List Archive

autoreply transport (newbie)
Hello everybody,

I've been reading the Oreilly Exim book and when I got to the autoreply
transport section, I noticed that for the forwardfile and aliasfile
directors we specify the address_pipe_transport or
address_file_transport options provided we have a pipe or redirection to
a file in our .forward or /etc/alias. I started looking for a similar
option for the "autoreply" transport and couldn't find one.

Then, I read that for the system wide filter to work,
message_filter_reply_transport needs to be set as a global variable if
there is a "mail" command in the filter. But for a user ".forward"
filter, there is no such requirement. So, why does exim relieve the
requirement of specifying the autoreply transport in, for example, the
forwardfile director? Why allow such inconsistency? That is, why specify
the message_filter_reply_transport for a system-wide filter and not for
the forwardfile director?

It seems like almost all autoreply transport options can be specified in
the "mail" command itself -- all except for the "mode" option. Or at
least so it seems. So, how can one specify the mode from the user's filter?

I hope all of that rambling is not too confusing. Maybe I haven't read
enough after all:)

I do have a second question. I have a box that is named, say
"mail.domain1" and it is the mail server for, say "foobar_alias.com".
"foobar_alias.com" has "mail.domain1" in its MX record. However, "foobar_alias.com"
is really just an alias for "foobar_real_deal.com".

In my exim.conf on a completely different computer that runs exim just
for outgoing mail, I set "qualify_domain" to "foobar_alias.com". When I
send a message directly to, say "john" on "foobar_alias.com", I get the
message at "john@mail.domain1" as expected and the "Return path"
contains "john@foobar_alias.com". So far so good.

On yet another mail server, say "mail.domain2", I created a forward that
redirects the mail for user "greg" to "john@mail.domain1". When I send
an email to "greg@mail.domain2", I receive the email at
"john@mail.domain1" as expected but the return path becomes
"john@foobar_real_deal.com". That is, "foobar_alias.com" gets expanded
to its canonical name.

What is the explanation for this behavior?

Thanks a bunch,
Max
Re: autoreply transport (newbie) [ In reply to ]
On Mon, 22 Jul 2002, Sergei Gerasenko wrote:

> I've been reading the Oreilly Exim book and when I got to the autoreply
> transport section, I noticed that for the forwardfile and aliasfile
> directors we specify the address_pipe_transport or
> address_file_transport options provided we have a pipe or redirection to
> a file in our .forward or /etc/alias. I started looking for a similar
> option for the "autoreply" transport and couldn't find one.

It's called reply_transport, and it applies only to forwardfile, because
alias files can't generate auto replies. Note that this is for Exim 3,
which is what the book describes.

> It seems like almost all autoreply transport options can be specified in
> the "mail" command itself -- all except for the "mode" option. Or at
> least so it seems. So, how can one specify the mode from the user's filter?

Er, the "mail" command is concerned with generating a message. I'm not
sure what "mode" you are talking about. Messages don't have modes.

> I do have a second question. I have a box that is named, say
> "mail.domain1" and it is the mail server for, say "foobar_alias.com".
> "foobar_alias.com" has "mail.domain1" in its MX record. However, "foobar_alias.com"
> is really just an alias for "foobar_real_deal.com".

Alias in the DNS? That is, are we talking about a CNAME here?

> In my exim.conf on a completely different computer that runs exim just
> for outgoing mail, I set "qualify_domain" to "foobar_alias.com". When I
> send a message directly to, say "john" on "foobar_alias.com", I get the
> message at "john@mail.domain1" as expected and the "Return path"
> contains "john@foobar_alias.com". So far so good.
>
> On yet another mail server, say "mail.domain2", I created a forward that
^^^^^^^^^^^^^^^^^^^^^^
Is this also running Exim?

> redirects the mail for user "greg" to "john@mail.domain1". When I send
> an email to "greg@mail.domain2", I receive the email at
> "john@mail.domain1" as expected but the return path becomes
> "john@foobar_real_deal.com". That is, "foobar_alias.com" gets expanded
> to its canonical name.
>
> What is the explanation for this behavior?

Exim does not canonicise domain names, but some other MTAs do, which is
why I asked if this third server was running Exim. (The RFC 821/822 mail
standards specified canonicisation, but this has been taken out of the
new 2821/2822 documents.)


--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.
Re: autoreply transport (newbie) [ In reply to ]
On Mon, 22 Jul 2002, I wrote:

> Er, the "mail" command is concerned with generating a message. I'm not
> sure what "mode" you are talking about. Messages don't have modes.

But then realized you were talking about the mode of the log and "once"
files. There isn't any way to set these from the filter; nobody has ever
mentioned it before.

--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.
Re: autoreply transport (newbie) [ In reply to ]
I surely didn't expect Phillip Hazel himself to answer my silly
questions! Thanks for your time. I really appreciate it.

> It's called reply_transport, and it applies only to forwardfile, because
> alias files can't generate auto replies. Note that this is for Exim 3,
> which is what the book describes.

Yes, my mistake.

> > It seems like almost all autoreply transport options can be specified in
> > the "mail" command itself -- all except for the "mode" option. Or at
> > least so it seems. So, how can one specify the mode from the user's filter?
>
> Er, the "mail" command is concerned with generating a message. I'm not
> sure what "mode" you are talking about. Messages don't have modes.

Well, I meant to say that there is this "once" option in the
reply_transport that specifies the name of the file in which the
addresses of people who have already been sent an "autoreply" email are
stored. Well the "mode" option, if I understand it correctly, specifies
the mode of this "once" file if doesn't exist and it needs to be
created. It also seems to relate to the "log" option in the same way.

Now, the reason I was asking about "mode" in relation to "mail" was because I
wanted to know how one can use the "mode"/"once" or (any other
reply_transport specific options for that matter) in a user filter
(stored in a .forward). Or if it's not possible to do from the filter
itself, how can one refer to a configured reply_transport in the exim
configuration file from a configured forwardfile director?

What started this confusion in my mind was the fact that the forward
file does have address_pipe_transport and address_file_transport options
for the forwardfile director in case pipes or redirections to files are
encountered in the .forward file. But there seems to be no way to
specify that the reply_transport should be used in case a "mail" command
is encountered in the .forward file. Or is it automatically assumed? But
then I thought about how I would specify "mode" and "once" options in
the .forward file and couldn't come up with an answer.

Hope it makes sense.

> > I do have a second question. I have a box that is named, say
> > "mail.domain1" and it is the mail server for, say "foobar_alias.com".
> > "foobar_alias.com" has "mail.domain1" in its MX record. However, "foobar_alias.com"
> > is really just an alias for "foobar_real_deal.com".
>
> Alias in the DNS? That is, are we talking about a CNAME here?

Exactly.

> > In my exim.conf on a completely different computer that runs exim just
> > for outgoing mail, I set "qualify_domain" to "foobar_alias.com". When I
> > send a message directly to, say "john" on "foobar_alias.com", I get the
> > message at "john@mail.domain1" as expected and the "Return path"
> > contains "john@foobar_alias.com". So far so good.
> >
> > On yet another mail server, say "mail.domain2", I created a forward that
> ^^^^^^^^^^^^^^^^^^^^^^
> Is this also running Exim?

I should have mentioned this right away and I swear I was thinking about
this. No, the server runs sendmail.

> Exim does not canonicise domain names, but some other MTAs do, which is
> why I asked if this third server was running Exim. (The RFC 821/822 mail
> standards specified canonicisation, but this has been taken out of the
> new 2821/2822 documents.)

Now, I see what's happening. So sendmail canonicizes domain names.
That's interesting. I should take a look at those RFC's. A quick
question on the "return path" header. As I understand, it's added to the
message by the last email server in the email route and it's taken from
the smtp "MAIL FROM" command without any rewriting or any other DNS
trickery? Is that correct?

Thanks very much
Re: autoreply transport (newbie) [ In reply to ]
On Mon, 22 Jul 2002, Sergei Gerasenko wrote:

> Now, the reason I was asking about "mode" in relation to "mail" was because I
> wanted to know how one can use the "mode"/"once" or (any other
> reply_transport specific options for that matter) in a user filter
> (stored in a .forward). Or if it's not possible to do from the filter
> itself, how can one refer to a configured reply_transport in the exim
> configuration file from a configured forwardfile director?

You can use "once" in a "mail" command, but not "mode".

> But there seems to be no way to
> specify that the reply_transport should be used in case a "mail" command
> is encountered in the .forward file. Or is it automatically assumed?

It is assumed. That is exactly what reply_transport is for. It specifies
the transport that is used for "mail" commands in filter files. That is
*all* it is used for!

> But
> then I thought about how I would specify "mode" and "once" options in
> the .forward file and couldn't come up with an answer.

For "once", you just specify "once".

> Now, I see what's happening. So sendmail canonicizes domain names.

Yes.

> That's interesting. I should take a look at those RFC's. A quick
> question on the "return path" header. As I understand, it's added to the
> message by the last email server in the email route and it's taken from
> the smtp "MAIL FROM" command without any rewriting or any other DNS
> trickery? Is that correct?

It is taken from the MAIL command, yes. There may be configured
rewriting, but otherwise Exim won't touch it. I don't know what Sendmail
does.

--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.