> > I am trying to see if it's possible when hosting mail for multiple domains 
> > if 

> it's possible to get the actual domain to which the message belongs in all 
> the 
> email headers instead of always having it fall back to the "main" 
> domain/hostname.
> >
> > I think the following header is written out by amavisd-new (please correct 
> > me 
> if I'm wrong):
> 
> inbound, or outbound?

In this case, outbound, but I'm not sure it matters, at least when amavis is 
used as a content_filter in postfix - you can use that in both scenarios and 
I'm sure the functionality differs, at least with mostly default settings.

> and, munging the names/ip's can mess things up, since, amavisd, postfix, 
> x-forward all some into play here.
> 
> (as an example, its hard to tell what part is munged, and what part to 
> help you on)

That's why I specifically pointed out the issues (#1, #2, #3).  Please re-read 
what I wrote.  To reiterate, "diamond.example.com" is the local hostname.  The 
machine is also known as "mail.example.com".  I host another domain on the 
machine called "other.com."  I DO NOT want the two "example.com" parts in the 
header.  I am looking for a way to replace them with "other.com" (when the 
sender sends from that domain, in which case postfix's myhostname and mydomain 
are "mail.other.com"/"other.com").  

The ONLY things of importance that I munged were the domain names, but they are 
consistent with my explanations/questions.

I am additionally trying to understand how to forward back to postfix on a 
different port depending on this domain.

> mung the user name, ok, maybe not the domain, what can it hurt?
> 
> your ip/dns names, internal ip's all show up in the headers to this 
> email anyway.
> 
> all you do is make it harder for people to look at it and help.  Like I 
> said, we don't know what amavis or postfix munged, and what you munged.

I don't think it's rocket science.  I'm only needing to change the domain names 
that show up in the header amavis spits out.

> > Received: from mail.example.com ([127.0.0.1])
> >         by localhost (diamond.example.com [127.0.0.1]) (amavisd-new, port 
> 10024)
> >         with ESMTP id 26IWMZMJeY2B for ;
> >         Tue, 13 Oct 2009 17:11:50 -0400 (EDT)
> >
> > In my case, the local machine hostname is "diamond.example.com" and it is 
> > also 
> my mail server, "mail.example.com".  But in this case, the message is being 
> sent 
> by a user in a domain called, say, "other.com".  I have a Postfix 
> configuration 
> where its headers are added using "other.com", but this header is the problem.
> >
> > It seems that "diamond.example.com" in this header is just caused by amavis 
> grabbing the local machine hostname (problem #1 - is this possible to 
> change?).
> >
> > But as for how amavis got "mail.example.com", I am not entirely sure, since 
> the handoff came from a Postfix instance where its mydomain is "other.com" 
> and 
> its myhostname is "mail.other.com" (problem #2 - where does this come from 
> and 
> can I change it?).
> > \
> >  
> 
> > Problem #3 is in regard to the handoff back to Postfix.  Is is possible to 
> determine the mydomain from what Postfix is using and then change the 
> $notify_method and $forward_method according to that domain?
> >
> >  
> use policy banks, different ports to listen to, or different ip's.

I'm happy to read about how to do this, but not sure where to look.  Are you 
saying it's possible to run ONE instance of amavis listening on more than one 
port, and that I can apply different configuration values depending on that 
port?  That'd be the easiest and best way to do this, but it seems to me that 
I'd have to run multiple instances of amavis, which is not desirable in this 
case.

Sorry you didn't understand the other parts, hopefully I cleared that up.  Your 
response is much appreciated.


      

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to