RE: [Exim] Masquerade needed for outbound mail.

Inizio della pagina
Delete this message
Reply to this message
Autore: Kevin Reed
Data:  
To: 'exim Users'
Oggetto: RE: [Exim] Masquerade needed for outbound mail.
Kevin Reed Wrote...
>
> Kevin Reed Wrote
> >
> > smarthost_smtp:
> >      driver = smtp
> >      headers_rewrite = *@*.my.domain $1@???
> >      return_path = MAILER-DAEMON@???


After thinking about this for a couple days, I think I know what I'd like to
do in this area, but I'm not quite sure how to deal with it.

While we currently only have one domain to deal with at the moment, I
believe we are going to need to deal with a second one shortly. Seems to
make sense to have some sort of lookup in case this starts to get wildly out
of control.

The boxes that are mail servers now are very basic configs, no mysql or
other databases on them yet, and due to the large amount of other stuff that
needs to be done, changing that right now, is not really a good use of time
so, I think using a basic flat file would be best for the time being. In a
couple months, I plan on rebuilding them and will at that time be able to
enhance this if necessary.

When sending mail outside or at least towards the outside, I'd like to
compare against a list of domains and act if they are matched so that the
outbound smarthost smtp transport will properly rewrite the headers.

Assuming a list of domains like:

alpha.com
beta.com
delta.com

Is there a way for the transport listed above to do something like:

Senders email is: user@??? rewritten as user@??? but
have the Return_Path also changed to be user@???.

Sender email is: user@??? doesn't match domain in flat
file, so don't bother rewriting.

This would mimic the current Sendmail configuration that is on the system.
I thought it was changing the Return_Path to MAILER-DAEMON@??? but
after a lot of other testing I see that it is not.

Note that at the moment, there are few actual users that send mail from the
Unix boxes. Most of the mail is going to be from applications which would
produce mail like someapp@???. This currently would
result in the headers changing to someapp@??? (the Return_Path as
well).

Since all mail arriving for user@??? is forwarded to the Exchange
servers, some apps have setup as user name in exchange their appname so they
can get the bounces. Others don't, but none of it heads back to Unix boxes
right now at all.

I realize, I might need to do this list check above in a router instead, and
then just use different transports for each domain, but I would still need
to know how to properly get the Return_Path as user@???.

If this is not possible or too unwieldly, I could just setup a router for
each domain which points to its own domain_smarthost_smtp transport, but I
still would need to be able to rewrite both the headers and the Return_path
to the local_part@???.