logs archiveIRC Archive / Freenode / #exim / 2010 / June / 21 / 1
Vampire0
Hi, I'm trying to use $local_interfaces in a transport, but Exim tells me 'unknown variable name "local_interfaces"' :-(
Can anybody eventually tell me where the error in my mind is?
HermanDE_
Vampire0, Which exim version are you running?
Vampire0
4.69
Any idea HermanDE_ ?
HermanDE_
Vampire0, I'm checking my configs really quickly..... Just by memory... the dollar sign might be wrong....
... Hmm got a fracture....
Hello
fscking ISP/Chat/world/computers/servers/
Vampire0
but without the dollar it will not be expanded, will it?
HermanDE_
My typing is gone in this room....
Vampire0
the message most probably will go away, but the effect is not the intended one
HermanDE_
the room chat might be failing...
Vampire0
?
         

HermanDE_
My irc client is failing...
Vampire0
failing in which extent?
HermanDE_
I can't see my typing...
So, I'm guessing about how it looks....
Ok....
Vampire0
hm, that's weird, at least I can read what you type
HermanDE_
Can you pastebin the stanza for the transport?
Vampire0, Did you assign it in the first place?
local_interfaces needs to be defined before it can be used.
Vampire0
The relevant part is
interface = ${lookup dnsdb {>: a=$sender_address_domain}{${if match_ip{$value}{local_interfaces}{$value}fail}fail}
HermanDE_
When assigning it use it with out a dollar sign....
Vampire0
And local_interfaces should have a default value
ah, while i'm thinking about it, it wouldn't help me anyway, as the default value is not what I want here. *grml*
HermanDE_
Crafting Exim can be fun....
Vampire0
CAN
HermanDE_
Have you used the debug feature of exim? Works very well....
Vampire0
*g*
Yeah, just used it for this case if you mean -d+transport
but it doesn't give me more than the log in this case
telling me that the variable doesn't exist what I find strange as it has a default value
HermanDE_
As in a straight failure of a variable.... I'll bet that it's not assigned.... Thus... Not a real variable...
Vampire0, I'm running from Debian.... The canned Exim.conf had local_interface defined in the top of the config.
Vampire0
I'm also runnign on Debian
HermanDE_
I just haven't fscked with it... And it's worked well...
Vampire0
but it isn't set for me
HermanDE_
That is that particular variable....
Vampire0
i'm currently already trying to set it
HermanDE_
Do you have your configs split?
Vampire0
Yes and no, I have the exim4.config.template generated from the split conf and then incorporated with update-exim4.conf.conf and exim3.conf.localmacros
Just the Debian default way
Now local_interfaces is set, as I've set the MAIN_LOCAL_INTERFACES macro, but still the same error is shown :-(
It seems you can only set but not use that variable :-(
         

HermanDE_
Hmm.... Should have the ability to use it.....
Try.... $interface_address
This fits the ip address match much better....
or $received_ip_address
Vampire0
Why should I use $received_ip_address HermanDE_? That is semantically something completely different from what I need.
I've done it now with the MAIN_LOCAL_INTERFACES macro and now it does what I want
or is there maybe a better way to do it?
what I try to achieve is the following
HermanDE_
No clue about what you are trying to do....
Vampire0
I have a box with 2 IPs and 2 Domains. One IP resolves to one Domain and respectively the other way round
I want exim to use IP1 if a mail from Domain1 is sent and IP2 if a mail from Domain2 is sent
HermanDE_
Ok... And you are trying to run a single instance of EXIM?
Vampire0
exactly
Hence the dnsdb lookup to get the IP for the $sender_address_domain
HermanDE_
http://www.exim.org/exim-html-4.69/doc/html/spec_html/ch11.html#SECTexpvar
look at $received_ip_address
That stanza might be missing some curly brackets.....
Vampire0
mine? yes, that is fixed already
what would received_ip_address help me, especially for locally submitted mails
HermanDE_
I've spent too many hours confused about conditionals in EXIM...
Vampire0, So you would receive the email on 127.0.0,1?
As a webmail system?
Vampire0
No, locally submitted
not over TCP/IP
Maybe also via some webmail system in the future, we will see
HermanDE_
Ok.... So someone at the console sends an email out.... Via a sendmail command....
Vampire0
exactly
or more precisely in this case, a cronjob
HermanDE_
So, you need exim to differentiate between two different domains from one instance without a known ip address.....
Vampire0
exactly. And I would like to prevent hard-coding the IPs in an if-clause
HermanDE_
Vampire0, I'd suggest setting up aliases for the cronjob or root....
Create root.domain1 and root.domain2..... Or domain1cronuser domain2cronuser
A quick test can solve the issue....
Vampire0
Only if I hard-code the IPs what I want to prevent as I just told you
HermanDE_
Vampire0, Or use a local prefix...
Vampire0
How would that help in not hard-coding the IPs?
HermanDE_
Ok.... Where does hard coding the IP's come into play....
Vampire0
Of course I could do something like ${if eq{$sender_address_domain}{domain1}{1.1.1.1}{${if eq{$sender_address_domain}{domain2}{2.2.2.2}fail}, but that is what I want to prevent
HermanDE_
A simple test of a local part in the router section... Then a dump to a specific transport.... Use the test to test for a local prefox.. (dom1-chron) test for dom1.... Then send it from the "Domain1" transport.
If you are dealing with a locally submitted email... Sendmail..... It will directly submit the email to the queue. Which interface would/could you test for?
Vampire0
And then? I still have to hard-code the IP in the transport, just that I make the if in the router and have to have one transport per ip
I'm not testing for any interface, YOU suggested to use received_ip_address
HermanDE_
And I misunderstood your original question.... Prior to the locally submitted message comment.....
Vampire0, Create a quick lookup for outgoing.... Create an outgoing lookup table.... Have the transport take the prefix and use it as the lookup key.....
The move it across the specific interface....
I've never setup an email server this way.... But it should work fine....
Vampire0
Hm, yes, this should work. But I still would have to setup the IPs at another place :-/
thanks for you help
HermanDE_
So you could use dom1-root or dom2-root.... Conversely you could use the suffix....
Vampire0
I will sleep about it now, it is almost 4 AM here already
HermanDE_
Why.... Use DNS lookups.... Is this machine using DHCP?
Vampire0
no
HermanDE_
REmember this stuff is fun.... ")
Vampire0
but mapping domain<->IP is already there
HermanDE_
Vampire0, Use that....
Vampire0
What?
HermanDE_
I'm assuming that you have a DNS server.... And that DNS server is where the mapping exists.... use a dnslookup in your transport....
Vampire0, And use the DNSlookup for your outgoing interface in the transport...
Vampire0
you are tired also already, aren't you?
That is exactly what I had prior to coming here
the snippet I posted here does exactly that
the problem is
HermanDE_
Actually getting ready to take a production server and switch the Cyrus DB's to skiplist.... bdb is failing....
Then starting on a VOIP after.....
Vampire0
The domain I'm relaying mail for has a non-local IP
So I have to check the result of the dns lookup
for being a local IP
for that I wanted to use $local_interfaces
But I just got the message that this variable doesn't exist
HermanDE_
So, you are relaying email?
Are you modifying the headers of the emails?
---Do you wish to modify the headers?
Sounds like you need a different route/transport for the relaying......
then another set of route/transports for the local mail....
Vampire0
but then I would still have to have a way to differentiate between the two of them. And I wanted to make it as generic as possible
HermanDE_
Every exim I've setup has had at least 10 different routes and a 5 transports......
Vampire0
however, I really have to get some sleep now
cu l8er, thanks for your time
HermanDE_
Vampire0, That will probably not work well.... Routes and transports in Exim are just too easy to create/destroy....
Nite nite...
sepski
how can i modify the global 550 no such user, error message ? i can only find alias based user spesific solution when i google.
phx
sepski, docs
pro
morning guys.
if i have smtp_accept_max and smtp_accept_max_per_connection and smtp_accept_max_per_host set, and I want to allow just one IP to send with out limit, how can I do that?
phx
send without limit, or send with outlimit?
pro
i want one of my web servers to be able to send as much as it likes
so one IP should have no limit on what it can send and to how many it can send to
phx
you can use expansions at setting such variables
pro, http://exim.org/exim-html-current/doc/html/spec_html/ch11.html
pro
i dont recall seeing that in the docs, do you have an example?
thank you
ok, i still dont get how i can do that then
phx
${if
finish it :)
pro
yeah, thats the part im not getting, how do i tell it that x=y then limit = 3000 else limit = 20 ?
cause it that setting... wait.... let me figure this out
i have read that someone says The value for smtp_accept_max_per_connection is not an expansion string, so has
to be the same for all situations.
djce
pro: So it seems to be, but you can always set a lower limit using acl_c_ variables.
pro
yeah, i see that too
bbl, going to shop
borei
hi all
quick question, does exim reread configuration file all the time, or during restart only ?
phx
it's in the docs
borei
from exim wiki : "configuration file is re-read at every exec,"
thanks
Farkie
Hey. I have a server setup, which hosts a lot of domains, but some MX records point elsewhere
how can i set exim to deliver them non-locally
(i want to specify which domains)
phx
Farkie, docs, and routers and transports section
Farkie
:/ link? i founda few on that
http://wiki.exim.org/FAQ/Routing_to_remote_hosts/Q0306
will that one do it?
phx
Farkie
Thanks, still don't know what i'm looking for, but i'm gunna have to go
phx
told you
hay
hi all... I would like to have exim to send out mail through my primary mail server.. how can I achieve this?
phx
« prev next »