View Full Version : Reseller mail header problem
loopforever
04-09-2004, 10:39 AM
Hi guys,
We give our resellers their own IP addresses (two). And they're completely transparent, however, when they send mail, the mail headers show up with the hostname of the server it was sent from. Is there anyway we Exim can determine where mail is being sent from (ip-wise) so our resellers remain transparent?
Thanks :).
nobaloney
04-09-2004, 11:17 AM
Probably.
This is a great question to research at exim.org, or to ask on the exim-users mailing list:
http://www.exim.org/mailman/listinfo/exim-users
Jeff
loopforever
04-09-2004, 12:46 PM
I think I may have fixed it, I'll follow up again later. What I did was add the reseller IP into /etc/hosts so that his IP is recognized as a valid hostname, rather than defaulting to the machine's hostname. I'm going to have a client test it out and see what happens.
nobaloney
04-09-2004, 01:01 PM
I'd be surprised if that fixes it; please let me know by posting again here; I'll get an email notification when you do.
Thanks.
Jeff
loopforever
04-12-2004, 01:49 PM
No go, unfortunately. I'd venture to say this is something that just isn't fixable. Closest anyone can get to offering completely transparent resellers is setting the hostname of all their machines to some cryptic domain that you own that acts as a go-between for you and your clients. Perhaps this is something John can look into for future releases (getting mail header to show up properly).
nobaloney
04-12-2004, 06:41 PM
Have you asked the exim list people? I would.
Here's what I use for my "cryptic name" :) :
da1.ns-one.net, da2.ns-one.net, and so forth.
Look at my whois record.
I think that's fairly cryptic.
If I need more cryptic I can always move the registration to my registrations-by-proxy system.
Jeff
loopforever
04-15-2004, 06:24 PM
I found out what's causing this, and I was kinda on the right track updating my hosts file. This is from exim.conf:
# Specify your host's canonical name here. This should normally be the fully
# qualified "official" name of your host. If this option is not set, the
# uname() function is called to obtain the name.
# primary_hostname =
So, because this is commented out, it defaults to whatever is returned by uname/hostname. There has to be a way to override this, or have it determine the hostname based on IP. I'm afraid to ask on the mailing list - I've never done it before :-p - and I'm thinking I'll be spammed to high heaven if I put my e-mail address in there.
nobaloney
04-15-2004, 07:25 PM
Matt, you can join and post to exim-users, or get someone else to post it for you, or pay someone else to post it for you, or live without knowing.
Frankly, I'm not curious enough to spend the time posting and looking for the answer, because we run like just about everyone else on the Internet; we return the canonical name of the mailserver.
If you don't, then you may be out of compliance with a few RFCs and if so you'll likely see a lot of sites blocking your email.
If a customer just has to have the mailserver respond with their name, then they're not going to find anyone else to do it for them either; they're going to have to get their own server. So rent them their own server if they insist.
And your way, what would you do for your shared IP# accounts?
Jeff
loopforever
04-16-2004, 09:50 AM
I'm not looking to forge any headers or anything, and I don't want to be non-compliant with any standards that would risk my client's e-mails being blocked. All I really wish was possible is for Exim to appropriately select the hostname, based on the reseller's main IP - rather than always defaulting to the machine's hostname. I think this is important for two reasons:
1) It would make a reseller completely anonymous.
2) If a reseller, or a client of a reseller SPAMs, it can be easily identified through the mail header, which reseller account it was done through, so action could be taken appropriately. If every reseller and their client's get their mail sent through our main ip/hostname, then idenifying the culprit would be significantly more difficult, since hundreds of domains are all getting mail sent through the main ip, rather than the ip that was assigned to each indivdual reseller.
I guess I can post on exim-users with my personal address (since it's spammed to high heaven anyway) and see what gets brought up. Hopefully someone will have a resolution to this problem :).
loopforever
04-16-2004, 12:22 PM
Just posted on exim-users and got a response almost instantly. I'm trying to get a few more details and then I'll get in touch with John and figure out the correct way to implement this without breaking Exim for all our users. I'll let you know if/when it works ;).
loopforever
04-16-2004, 01:30 PM
Alright, I've got a solution, I just need to speak with John about getting an additional feature implemented with DA.
Okay, so first and foremost, when DA creates a reseller account it must write to a file, which I will call eximhosts. I'm going to go ahead and say that this file should be found in /etc/eximhosts. The format of this file is:
123.102.202.22: ns1.resellertwo.com
123.102.202.45: ns1.resellerone.com
*: hostname.ofmachine.com
Where ns1.resellertwo/one.com is simply t he hostname of the reseller.
Whenever DA creates a reseller using two or three IPs, it must write to the eximhosts file and index, in the above format, the IP address and hostname of the reseller. The hostname of the reseller should be whatever their main IP is set to in DA.
Next, in exim.conf, the following must be added (I'm unsure where exactly, since I am not anywhere near knowledgable when it comes to Exim):
helo_data = ${lookup{$interface_address}lsearch*{/etc/eximhosts}}
According to the user I spoke with, this will completely resolve the hostname problem. In addition DA can safely advertise that it is possible for admins to create 100% transparent reseller accounts.
In my opinion this feature should be implemented ASAP, since reseller accounts are not truely transparent at this time. Shouldn't be hard to do this either. Just need to find out where the helo_data line goes.
I'm going to direct John to this thread and see what can be done.
nobaloney
04-17-2004, 12:35 PM
Originally posted by loopforever
I guess I can post on exim-users with my personal address (since it's spammed to high heaven anyway)
I've used "blists" as my email local_part for mailing ists over a year now and I've not gotten one piece of spam to it yet (but we do heavy spamblocking). If spam to that address ever becomes a problem I'll just change my address on all the lists to clists, and turn blists off.
Jeff
nobaloney
04-17-2004, 12:47 PM
Originally posted by loopforever
(I'm unsure where exactly, since I am not anywhere near knowledgable when it comes to Exim)
I don't have my exim book handy right now, but I believe it's a "main configuration item" and can go anywhere under "MAIN CONFIGURATION SETTINGS".
And you don't have to wait for John; you can certainly implement it yourself. You'll just have to maintain the file manually.
I'll probably go ahead and add it to my exim file as well.
Jeff
ProWebUK
04-17-2004, 01:41 PM
You could just use the upon site creatuion scripts to do it..... have it check the file and its contents for X, if it exists just create the site and ignore it, else set it up :)
Chris
loopforever
04-17-2004, 03:11 PM
I know it can be done manually but the absolute answer to the problem is to just have it implemented with DA. In the mean time I'm going to do it by hand just to make sure it works. If either of you guys try this out, let me know :).
loopforever
04-17-2004, 05:06 PM
Just tried it out, the helo_data variable cannot be set in main, exim errors while starting. Any other ideas as to which area this should go in?
nobaloney
04-18-2004, 11:01 AM
Sorry 'bout that; I now believe it goes in the remote_smtp transport.
Probably at the top of the transport, though I'm not sure :( .
I've asked Andreas, who answered Matt's original question on exim-users. I'll hopefully get an authoritative answer soon.
Jeff
nobaloney
04-18-2004, 12:35 PM
Matthew Byng-Maddick was nice enough to respond on the exim-users list.
He wrote:
http://www.exim.org/exim-html-4.30/doc/html/spec_30.html#IX2058
so "in whatever you call your instance of the smtp transport where you want
this done".
Based on his reply to my post; it looks as if it should go in the remote_smtp transport.
Jeff
loopforever
04-18-2004, 05:55 PM
Thanks for clarifying that, I just modified my exim.conf and restarted exim, so exim.conf looks like this:
remote_smtp:
driver = smtp
helo_data = ${lookup{$interface_address}lsearch*{/etc/eximhosts}}
(in transports)
Unfortunately still no luck - I'll keep playing.
nobaloney
04-19-2004, 11:16 AM
I'd say reply back to exim-users; that'll get a response from the real experts :) .
Jeff
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.