Page 1 of 5 123 ... LastLast
Results 1 to 20 of 88

Thread: Exim sending messages with ip assigned to other users

  1. #1
    Join Date
    May 2010
    Posts
    5

    Exim sending messages with ip assigned to other users

    Hi,

    i have my first license of DirectAdmin and i have problem with exim.
    Server is running on CentOS 5.3 x64 and there are one eth0 interface with 3 added ip aliases: eth0:0 - eth0:2
    I have main eth0 ip for admin domain and 3 ip - one reseller with 2 users, every has one domain with dedicated dns configuration.
    Everything works fine but when i'm sending message from any of this domain ehlo connection is always from ip assigned for domain with higher number at the end of the in ip address and there is en error with spf check for sender.

    I suppose that this is something with exim.conf connected with domain resolving but it is not changed after instalation, maybe you can help me with this confusing situation.

    All domains and users are configured correct, ip addresses are assigned, not sharing with server ip.
    exim conf version is: SpamBlocker.exim.conf.2.1.1-release 05-Jun-2007


    Thanks for any help
    Piotr
    Last edited by shadow79; 05-18-2010 at 04:02 PM. Reason: adding info about current version of exim.conf

  2. #2
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,122
    Unless you've changed your exim.conf file, it defaults to send all email on the main server IP#; this is what most of us want to use, because most of us use rDNS for that IP# to the hostname.

    To change the IP#, find the lines:
    Code:
    remote_smtp:
    driver = smtp
    and add the line:
    Code:
    interface = 22.22.22.22
    immediately below, each time it appears, of course replacing 22.22.22.22 with the IP# on your server which you want to use.

    If you want to enable mail sending on specific IP#s, based on domains, search these forums; it's been discussed.

    By default DirectAdmin will write the main IP# into each spf record; you can change the template (be sure to move it to the custom directory first) if you want to use a different IP#.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  3. #3
    Join Date
    Oct 2003
    Location
    Switzerland
    Posts
    2,099
    You can customize exim.conf to send and receive from the correct user IP, using the user's own SSL cert and protecting his reputation or protecting your server (depending on who he is ).
    Olivier
    interfaCentre - We design custom hosting solutions

    Custom apps, scripts and configurations for easy and secure access to all hosting services
    Full Personal Information Management suite with mobile synchronisation
    PHP, Ruby, Node.js and Python hosting with 1-click app install

  4. #4
    Join Date
    May 2010
    Posts
    5

    Smile

    Quote Originally Posted by jlasman View Post
    Unless you've changed your exim.conf file, it defaults to send all email on the main server IP#; this is what most of us want to use, because most of us use rDNS for that IP# to the hostname.

    To change the IP#, find the lines:
    Code:
    remote_smtp:
    driver = smtp
    and add the line:
    Code:
    interface = 22.22.22.22
    immediately below, each time it appears, of course replacing 22.22.22.22 with the IP# on your server which you want to use.

    If you want to enable mail sending on specific IP#s, based on domains, search these forums; it's been discussed.

    By default DirectAdmin will write the main IP# into each spf record; you can change the template (be sure to move it to the custom directory first) if you want to use a different IP#.

    Jeff
    Thanks for your advices, I have put this lines into exim.conf and it works now:

    local_interfaces = a.a.a.a : b.b.b.b : c.c.c.c : d.d.d.d
    smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/virtual/smtp_active_hostnames}{$value}}
    smtp_banner = "$smtp_active_hostname ESMTP $tod_full"

    create new file smtp_active_hostname with ip: hostname compare for every domain and ip address

    remote_smtp:
    driver = smtp
    interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"
    helo_data = "mail.$sender_address_domain"

    and create file domainips with domain: ip address compare for every domain and ip address

    Best Regards
    Piter
    Last edited by shadow79; 05-19-2010 at 02:02 PM. Reason: to many quotas

  5. #5
    Join Date
    Jan 2009
    Location
    Los Angeles CA
    Posts
    234

    Exclamation

    Does anyone have a script for this or can it be built into DA as a feature? In my situation I have both a /29 and a /27 IP block and I have a couple of my bigger customers barking at me about emails going to Yahoo or GMail not making it through.

    Quote Originally Posted by shadow79 View Post
    Thanks for your advices, I have put this lines into exim.conf and it works now:

    local_interfaces = a.a.a.a : b.b.b.b : c.c.c.c : d.d.d.d
    smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/virtual/smtp_active_hostnames}{$value}}
    smtp_banner = "$smtp_active_hostname ESMTP $tod_full"

    create new file smtp_active_hostname with ip: hostname compare for every domain and ip address

    remote_smtp:
    driver = smtp
    interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"
    helo_data = "mail.$sender_address_domain"

    and create file domainips with domain: ip address compare for every domain and ip address

    Best Regards
    Piter

  6. #6
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,122
    I can't see why you would need a script to make a change to exim.conf and to create a file once. Since SpamBlocker Version 4 is now finished, I'm not going to make any changes to the exim.conf file, and most of us don't need it.

    Are you telling us that Yahoo and GMail aren't accepting mail from your server if your domain is on a different IP#? Mail should be going out from your server IP# and I know of no domain that won't accept email because the mail server uses a different IP#.

    For example, nobaloney.net is on it's own IP#, yet all it's email goes out from the server IP#.

    The fact that you have different IP# blocks shouldn't make a difference because the mail should be going out from your main IP#.

    In fact the fix discussed by shadow79 won't make a difference if the problem has anything to do with your /29 and /27.

    Check your logs to see if Gmail and Yahoo are accepting the email. If not, find out why. If yes, find out why they're accepting the email and then not delivering it. Until you know, there's very little you can do to resolve the problem.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  7. #7
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,696
    Maybe the mails are getting through, but they're being dumped and marked as Junk? Many people, including me, see this problem so many times even though theres a SPF record added.
    Regards, Peter
    UK Web Hosting - Professional & Reliable Shared and VPS Hosting! Offering DirectAdmin licences on our VPS's

  8. #8
    Join Date
    Oct 2010
    Posts
    2

    Subdomain

    Hello,

    Do you think that is this work for subdomains like:

    abc.com: 11.22.33.44
    sub.abc.com: 55.66.77.88

    in domainips file.

    Thanks
    Mesut TUNGA

  9. #9
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,122
    It could, but only if your server works with both IP#s.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  10. #10
    Join Date
    Dec 2009
    Location
    Los Angeles, CA
    Posts
    11

    A few questions for clarity

    Jeff - you mention,

    If you want to enable mail sending on specific IP#s, based on domains, search these forums; it's been discussed.

    Can you provide a link to this thread? I can not find any other threads on this subject other than this one. - thank you.

    Regarding the Instructions by Shadow79:

    I have added the lines to the exim.conf as instructed.

    However, I don't completely understand the following instruction:

    create new file smtp_active_hostname with ip: hostname compare for every domain and ip address

    I created a file called "smtp_active_hostname" with the following code:

    remote_smtp:
    driver = smtp
    interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"
    helo_data = "mail.$sender_address_domain"


    I created the file in the following directory, /etc/virtual/

    • Was I suppose to replace any of the above information with my own IPs or hostnames?

    • Does ownership of the new files matter? Must they be owned by "mail" to work properly?

    • Where do I add the "ip: hostname" for "...every domain and ip address?"


    I have created the file "domainips" as instructed but EXIM does not restart.

    I'm doing something wrong but can't figure out what.

    Thank you for your help,

    Eric Bergez
    Broadband Comedy Network, Inc.
    http://www.bcnonline.com

  11. #11
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,122
    I was working from memory; probably referring to previous posts in this thread.

    Read man exim to learn how to test your configuration file; you should then see the error that's keeping exim from restarting.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  12. #12
    Join Date
    Mar 2005
    Posts
    5,272
    Can you provide a link to this thread? I can not find any other threads on this subject other than this one. - thank you.

    http://www.directadmin.com/forum/sho...t=16479&page=3

    #58 works.
    Floyd Morrissette Little Creek Solutions
    Web Hosting Solutions. XEN Virtual Private Servers, VMWare .....
    DirectAdmin Administration and Support
    Our focus is on quality customer support

  13. #13
    Join Date
    Dec 2009
    Location
    Los Angeles, CA
    Posts
    11
    Floyd -

    Thank you for the link.

    I made the changes as you recommended in #58 to the exmi.conf file and created the new "Interfaces" file in the /etc/virtual/ directory adding each URL and corresponding IP address.

    EXIM started correctly but this did not appear to fix the domain ehlo connection problem.

    According the my client, when they send an email from their website the ehlo is still using my servers default hostname rather than their websites hostname.

    This was suppose to fix this, correct?

    Thank you,

    Eric Bergez
    BCN, Inc.
    http://www.bcnonline.com

  14. #14
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,122
    All that will do is use the outgoing IP#. It won't change the HELO from the default.

    The helo command uses the hostname; I don't think it can be reset at will, but I'm not sure; do some research in exim documentation at http://www.exim.org/.

    Find some information in Edit#1 in my newest exim.conf file, here.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  15. #15
    Join Date
    Mar 2005
    Posts
    5,272
    Granted this is just my opinion but if your users want that level of control they should be on a VPS. I do not think any hosting company is going to give them that level of control in a shared environment. However you may already be charging them enough to make it worth it to you.
    Floyd Morrissette Little Creek Solutions
    Web Hosting Solutions. XEN Virtual Private Servers, VMWare .....
    DirectAdmin Administration and Support
    Our focus is on quality customer support

  16. #16
    Join Date
    Dec 2009
    Location
    Los Angeles, CA
    Posts
    11

    Helo

    Jeff -

    I found these links for Cpanel users:

    http://forums.cpanel.net/f43/more-th...-65044-p3.html



    They are very similar to the instructions above and are specific to the HELO settings in EXIM.

    Unfortunately, I was not able to get these to work in DirectAdmin.

    Any suggestions on how to tweek these settings for DirectAdmin?

    Thanks,

    Eric

  17. #17
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,122
    The code in the Jaguar forum looks very straightforward and doable. Of coursse you'd have to refer to files you create and maintain outside of DirectAdmin.

    This is my concern for outgoing email:

    You can only do this if you've got a separate IP# for each outgoing domain you're going to set up, because otherwise many recipient MTAs will notice a mismatch in IP#s/domain names, and will not accept the email.

    So you've got send on an IP# that matches the hostname on which you're sending, and the match must be in both directions, both DNS and rDNS.

    And both DNS and rDNS must match.

    I still don't see any reason to do this, and I'm saving IP#s by not giving them out to every domain (as I hope you're doing), so I simply send mail from my hostname, and accept mail from my hostname. The term hostname as used in exim even suggests this. I've never had a client ask to be able to send email from his own hostname, and if I did, I'd ask why.

    But of course your needs may differ. I'm not going to take the time to add this as a community gift; it's just not something I need myself and after all the time I've spent on exim.conf over the past few years there are a few other projects I need to work on.

    Perhaps you'd be willing to figure it out, release your work under the GPL, version 2, as mine is, and then bring it to my attention. Then I might be willing to take the time to merge it with mine, or of course you could merge your work into mine, release it under the same license, and maintain it yourself.

    Alternatively you could hire us to do the work (it would still need to be released under GPL, as the original is), and I could have one of our staff develop it for you.

    There's nothing wrong with sponsoring an open-source project .

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  18. #18
    Join Date
    Dec 2009
    Location
    Los Angeles, CA
    Posts
    11
    Hi Jeff -

    Thank you for the reply.

    Well,...I'm just a dude that owns a server which host a few websites. I'm not much of a programmer nor claim to be a wiz at webmastering

    Some of the websites have their own IP's and others do not. The client/friend in question happens to have their own IP so this is not the problem.

    The emails in question are automatically generated by their website upon a successful transaction or automated response. Since they are using the server to send the email, the hostname I gave the system when installing DirectAdmin is being displayed rather then her own URL.

    Mailed-by: my.hostname.com

    She would like it to read: www.herhostname.com

    Soooo, it sounds like I'm S.O.L. That's OK. I was hopeful we could accomodate her needs. Maybe her programmers can find an alternative solution.

    Kind Regards,

    Eric Bergez
    The Broadband Comedy Network, Inc.
    http://www.bcnonline.com

  19. #19
    Join Date
    Mar 2005
    Posts
    5,272
    Quote Originally Posted by ErBergez View Post
    Mailed-by: my.hostname.com
    Where do you see this? I have never seen this as part of a valid header.

    How many people view the headers of email anyway? The only time I look at headers is when diagnosing a email problem.

    Are you thinking of perhaps the From address that shows up when email is sent? Where exactly do you see your hostname? What you stated is not part of any exim header I have ever seen.

    Please show us the entire headers and maybe we can answer your question.
    Floyd Morrissette Little Creek Solutions
    Web Hosting Solutions. XEN Virtual Private Servers, VMWare .....
    DirectAdmin Administration and Support
    Our focus is on quality customer support

  20. #20
    Join Date
    Dec 2008
    Posts
    518
    Very usefull post for me, I find it today.

    I do this :
    Code:
    remote_smtp:
    driver = smtp
    interface = ${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces} {$value}{SHARED.IP.FROM.SERVER}}
    helo_data = "mail.$sender_address_domain"
    #{SHARED.IP.FROM.SERVER} for domains not list in /etc/virtual/interfaces
    In /etc/virtual/interfaces, I put :
    Code:
    domain1.com: xxx.xxx.xxx.xxx
    domain2.com: yyy.yyy.yyy.yyy
    For IP, that's ok, now the domain with dedicated IP have their own IP when sending from smtp.

    But HELO is not changed.

    It adds a new header received in the mail, but nothing change.

    I have always HELO=localhost.

    Is it something else to change ?
    Best regards

Page 1 of 5 123 ... LastLast

Similar Threads

  1. Allow Share Server Assigned Ip's for Reseller's and Users
    By wanener in forum Feedback & Feature Requests
    Replies: 7
    Last Post: 04-18-2012, 12:19 AM
  2. HELP! Server sending out many outbound email messages
    By blitzer in forum General Technical Discussion & Troubleshooting
    Replies: 8
    Last Post: 04-23-2010, 12:06 PM
  3. 550 Blocked for sending broken messages
    By owindrich in forum E-Mail
    Replies: 2
    Last Post: 12-21-2007, 01:20 AM
  4. How do you modify the messages sent to new users
    By flawlesshosting in forum General Technical Discussion & Troubleshooting
    Replies: 2
    Last Post: 08-24-2004, 08:54 PM
  5. Email Users and Vacation messages
    By netmotiv8 in forum Scripting / API
    Replies: 12
    Last Post: 07-26-2004, 06:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •