The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Relaying email to another server

Discussion in 'E-mail Discussions' started by microfx, Mar 6, 2003.

  1. microfx

    microfx Member

    Joined:
    Aug 11, 2002
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    How can I relay all outgoing SMTP email through another server that I am running? Seems msn's SMTP server blocks my server so I must get around this. No I do not spam so not sure why they are blocking it.

    Matt
     
  2. Pilgrim

    Pilgrim Active Member

    Joined:
    Apr 29, 2002
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Easy solution:

    Go to your outlook express and change the SMTP settings for your email account to that of your ISP. Currently it is probably set to mail.yourdomain.com (Leave the POP3 settings alone)

    If your ISP does not relay the mail (some do, some don't) then you'll have to change the SMTP setting to something that points to one of your other servers. Make sure the other server is set up to relay your mail. (assuming you don't have open relay :D )
     
  3. microfx

    microfx Member

    Joined:
    Aug 11, 2002
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Sorry,

    I mean from my server where cpanel is located. I want exim to send all mail to a relay instead of delivering on it's own because the email being sent is from PHP software.

    Matt
     
  4. feldon27

    feldon27 Well-Known Member

    Joined:
    Mar 12, 2003
    Messages:
    111
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Houston, TX
    MSN isn't blocking your e-mails because of spam.

    MSN is blocking your e-mails because, by default, they come from nobody@host.webhost.com.

    Add

    "Return-Path: <your@mailadress.com>\n"

    to your outgoing headers somewhere in the mail(); function.


    If you are using vBulletin...

    find in admin/function.php this:
    $from = trim($from);
    $username = trim($username);

    and add after this:
    $headers .= "Return-Path: <your@mailadress.com>\n";
     
  5. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    Unfortunately, this doesn't work, at least not in a default Cpanel configuration. You can set the From field but not the Return-Path field.
     
  6. feldon27

    feldon27 Well-Known Member

    Joined:
    Mar 12, 2003
    Messages:
    111
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Houston, TX
    Ah, I see.

    sendmail_from is something that can be set in .htaccess or a PHP script. But sendmail_path is httpd.conf or php.ini only. And is there a report anywhere on how safe it is to edit php.ini?
     
  7. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    This is actually an Exim issue if I am not mistaken. Untrusted users cannot set the Reply-To header, and "nobody" is of course an untrusted user.
     
  8. feldon27

    feldon27 Well-Known Member

    Joined:
    Mar 12, 2003
    Messages:
    111
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Houston, TX
    And they think nobody is an acceptable solution? :rolleyes:

    Any 5 year old knows that Reply-To should copy the From: field. If it's a real concern, make it so any PHP script that wants to send mail needs to use an MD5 authorization key that is matched with an exim_replyto.conf list. Each time you create an e-mail in cPanel, it would create and write an auth key and tell the user. Then their Reply-To field is locked to that e-mail address matching the MD5.
     
    #8 feldon27, Mar 18, 2003
    Last edited: Mar 18, 2003
Loading...

Share This Page