mail from for virtual hosts

mail from for virtual hosts

am 14.04.2008 11:28:48 von Zbigniew Szalbot

Hello,

Can you point me to documentation how to setup mail from for virtual
domains, which apache generates when users complete a form?

Apr 14 10:55:17 relay postfix/qmgr[52910]: 97025C955D:
from=, size=502, nrcpt=1 (queue active)

Apache gets the name of the server domain but I wonder if it is possible to
configure it so that a script submitted from a virtual domain, would have
www@this-virtual-domain.tld envelope?

Many thanks for pointing me in the right direction!

Zbigniew Szalbot


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mail from for virtual hosts

am 14.04.2008 13:07:41 von Davide Bianchi

Zbigniew Szalbot wrote:
> Can you point me to documentation how to setup mail from for virtual
> domains, which apache generates when users complete a form?

No, we can only point you to the generical documentation of wathever
programming language you're using for such form.

> configure it so that a script submitted from a virtual domain, would have
> www@this-virtual-domain.tld envelope?

Sure you can.

--
A black cat crossing your path signifies that the animal is going
somewhere. -- Julius Henry "Groucho" Marx
(http://en.wikiquote.org/wiki/Groucho_Marx)

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mail from for virtual hosts

am 14.04.2008 13:15:51 von Zbigniew Szalbot

Hi,

On Mon, 14 Apr 2008 13:07:41 +0200, Davide Bianchi
wrote:
> Zbigniew Szalbot wrote:
>> Can you point me to documentation how to setup mail from for virtual
>> domains, which apache generates when users complete a form?
>
> No, we can only point you to the generical documentation of wathever
> programming language you're using for such form.

Sorry - I now realize I have incorrectly phrased my request. The below is
what I need:

>> configure it so that a script submitted from a virtual domain, would
> have
>> www@this-virtual-domain.tld envelope?
>
> Sure you can.

Can I ask how it can be done?

Many thanks!

Zbigniew Szalbot


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mail from for virtual hosts

am 14.04.2008 13:32:52 von Krist van Besien

On Mon, Apr 14, 2008 at 1:15 PM, Zbigniew Szalbot wrote:
> Sorry - I now realize I have incorrectly phrased my request. The below is
> what I need:
>
>
> >> configure it so that a script submitted from a virtual domain, would
> > have
> >> www@this-virtual-domain.tld envelope?
> >
> > Sure you can.
>
> Can I ask how it can be done?

This depends on what you use to write your scripts. Whatever you use
to send mail must have some option to set what the originating email
address is. But what this option is, and how you set it in your script
is not an apache issue.

Krist

--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mail from for virtual hosts

am 14.04.2008 13:43:37 von Zbigniew Szalbot

<48033AFD.6000301@onlyforfun.net>
<93cee5c3d0e46b212380a7950257e21f@localhost> <6ed6382b0804140432h1a1556eer9a8f70366852d314@mail.gmail.com>
Message-ID:
X-Sender: zszalbot@gmail.com
Received: from 192.168.11.1 [192.168.11.1]
with HTTP/1.1 (POST); Mon, 14 Apr 2008 13:43:37 +0200
User-Agent: RoundCube Webmail
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit


Hi,

On Mon, 14 Apr 2008 13:32:52 +0200, "Krist van Besien"
wrote:
> On Mon, Apr 14, 2008 at 1:15 PM, Zbigniew Szalbot
> wrote:
>> Sorry - I now realize I have incorrectly phrased my request. The below
> is
>> what I need:
>>
>>
>> >> configure it so that a script submitted from a virtual domain, would
>> > have
>> >> www@this-virtual-domain.tld envelope?
>> >
>> > Sure you can.
>>
>> Can I ask how it can be done?
>
> This depends on what you use to write your scripts. Whatever you use
> to send mail must have some option to set what the originating email
> address is. But what this option is, and how you set it in your script
> is not an apache issue.

I think I have a talent for badly wording my requests. ;)

By default my mail log file shows when a uses
submists a form (in other words it is always server's host name which gets
appended, not the virtual host name). The form is correctly configured to
use mail from for the emails. That's OK. I just want to see in my logs that
when a script at domain1.tld is submitted, it is shown in lgos as
, when from domain2.tld, then . Is this
configured in apache? If so, may I ask where?

Sorry for creating confusion!

Zbigniew Szalbot




------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mail from for virtual hosts

am 14.04.2008 13:57:10 von Graeme Fowler

On Mon, 2008-04-14 at 13:43 +0200, Zbigniew Szalbot wrote:
> I think I have a talent for badly wording my requests. ;)

I wouldn't say that entirely ;-) Hello there, by the way!

> By default my mail log file shows when a uses
> submists a form (in other words it is always server's host name which gets
> appended, not the virtual host name). The form is correctly configured to
> use mail from for the emails. That's OK. I just want to see in my logs that
> when a script at domain1.tld is submitted, it is shown in lgos as
> , when from domain2.tld, then . Is this
> configured in apache? If so, may I ask where?

Assuming you're not doing any form of user separation - that is, all
your user's CGI scripts and PHP pages are running under the webserver's
username (which is what it looks like) - that's really quite difficult.

If you *are* doing some form of separation - suEXEC, suPHP for example,
or one of the many other methods - which results in your users having
their own unique username and having their scripts run under that
username, not "www", then you could conceivably do some sort of incoming
sender map or rewrite. How you'd do that in Postfix I'm not 100% sure.

As others have mentioned, you could get it right by making sure that
your users have properly written scripts, but most (in my experience)
won't.

So the question is: do all your users have their scripts run under the
same user ID, or their own?

Graeme


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mail from for virtual hosts

am 14.04.2008 14:00:35 von Krist van Besien

On Mon, Apr 14, 2008 at 1:43 PM, Zbigniew Szalbot wrote:

> By default my mail log file shows when a uses
> submists a form (in other words it is always server's host name which gets
> appended, not the virtual host name). The form is correctly configured to
> use mail from for the emails. That's OK. I just want to see in my logs that
> when a script at domain1.tld is submitted, it is shown in lgos as
> , when from domain2.tld, then . Is this
> configured in apache? If so, may I ask where?

Again:
- Your script does something when a user submits the form. This
something causes a mail to be sent, and this mail is logged in your
mailserver's log. Now, this "something" that your form uses may, or
may not be able to set a different envelope address on the mails it
sends. But whether it is able to do this, or not is not an apache
issue. It is not apache that sends those mails. It is your script,
together with whatever supporting programs it uses, that does this.
It is however possible that whatever it is that sends mail for you
does use the "serveradmin" directive in the webserver config. You
might try setting it for each virtual host.

Krist

--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org