customize bounce message

Discussion in 'Server Operation' started by tonton01, Feb 18, 2008.

  1. tonton01

    tonton01 New Member

    I'm not sure if any of you ever tried this but I want to get rid of the IP address in the bounce message below the "The Mail System" part. The bounce.cf allows you to change the top part, but where do I change the bottom part? The reason is it shows my private IP instead of my domain name.

    I'm using postfix 2.4 configured it as a gateway server to my main. The stupid bounce messages keeps stamping the private ip of the main server but I want it to just stamp it with my domain name instead. Postfix bounce(5) doesn't say anything about changing the bottom part, only the header and body. Does anyone know how I can change that to say my domain name instead or even the public ip? I searched & searched but can't find anything on it. I might be searching the wrong key words. I don't know what other words to use.

    Thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in your /etc/postfix/main.cf?
     
  3. tonton01

    tonton01 New Member

    Here's my postconf -n

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    broken_sasl_auth_clients = no
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[localhost]:10024
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    disable_vrfy_command = yes
    html_directory = no
    inet_interfaces = all
    local_recipient_maps =
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    message_size_limit = 20971520
    mydestination =
    mydomain = company.com
    myhostname = mx1.company.com
    mynetworks = this.server.private.ip
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.4.5/README_FILES
    recipient_delimiter = -
    relay_domains = $mydomain
    sample_directory = /usr/share/doc/postfix-2.4.5/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtpd_banner = $mydomain ESMTP Unauthorized Use Of This Server Is Prohibited
    smtpd_client_restrictions = check_client_access hash:/$config_directory/client_access
    smtpd_data_restrictions = reject_unauth_pipelining
    smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination, permit_mynetworks, check_client_access hash:/etc/postfix/client_access, check_recipient_access hash:$config_directory/recipient_access, check_sender_access hash:$config_directory/sender_access, permit
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sender_restrictions = check_sender_access hash:$config_directory/sender_access
    smtpd_starttls_timeout = 60s
    smtpd_tls_auth_only = yes
    smtpd_tls_cert_file = /etc/postfix/tls/server.pem
    smtpd_tls_key_file = $smtpd_tls_cert_file
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    strict_rfc821_envelopes = yes
    unknown_local_recipient_reject_code = 554

    Thanks for the help.

    Not sure if I should start a new thread but I'm also experiencing "mail for company.com loops back to myself" regardless if I use my own personal webmail except yahoo. Really strange :confused: It will bounce about looping from other sites except yahoo. I noticed it bounced a message from another person when I was testing it that's not on our network as well. I tried disabling amavisd and it still does the same, so my conclusion is my config. But what? I took out "smtpd_helo_required" & "helo_restrictions" but still no avail.:eek:
     
  4. topdog

    topdog Active Member

  5. tonton01

    tonton01 New Member

    Thanks topdog.

    I ended up reinstalling the os. I found it strange that over night, the main.cf just suddenly reconfigured itself. The postconf -n posted here was the one I reconfigured after it got messed up. I thought it would work fine if I copied the default and configure it but it just didn't work. When I telnet localhost and test mail, it worked fine but kept bouncing everything else except yahoo. After a fresh reinstall and configuration, it's working great now.

    So now I'm back to my original question. How do I change the bottom portion of the bounce message to not stamp my private ip but instead my public ip or domain name? Hope you can help falko.
     
  6. falko

    falko Super Moderator Howtoforge Staff

  7. tonton01

    tonton01 New Member

    I finally got a chance to check out the link and continue with my test. The link you gave me, falko, is basically the same as what postfix has and doesn't say anything about the bottom part which spills out the ip. I want to change the ip but it doesn't tell how.

    Hope you or someone out there knows how.

    Thanks
     

Share This Page