Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th January 2010, 14:41
shamun shamun is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question [How to] - change this apache@.....

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
Reply With Quote
Sponsored Links
  #2  
Old 12th January 2010, 15:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

You must set the correct sender address in your web application. If it's written in PHP, take a look here: http://de.php.net/manual/en/function.mail.php (extra headers)
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 12th January 2010, 17:27
shamun shamun is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question

Thank you.

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

PHP Code:
$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,
Reply With Quote
  #4  
Old 13th January 2010, 15:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Are you on a dynamic IP? Most dynamic IPs are blacklisted today, so that's probably the problem. You should try to relay through another mail server: http://www.howtoforge.com/postfix_re...her_mailserver
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 15th January 2010, 00:05
shamun shamun is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question

sorry, see below...

Last edited by shamun; 15th January 2010 at 16:59.
Reply With Quote
  #6  
Old 15th January 2010, 00:11
shamun shamun is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question

sorry , see below...

Last edited by shamun; 15th January 2010 at 17:00.
Reply With Quote
  #7  
Old 15th January 2010, 00:17
shamun shamun is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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 by shamun; 15th January 2010 at 00:22.
Reply With Quote
  #8  
Old 15th January 2010, 14:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by shamun View Post
Yes, i am having my test server dynamic ip, with static public hostname. But the email is already using relay no? Following is the ISP smtp which i am using to send mail by postfix -n , the red line ( http://www.howtoforge.com/postfix_re...her_mailserver ).
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 =
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 18th January 2010, 15:56
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
 
Default

You could use address rewriting to get it correct.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Host/Domainname change in: The Perfect Server-Debian Lenny (Debian 5.0) [ISPConfig 2] edge HOWTO-Related Questions 2 23rd February 2009 20:17
need to change ip addrerss's quick! steve51184 General 7 4th November 2008 16:49
Unable to change Domain Name under Management ->> Setting cbfeagle Developers' Forum 2 24th August 2008 18:13
How to change MySQL root password? wpwood3 Installation/Configuration 1 9th October 2007 03:55
user can change domain testset General 2 12th June 2007 23:53


All times are GMT +2. The time now is 05:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.