[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 "[email protected]" = "shamun@........."

    Problem:
    ========
    1. Email is sent, receive as
    "[email protected]" or "[email protected]"

    2. Gmail receive it, outlook it treat the email as fishing. How to overwrite
    all those "[email protected]"

    Return-path: <[email protected]>
    Envelope-to: [email protected]
    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 <[email protected]>)
    id 1NUIpI-0007OR-47
    for [email protected]; 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: [email protected]
    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: [email protected] (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=<[email protected]>
    Jan 11 13:10:18 shamun postfix/qmgr[3574]: D50A4413AC: from=<[email protected]>, size=745, nrcp t=1 (queue active)
    Jan 11 13:10:19 shamun postfix/smtp[3925]: D50A4413AC: to=<[email protected]>, 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 Howtoforge Staff

  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: [email protected]"\r\n" .
        
    'Reply-To: [email protected]"\r\n" .
        
    'Return-path: [email protected]"\r\n" .
        
    'X-Mailer: PHP/' phpversion();

    Check this i still get emails in outlook as Fishing ([email protected] is not changing,
    ======================================
    Return-path: <[email protected]>
    Envelope-to: [email protected]
    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 <[email protected]>)
    id 1NUi88-0006hy-0G
    for [email protected]; 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: [email protected]
    Subject: Shamun - site
    X-PHP-Originating-Script: 0:add_edit_del.php
    From: [email protected]
    Reply-To: [email protected]
    X-Mailer: PHP/5.3.1
    Message-Id: <[email protected]>
    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 Howtoforge Staff

  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 Howtoforge Staff

    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 Active Member

    You could use address rewriting to get it correct.
     

Share This Page