1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

dns/mail issue

Discussion in 'Plesk for Linux - 8.x and Older' started by ejdbroker, Nov 23, 2005.

  1. ejdbroker

    ejdbroker Guest

    0
     
    Hello all:

    I setup a new domain, and then later removed the dns entries in plesk for the mail since the client is routing mx elsewhere and doing their own mail.

    But now, domains on the box still try to deliver mail to said domain locally. It doesnt send mail out to the appropriate place. Did i miss removing something? Perhaps plesk didnt remove a setting of some sort?

    any ideas?
     
  2. ShadowMan@

    ShadowMan@ Guest

    0
     
    If you wish for a domain's mail to be sent to the external SMTP server, make sure that domain is removed from /var/qmail/control/virtualdomains, make sure it IS in /var/qmail/control/rcpthosts and /var/qmail/control/smtproutes

    Removing the domain from 'virtualdomains' will tell Qmail it is not a local domain.
    Having it in 'rcpthosts' (or morercpthosts) tells Qmail it should accept mail for the domain.
    Having and entry in 'smtproutes' tells Qmail where to send the mail. Format of smtproutes is:

    example.com:ip.add.re.ss:25

    The file is not created by default, so you will more than likely have to create it from scratch.
     
  3. ejdbroker

    ejdbroker Guest

    0
     
    Ok, Ive followed your instructions. The domain is not in the lists it shouldnt be and visa versa. I created the smtproutes file and put in one line:

    mydomain.com:70.xx.196.xx:25

    Then i figured a restart of qmail was in order.

    Still the same issue, a person sending to that domain from the same box gets:

    This address no longer accepts mail

    as a return message....
     
  4. ejdbroker

    ejdbroker Guest

    0
     
    *bump*

    Any additional ideas?
     
  5. pstechnology

    pstechnology Guest

    0
     
    I had the same problem. I pointed the MX record of a domain on my Plesk setup (Plesk 7.5.4 on RH9 1&1 server) to another mail server elsewhere on the net (MS Exch2003). But, even then, users of other domains on the same plesk server could not email any address at the domain name with the repointed MX record.

    However, applying the help above, (removing the domain name from the virtualdomains files, and leaving it in the rcpthosts file, and then creating the smtproutes file with the domain name details listed, it works perfectly.

    I will monitor and if I notice any quirks, I will post back any findings.

    Good work Shadowman! :cool:
     
  6. ejdbroker

    ejdbroker Guest

    0
     
    Yea, the above directions did work for me...but notice the typo he wrote:

    "make sure it IS in /var/qmail/control/rcpthosts"

    This was my problem!
     
  7. CoKo

    CoKo Guest

    0
     
    To sum it up:

    - Disable mail service in the Plesk domain panel

    - add the domain to /var/qmail/control/rcpthosts

    - add a line to /var/qmail/control/smtproutes:
    domain:ip[:port]

    The port is AFAIR not always needed
     
  8. pstechnology

    pstechnology Guest

    0
     
    Disable mail service in the Plesk domain panel ???

    You mean stop the Smtp service?

    Only reason I ask, is because I spoke too soon! Plesk users cannot email other plesk users, but they can email externally now. Doh!
     
  9. CoKo

    CoKo Guest

    0
     
    No, don't stop the whole smtp service.

    Go into Plesk panel, domain, klick on email and then on deactivate.

    Otherwise Plesk will rewrite your configuration from time to time....

    Then do the changes to the files in /var/qmail/control and change the DNS

    Don't forget to restart qmail after you did so.
     
  10. pstechnology

    pstechnology Guest

    0
     
    Good advice, thanks.

    So what would cause the problem I am now having.

    With the modified virtualdomains file and the new smtproutes files in place the following problem occur:

    Plesk users cannot email other plesk users, but they can send mail to external domains
    No external mail is being received by any plesk users

    If I place the files back as they were, things work again apart from the issue with mail being delivered to a plesk domain instead of following the MX settings.
     
  11. CoKo

    CoKo Guest

    0
     
    Can you please specify?

    Lets pretend you set the smtproute for domain a.

    Which users can now not mail any longer to others?

    domain b to domain a
    domain a to domain a
    domain a to domain b

    (where domain b is another domain on the same Plesk)
     
  12. pstechnology

    pstechnology Guest

    0
     
    here goes:

    domain a has it's MX record diverted to another domain name, but everything else points at the plesk server

    domain b is fully hosted on the plesk server(web, email etc..)
    domain c is fully hosted on the plesk server (web, email etc..)

    The original problem is:

    Email for domain a routes perfectly from domains not hosted on the plesk server to the correct email server elsewhere on the net. But, email sent from domain b and domain c do not follow the MX record. Plesk tries to deliver them to email accounts hosted on the same server.


    If I modify the virtualdomains, rcpthosts and smtproutes to what was advised above then the following happens:

    1. Email sent from domains B and C to domain A get delivered perfectly.
    2. Email sent from domains B and C to other domains elesewhere do not get delivered
    3. Email sent from domain B to domain B, or domain C to domain C does not get delivered
    4. Email being received from external domains to domain B or C is not received.

    If I put the virtualdomains and rcpthosts back to normal and delete te smtproutes, we go back to the original problem.

    Heres what I did:

    1. I deleted the line for domain A from the virtualdomains file
    2. I checked the rcpthosts file for domain A's entry, and it was there
    3. I created a file called smtproutes and added the line :

    domaina.co.uk:12.34.56.78:25

    4. I stopped and restarted QMail service
     
  13. CoKo

    CoKo Guest

    0
     
    This behaviour is normal and should be caught by the smtproutes.

    Did you disable email for domain a?


    There is no need to edit virtualdomains when you disabled email before for that domain

    It seems when you start editing the files, the configuration breaks. What is the editor you use? Maybe there are DOS line feeds inside because you edit the files using a windows machine? Qmail is very sensible about that.

    Is it possible tha you post the 3 files virtualdomains, smtproutes and rcpthosts so we can have a look on them?

    I did this setup several times, and it always worked.

    Please disable email first in plesk, skip above step 1, add the domain name to rcpthosts, remove ":25" from smtproutes

    then restart qmail and let us know what happens :)
     
  14. pstechnology

    pstechnology Guest

    0
     
    Thanks CoKo

    I will try this over the weekend when there are less users on the server.

    I will keep you posted.

    Have a great weekend yourself.

    :)
     
Loading...