[How to] - change this apache@.....

Discussion in 'Server Operation' started by shamun, Jan 11, 2010.

  1. shamun

    shamun New Member

    Question. How can i put in following problem case, my own pre defined email address? ex:
    instead of "apache@shamun.xxx.org" = "shamun@........."

    Problem:
    ========
    1. Email is sent, receive as
    "apache@hostname.localdomain" or "apache@shamun.virtualdomain.com"

    2. Gmail receive it, outlook it treat the email as fishing. How to overwrite
    all those "apache@shamun.xxx.org"

    Return-path: <apache@shamun.xxx.org>
    Envelope-to: shamun@-----.be
    Delivery-date: Mon, 11 Jan 2010 12:52:58 +0100
    Received: from brigitte.telenet-ops.be ([195.130.137.66])
    by xxxxxx.be with esmtp (Exim 4.69)
    (envelope-from <apache@shamun.xxx.org>)
    id 1NUIpI-0007OR-47
    for shamun@-----.be; Mon, 11 Jan 2010 12:52:58 +0100
    Received: from shamun.xxx.org ([78.00.00.00])
    by brigitte.telenet-ops.be with bizsmtp
    id UByt1d00E35aA9J0GBytdK; Mon, 11 Jan 2010 12:58:54 +0100
    Received: by shamun.xxx.org (Postfix, from userid 48)
    id 3C71E413AC; Mon, 11 Jan 2010 12:59:12 +0100 (CET)
    To: shamun@----.be
    Subject: Shamun - site
    X-PHP-Originating-Script: 0: add_edit_del.php
    Message-Id: <20100111115912.3C71E413AC@shamun.xxx.org>
    Date: Mon, 11 Jan 2010 12:59:12 +0100 (CET)
    From: apache@shamun.xxx.org (Apache)
    X-Spam-Status: No, score=-0.5
    X-Spam-Score: -4
    X-Spam-Bar: /
    X-Spam-Flag: NO


    Few: Config files
    ==================

    [root@shamun etc]# postconfi -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    home_mailbox = Maildir/
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    luser_relay = shamun@localhost
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = smtp.telenet.be, localhost, localhost.localdomain
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.5/README_FILES
    relayhost = smtp.telenet.be
    sample_directory = /usr/share/doc/postfix-2.6.5/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    unknown_local_recipient_reject_code = 550
    virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
    virtual_gid_maps = static:501
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
    virtual_uid_maps = static:501


    maillog:
    ==========
    Jan 11 13:10:18 shamun postfix/pickup[3573]: D50A4413AC: uid=48 from=<apache>
    Jan 11 13:10:18 shamun postfix/cleanup[3919]: D50A4413AC: message-id=<20100111121018.D50A4413AC@shamun.xxxxxx.org>
    Jan 11 13:10:18 shamun postfix/qmgr[3574]: D50A4413AC: from=<apache@shamun.xxxxxx.org>, size=745, nrcp t=1 (queue active)
    Jan 11 13:10:19 shamun postfix/smtp[3925]: D50A4413AC: to=<shamunxxxxx@gmail.com>, relay=smtp.telenet .be[195.130.137.68]:25, delay=0.76, delays=0.37/0.02/0.1/0.26, dsn=2.0.0, status=sent (250 2.0.0 Mess age accepted for delivery (UCA01d00F35aA9J06CA0iK))
    Jan 11 13:10:19 shamun postfix/qmgr[3574]: D50A4413AC: removed
     
  2. falko

    falko Super Moderator

  3. shamun

    shamun New Member

    Thank you.

    **Still doesnt work? i followed always header of PHP so that he gets all his parameters.

    PHP:
    $headers 'From: webmaster@shamun.com' "\r\n" .
        
    'Reply-To: webmaster@shamun.com' "\r\n" .
        
    'Return-path: webmaster@shamun.com' "\r\n" .
        
    'X-Mailer: PHP/' phpversion();

    Check this i still get emails in outlook as Fishing (apache@shamun.dyndns.org is not changing,
    ======================================
    Return-path: <apache@shamun.dyndns.org>
    Envelope-to: shamun@xxxxxx.be
    Delivery-date: Tue, 12 Jan 2010 15:54:06 +0100
    Received: from jacques.telenet-ops.be ([195.130.132.50])
    by XXXXXX.XXXXX.be with esmtp (Exim 4.69)
    (envelope-from <apache@shamun.dyndns.org>)
    id 1NUi88-0006hy-0G
    for shamun@xxxxx.be; Tue, 12 Jan 2010 15:54:06 +0100
    Received: from shamun.dyndns.org ([78.00.00.00])
    by jacques.telenet-ops.be with bizsmtp
    id Uf021d00G35aA9J0Jf02hU; Tue, 12 Jan 2010 16:00:02 +0100
    Received: by shamun.dyndns.org (Postfix, from userid 48)
    id 4041D4142A; Tue, 12 Jan 2010 16:00:21 +0100 (CET)
    To: shamun@xxxxxx.be
    Subject: Shamun - site
    X-PHP-Originating-Script: 0:add_edit_del.php
    From: webmaster@shamun.com
    Reply-To: webmaster@shamun.com
    X-Mailer: PHP/5.3.1
    Message-Id: <20100112150021.4041D4142A@shamun.dyndns.org>
    Date: Tue, 12 Jan 2010 16:00:21 +0100 (CET)
    X-Spam-Status: No, score=-1.0
    X-Spam-Score: -9
    X-Spam-Bar: -
    X-Spam-Flag: NO

    Dear Sir/Madam,
     
  4. falko

    falko Super Moderator

  5. shamun

    shamun New Member

    sorry, see below...
     
    Last edited: Jan 15, 2010
  6. shamun

    shamun New Member

    sorry , see below...
     
    Last edited: Jan 15, 2010
  7. shamun

    shamun New Member

    same...

    - Yes, i am using dynamic ip provided by ISP, then i am using static public hostname to route into the dynamic ip
    example:
    1. hello.dyndns.com = 78.0.0.1 (maybe example yesterday)

    2. every 5 minutes its running a script in php/perl > reading the ip address > using get/post http method > changing the remote server hello.dyndns.com = current ip (78.0.0.xyz)

    3. public users > ping hello.dyndns.com > gets live ip 78.0.0.2

    So i am not doing actually anyting harm or wrong?


    - I am already using postfix relay of my ISP smtp server address

    - But still in microsoft outlook express i get the emails in Fishing. But same email i get in Gmail correctly but not in the spam even.
    Am i missing anything speciall for postfix/dovecot , related settings only for outlook (packets standards).


    [root@shamun shamun]# telnet smtp.telenet.be
    Trying 195.130.132.48...
    ^C
    [root@shamun shamun]# telnet smtp.telenet.be smtp
    Trying 195.130.132.48...
    Connected to smtp.telenet.be.
    Escape character is '^]'.
    220 gerard.telenet-ops.be bizsmtp ESMTP server ready
    ehlo host
    250-gerard.telenet-ops.be hello [78.], pleased to meet you
    250-HELP
    250-SIZE 10485760
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 OK
    quit
    221 2.0.0 gerard.telenet-ops.be bizsmtp closing connection
    Connection closed by foreign host.

    [root@shamun shamun]# postconf -p
    postconf: invalid option -- 'p'
    postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-d (defaults)] [-e (edit)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-n (non-defaults)] [-v] [name...]
    [root@shamun shamun]# postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    home_mailbox = Maildir/
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    luser_relay = shamun@localhost
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = smtp.telenet.be, localhost, localhost.localdomain
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.5/README_FILES
    relayhost = smtp.telenet.be
    sample_directory = /usr/share/doc/postfix-2.6.5/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    unknown_local_recipient_reject_code = 550
    virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
    virtual_gid_maps = static:501
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
    virtual_uid_maps = static:501
    [root@shamun shamun]#
     
    Last edited: Jan 14, 2010
  8. falko

    falko Super Moderator

    I don't see the following lines in your Postfix configuration:
    Code:
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
     
  9. topdog

    topdog HowtoForge Supporter

    You could use address rewriting to get it correct.
     

Share This Page