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.

Change how Exim handles SMTP time Bounces

Discussion in 'E-mail Discussions' started by Eric Martello, Aug 21, 2009.

  1. Eric Martello

    Eric Martello Member

    Joined:
    Dec 30, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Right now the way Exim handles SMTP time bounces, say at RCPT TO:, is that it will generate a message and send it back to the "MAIL FROM: " email address.

    My email sending program sets the "Return-path: " to a specific email which I use to automatically process bounces and remove them from the list, but Exim actually changes the email I set in Return-Path to the FROM email in the email message. I am talking about SMTP time bounces here, that means when Exim is trying to deliver the mail, the remote server rejects the mail, for example, because of a non-existent email, at which point Exim sends the bounce notification.

    WTF? Why is it changing headers I set for a specific reason, and not just that, it ignores them! What kind of retarded shit is that? Why the hell is it messing with my headers!? I hate that. It is really annoying the hell out of me...and the fact that there is no clear way to change this functionality amplifies this annoyance quite a bit.

    What I want to do is simply have Exim OBEY the Return-path which I am setting and send the bounce email back to email specified in that header...how can I make it do that?
     
  2. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    Don't blame exim, maybe it's a problem with the program that create the emails. It's not enough to add Return-path header, it also has to connect to SMTP to send them. I'm not sure if it's your case, but mail() function from PHP use sendmail and you have to add the 5th parameter, -f$return_path. Other PHP classes/scripts have options to use SMTP, but by default are using sendmail.

    Also, ensure that both from/return_path addresses are ok. (Send an email to return_path address and check if is received and parsed). A good place to start debugging is exim log, /var/log/exim_mainlog

    Search for return_path_add in /etc/exim.conf Maybe changing this setting will solve your problem.
     
  3. Eric Martello

    Eric Martello Member

    Joined:
    Dec 30, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    After some quiet contemplation I was able to find a solution that works for me. For anyone else who may have a similar issue, here is the fix that worked for me:

    Make sure that the "MAIL FROM: " address is the address you want to act as the return path, and not the actual "FROM:" address that is associated with the FROM header. It's stupid, I know, but that's how it is, and it works.

    If you are using PHP then you could do that as the guy above me stated, with -f<email> as the 5th value in mail(), but I am not using the mail() function so it does not apply to me.
     
Loading...

Share This Page