Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Exim not using /etc/aliases file

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


andrew at rainsbrook

Apr 3, 2012, 4:45 AM

Post #1 of 4 (1341 views)
Permalink
Exim not using /etc/aliases file

Hi, I am using exim on a server to deliver mail to another exim server
which delivers to the corp exchange filth. All these are internal and mail
does not need to be routed to the internet.

gy-asp-mon01.prod.wagerware.net -> gy-inet04.gyprod.int.igt.com ->
exchange


I need to deliver mail to an address in /etc/aliases, rancid-admin-gy. The
lines in /etc/aliases are:-
[root [at] gy-asp-mon0 exim]# tail -12 /etc/aliases

# RANCID Aliases
rancid-admin-GY: uktechops [at] igt
#rancid-GY: richard.jones [at] igt
rancid-GY: uktechops [at] igt


scope: root
cacti: root

# Person who should get root's mail
root: andrew.stringer [at] igt
[root [at] gy-asp-mon0 exim]#

An initial debug picks up the correct smarthost and sending mail to real
users eg. xxx.yyy [at] igt works fine.

[root [at] gy-asp-mon0 exim]# exim -bt rancid-admin-GY
rancid-admin-GY [at] gy-asp-mon01
router = smarthost, transport = remote_smtp
host gy-inet04.gyprod.int.igt.com [172.27.201.121]


However looking in the main.log reveals that rancid-admin-GY is not
getting expanded out to uktechops [at] igt

My only thought is that /etc/aliases is not used to send mail, only to
receive it. If this is the case, how is the best way to expand an outgoing
alias?

And before you ask, I can't change the sending MUA to send to the correct
destination email address because it is hard coded :-}


Regards,
Andrew.


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


mike.kennedy at dillards

Apr 3, 2012, 7:07 AM

Post #2 of 4 (1304 views)
Permalink
Re: Exim not using /etc/aliases file [In reply to]

On Tue, Apr 3, 2012 at 6:45 AM, Andrew Stringer <andrew [at] rainsbrook>wrote:

> Hi, I am using exim on a server to deliver mail to another exim server
> which delivers to the corp exchange filth. All these are internal and mail
> does not need to be routed to the internet.
>
> gy-asp-mon01.prod.wagerware.net -> gy-inet04.gyprod.int.igt.com ->
> exchange
>
>
> I need to deliver mail to an address in /etc/aliases, rancid-admin-gy. The
> lines in /etc/aliases are:-
> [root [at] gy-asp-mon0 exim]# tail -12 /etc/aliases
>
> # RANCID Aliases
> rancid-admin-GY: uktechops [at] igt
> #rancid-GY: richard.jones [at] igt
> rancid-GY: uktechops [at] igt
>
>
> scope: root
> cacti: root
>
> # Person who should get root's mail
> root: andrew.stringer [at] igt
> [root [at] gy-asp-mon0 exim]#
>
> An initial debug picks up the correct smarthost and sending mail to real
> users eg. xxx.yyy [at] igt works fine.
>
> [root [at] gy-asp-mon0 exim]# exim -bt rancid-admin-GY
> rancid-admin-GY [at] gy-asp-mon01
> router = smarthost, transport = remote_smtp
> host gy-inet04.gyprod.int.igt.com [172.27.201.121]
>
>
> However looking in the main.log reveals that rancid-admin-GY is not
> getting expanded out to uktechops [at] igt
>
> My only thought is that /etc/aliases is not used to send mail, only to
> receive it. If this is the case, how is the best way to expand an outgoing
> alias?
>
> And before you ask, I can't change the sending MUA to send to the correct
> destination email address because it is hard coded :-}
>
>
> Regards,
> Andrew.
>
>
Accidentally sent this directly to Andrew at first...

Hi Andrew! My first guess would be that your rancid-admin-gy address is
being accepted by an earlier router than the system_aliases router. If you
haven't changed the router section that comes out of the box, you should
verify that your local_domains list contains
gy-asp-mono1.prod.wagerware.net (possibly
@). If you have modified the routers section in your config file, I'd say
it deserves another look.

I don't believe exim logs actions taken by routers that use the redirect
driver, but it should log the router that finally accepts the email as
"R=router" in the delivery line in mainlog, which may put you on the right
track.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


tlyons at ivenue

Apr 3, 2012, 7:13 AM

Post #3 of 4 (1298 views)
Permalink
Re: Exim not using /etc/aliases file [In reply to]

On Tue, Apr 3, 2012 at 4:45 AM, Andrew Stringer <andrew [at] rainsbrook> wrote:

> I need to deliver mail to an address in /etc/aliases, rancid-admin-gy. The

I assume you have a router and transport which actually reads
/etc/aliases? And this router is processed chronologically before the
remote smtp transport:

> [root [at] gy-asp-mon0 exim]# exim  -bt rancid-admin-GY
> rancid-admin-GY [at] gy-asp-mon01
>  router = smarthost, transport = remote_smtp
>  host gy-inet04.gyprod.int.igt.com [172.27.201.121]

> However looking in the main.log reveals that rancid-admin-GY is not
> getting expanded out to uktechops [at] igt

Are you talking about the smtp envelope?
Are you talking about header rewriting?
Your best bet is to use tcpdump or ngrep to look at the smtp
conversation occurring between your rancid machine and the smtp server
it's sending it to.

> My only thought is that /etc/aliases is not used to send mail, only to
> receive it. If this is the case, how is the best way to expand an outgoing
> alias?

If you're sending it from localhost to localhost, that's "receiving" it.

> And before you ask, I can't change the sending MUA to send to the correct
> destination email address because it is hard coded :-}

No need, you should be able to expand your aliases.

...Todd
--
Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. -- Martin Golding

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


andrew at rainsbrook

Apr 3, 2012, 7:13 AM

Post #4 of 4 (1305 views)
Permalink
Re: Exim not using /etc/aliases file [In reply to]

Following a bit more digging I have a clearer picture of what is happening
(or not).

All the mail should go to external accounts, there are no local users who
will try to read mail.

However because of the way Rancid works, it has a hard coded email address
with a -suffix which expects to be delivered locally via the /etc/aliases
file.
However I have a smarthost at the top of my routers, so all mail is sent
to the relay, including traffic which should be passed through the alises.

begin routers

smarthost:
driver = manualroute
domains = *
transport = remote_smtp
route_data = gy-inet04.gyprod.int.igt.com


I think I should move the smarthost lower down the chain so that local
aliases are inspected in system_aliases.

Regards,
Andrew.





> Hi, I am using exim on a server to deliver mail to another exim server
> which delivers to the corp exchange filth. All these are internal and
mail
> does not need to be routed to the internet.
>
> gy-asp-mon01.prod.wagerware.net -> gy-inet04.gyprod.int.igt.com ->
> exchange
>
>
> I need to deliver mail to an address in /etc/aliases, rancid-admin-gy.
The
> lines in /etc/aliases are:-
> [root [at] gy-asp-mon0 exim]# tail -12 /etc/aliases
>
> # RANCID Aliases
> rancid-admin-GY: uktechops [at] igt
> #rancid-GY: richard.jones [at] igt
> rancid-GY: uktechops [at] igt
>
>
> scope: root
> cacti: root
>
> # Person who should get root's mail
> root: andrew.stringer [at] igt
> [root [at] gy-asp-mon0 exim]#
>
> An initial debug picks up the correct smarthost and sending mail to real
> users eg. xxx.yyy [at] igt works fine.
>
> [root [at] gy-asp-mon0 exim]# exim -bt rancid-admin-GY
> rancid-admin-GY [at] gy-asp-mon01
> router = smarthost, transport = remote_smtp
> host gy-inet04.gyprod.int.igt.com [172.27.201.121]
>
>
> However looking in the main.log reveals that rancid-admin-GY is not
> getting expanded out to uktechops [at] igt
>
> My only thought is that /etc/aliases is not used to send mail, only to
> receive it. If this is the case, how is the best way to expand an
outgoing
> alias?
>
> And before you ask, I can't change the sending MUA to send to the
correct
> destination email address because it is hard coded :-}
>
>
> Regards,
> Andrew.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.