Afficher un message
Vieux 11/04/2006, 14h58   #2
Greg Hackney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Return path - Virtual domains

balman wrote:
> Ok this is the problem I have,
> I run a webserver with 2 domains hosted .. a.com and b.com
>
> both these servers require user registrations and these are sent off
> automatically
> by a perl script ..
>
> so for one i set "From => registrations@a.com'
> and from the other : From => registrations@b.com
>
> These mails are fired off via perl, using the webserver user.
>
> the problem i have, is this, since both are fired off by the same user,
>
> the Return-Path is both cases is webserveruser@a.com given my
>
> myhostname = mail.b.com
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> myorigin = b.com
> mydestination = localhost.localdomain , localhost.localdomain,
> localhost
>
> and all the usual virtual domains with mysql stuff ..
>
> I have dug and dug, and cannot find a way to make the "return-path"
> from a.com to be support@a.com and that of
> b.com to be support@b.com
>
> any ideas? on how i can get this to work, i know the Return-Path is set
> to $sender in sendmail or MAIL FROM
> Me specifying a From as part of my mail delivery script, should there
> set the Return-Path to the from address right?
>
> This does not happen.
>
> How can i make it work ..
>


You wrote:
"These mails are fired off via perl, using the webserver user.
both are fired off by the same user. these are sent off
automatically by a perl script"

I suspect that the solution will be within your perl script, and not Postfix.

The script not only needs to define the "From:" header in the message body,
as well as any other reply headers, but also needs to specify it's own sender
name for the MAIL FROM protocol (in the envelope address).

For example, depending upon which web server is doing the registration, the
script should effectively pass the mail something like this:

sendmail -f registrations@a.com < file
sendmail -f registrations@b.com < file

or whatever the syntax is for the particular package you to hand off the email.
--
Greg





  Réponse avec citation
 
Page generated in 0,05947 seconds with 9 queries