Domain's IP

pali1984

Verified User
Joined
Feb 10, 2008
Messages
8
Hello friends,

I am on directadmin from last month & facing a big problem that when any of my user send emails from their domains via php/or any other script. The mail source contains my server's ip address not the domain's ip address.

Can anybody help me resolve the problem.

yours truly,
Pali
 
I am on directadmin from last month & facing a big problem that when any of my user send emails from their domains via php/or any other script. The mail source contains my server's ip address not the domain's ip address.
By default, Exim is configured to use the server's main IP address. To use a different IP address, you need to modify /etc/exim.conf file.
 
By default, Exim is configured to use the server's main IP address. To use a different IP address, you need to modify /etc/exim.conf file.

Thanks for this info but how to do for each & every domain(s).

Can anybody tell me exactly...
 
can any body tell what exact to do in EXIM.CONF so that this problem will be over.
 
Add

Code:
interface = xxx.xxx.xxx.xxx

Under

Code:
remote_smtp:
driver = smtp

in /etc/exim.conf, then restart exim.
 
Add

Code:
interface = xxx.xxx.xxx.xxx

Under

Code:
remote_smtp:
driver = smtp

in /etc/exim.conf, then restart exim.

There are 7 domains hosted on my server right now. what will happen after this exactly that every mail from all domains contains that xx.xx.xx.xx IP ADDRESS.

I need mail with domain's ip only
 
Exim will always send from one IP address with this setup.
To change that single IP that it sends from use this guide (which was already pasted above)

http://help.directadmin.com/item.php?id=152

You can use exim commands on the "interface" value to do if-then-else type queries for the sending domain to specify which IP to send from based on the query, but it would require customization to the exim.conf.

This is a similar question:
http://forums.theplanet.com/index.php?showtopic=89503

I did find a solution on the servertune.com KB under the cpanel section (we both use exim)

http://servertune.com/kbase/entry/209/
(the remote_smtp section)

John
 
Code:
SSH to the server and edit /etc/exim.conf

Find default settings in Main Configuration section of your exim.conf near the top:

      smtp_banner = "$ ESMTP Exim $ \
      \#$ $ \n\
      We do not authorize the use of this system to transport unsolicited, \n\
      and/or bulk e-mail." 

Replace with:

      smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/ip_hostnames}{$value}{$primary_hostname}}

      smtp_banner = "$ ESMTP Exim $ \
      \#$ $ \n\
      whatever text or message you would like to put in here about UBE or your service\n\"

      next in TRANSPORT CONFIGURATION section near end of exim.conf 

Find:

      remote_smtp:
      driver = smtp 

 Replace or comment out with:

      remote_smtp:
      driver = smtp
      interface = ${lookup{$sender_address_domain}lsearch{/etc/domain_ips}{$value}{$interface_address}}
      helo_data = ${lookup{$interface_address}lsearch{/etc/ip_hostnames}{$value}{$smtp_active_hostname}}

I'm not able to find in exim.conf the following. & mailing system is stopped because of this
smtp_banner = "$ ESMTP Exim $ \
\#$ $ \n\
We do not authorize the use of this system to transport unsolicited, \n\
and/or bulk e-mail."

Kindly help me.:confused:
 
Just add it the smtp_banner section to the top part of the exim.conf. We don't have a default one, so just add it. As mentioned, the guide is for a cpanel setup, so it will be slightly different. Also note that you're venturing into uncharted waters. DA isn't setup that way, so it doesn't officially fall under our support. (Adding customizations to your services is allowed, but we're not experienced in every single customization avaiable, hence we have to draw the line somewhere.)

John
 
John, and others ...

Hmmm... should I add an smtp_banner system with a default anti-spam section before releasing the final SpamBlocker3? It's almost out but it won't add any appreciable time to add the code.

I like it because I'm in California and according to California law, if i post that I can actually have better recourse against spammers. I'd bet other jurisdictions offer relief based on "no trespassing" signs as well.

Of course this won't change the fact that neither DirectAdmin nor I (I maintain the SpamBlocker exim.conf file), will be responsible for any changes you make.

What do you think?

Jeff
 
Back
Top