niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Postfix
(unknown)
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
James G. McIntyre
*nix forums beginner


Joined: 17 Jul 2006
Posts: 5

PostPosted: Mon Jul 17, 2006 11:08 pm    Post subject: (unknown) Reply with quote

Quote:
you have not set mydomain

It is now set. I believe it was set at one time and thru my

testing/guessing unset it. thanks...

==============================================================Here is the email I am sending:

nc machine.domain.ip.addr 25 <<MYEOF
helo its-johnny
mail from: jim@mcintyresecurity.com
rcpt to: jim.mcintyre@hosted-domain1.com
data
body stuff
..
quit
EOF
MYEOF

==============================================================Here is the maillog:

Jul 17 18:45:04 newserve postfix/pipe[20630]: D64BFB29BF: to=<jmcintyr>,
orig_to=<jim.mcintyre@hosted-domain1.com>, relay=spamfilter, delay=5,
status=sent (dummy)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: D64BFB29BF: removed
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6:
from=<jim@mcintyresecurity.com>, size=828, nrcpt=1 (queue active)
Jul 17 18:45:04 newserve postfix/local[20638]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
Jul 17 18:45:04 newserve postfix/local[20638]: 077F1B29C6:
to=<jmcintyr@newserve.machine-domain.com>, orig_to=<jmcintyr>,
relay=local, delay=0, status=sent (delivered to mailbox)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6: removed


===============================================================Here is new postconf -n & postfix was restarted.

root newserve /etc/postfix
# vi main.cf
root newserve /etc/postfix
# service postfix stop; service postfix start
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
root newserve /etc/postfix
# postconf -n
append_at_myorigin = no
append_dot_mydomain = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mailq_path = /usr/bin /mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = machine-domain.com
myhostname = newserve.machine-domain.com
mynetworks = 192.168.0.0/24, 192.168.5.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin /newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin /sendmail.postfix
setgid_group = postdrop
smtpd_data_restrictions = permit
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unknown_sender_domain,
reject_unknown_recipient_domain, permit_mynetworks,
reject_invalid_hostname, reject_non_fqdn_hostname,
reject_unauth_destination, check_sender_access
hash:/etc/postfix/access,reject_rbl_client cbl.abuseat.org,
reject_rbl_client list.dsbl.org, reject_rbl_client opm.blitzed.org,
reject_rbl_client relays.ordb.org, reject_rbl_client
bl.spamcop.net, reject_rbl_client sbl.spamhaus.org,
reject_rhsbl_sender sbl.spamhaus.org, reject_rhsbl_client
sbl.spamhaus.org, reject_rhsbl_client rhsbl.sorbs.net,
reject_rbl_client vox.schpider.com, permit
smtpd_sender_restrictions = reject_non_fqdn_sender,
reject_unknown_sender_domain, reject_rhsbl_sender relays.ordb.org,
reject_rhsbl_sender opm.blitzed.org
unknown_local_recipient_reject_code = 550
virtual_alias_domains = host-domain1.net, host-domain1.com,
host-domain2.com, host-domain3.com, host-domain4.net, host-domain5.org
virtual_alias_maps = hash:/etc/postfix/virtual


jim mc....




Quote:



--
James G. McIntyre
Senior Consultant
SANS/GIAC - GCIA Certified Intrusion Analyst
- GCFA Certified Firewall Analyst
- GAWN Auditing Wireless Networks
- GWAS Web Application Security
HP-UX Certified System Administrator

McIntyre & Associates, Inc.
Virginia Tech Corporate Research Center
2020 Kraft Drive, Suite 3005
Blacksburg, VA 24060
540-552-9090
www.mcintyresecurity.com


--
James G. McIntyre
Senior Consultant
SANS/GIAC - GCIA Certified Intrusion Analyst
- GCFA Certified Firewall Analyst
- GAWN Auditing Wireless Networks
- GWAS Web Application Security
HP-UX Certified System Administrator

McIntyre & Associates, Inc.
Virginia Tech Corporate Research Center
2020 Kraft Drive, Suite 3005
Blacksburg, VA 24060
540-552-9090
www.mcintyresecurity.com
Back to top
D.J. Fan
*nix forums Guru Wannabe


Joined: 24 Jul 2005
Posts: 145

PostPosted: Tue Jul 18, 2006 1:39 am    Post subject: RE: Reply with quote

===
Quote:
Here is the email I am sending:

nc machine.domain.ip.addr 25 <<MYEOF
helo its-johnny
mail from: jim@mcintyresecurity.com
rcpt to: jim.mcintyre@hosted-domain1.com
data
body stuff
.
quit
EOF
MYEOF

===============================================================
Here is the maillog:

Jul 17 18:45:04 newserve postfix/pipe[20630]: D64BFB29BF: to=<jmcintyr>,
orig_to=<jim.mcintyre@hosted-domain1.com>, relay=spamfilter, delay=5,
status=sent (dummy)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: D64BFB29BF: removed
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6:
from=<jim@mcintyresecurity.com>, size=828, nrcpt=1 (queue active)
Jul 17 18:45:04 newserve postfix/local[20638]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
Jul 17 18:45:04 newserve postfix/local[20638]: 077F1B29C6:
to=<jmcintyr@newserve.machine-domain.com>, orig_to=<jmcintyr>,
relay=local, delay=0, status=sent (delivered to mailbox)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6: removed


================================================================
Here is new postconf -n & postfix was restarted.

root newserve /etc/postfix
# vi main.cf
root newserve /etc/postfix
# service postfix stop; service postfix start
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
root newserve /etc/postfix
# postconf -n
append_at_myorigin = no
append_dot_mydomain = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mailq_path = /usr/bin /mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = machine-domain.com
myhostname = newserve.machine-domain.com
mynetworks = 192.168.0.0/24, 192.168.5.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin /newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin /sendmail.postfix
setgid_group = postdrop
smtpd_data_restrictions = permit
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unknown_sender_domain,
reject_unknown_recipient_domain, permit_mynetworks,
reject_invalid_hostname, reject_non_fqdn_hostname,
reject_unauth_destination, check_sender_access
hash:/etc/postfix/access,reject_rbl_client cbl.abuseat.org,
reject_rbl_client list.dsbl.org, reject_rbl_client opm.blitzed.org,
reject_rbl_client relays.ordb.org, reject_rbl_client
bl.spamcop.net, reject_rbl_client sbl.spamhaus.org,
reject_rhsbl_sender sbl.spamhaus.org, reject_rhsbl_client
sbl.spamhaus.org, reject_rhsbl_client rhsbl.sorbs.net,
reject_rbl_client vox.schpider.com, permit
smtpd_sender_restrictions = reject_non_fqdn_sender,
reject_unknown_sender_domain, reject_rhsbl_sender relays.ordb.org,
reject_rhsbl_sender opm.blitzed.org
unknown_local_recipient_reject_code = 550
virtual_alias_domains = host-domain1.net, host-domain1.com,
host-domain2.com, host-domain3.com, host-domain4.net, host-domain5.org
virtual_alias_maps = hash:/etc/postfix/virtual


jim mc....


In your virtual file, instead of:
jim.mcintyre@hosted-domain1.com jmcintyr
use:
jim.mcintyre@hosted-domain1.com jmcintyr@localhost
or if for some reason you have to get even more explicit:
jim.mcintyre@hosted-domain1.com jmcintyr@[127.0.0.1]

You are showing a number of lines with spaces where they don't seem to
belong, for example:

Quote:
sendmail_path = /usr/sbin /sendmail.postfix

Do you really have spaces there?

And add:
alias_maps = hash:/etc/aliases

Gary V

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Back to top
D.J. Fan
*nix forums Guru Wannabe


Joined: 24 Jul 2005
Posts: 145

PostPosted: Tue Jul 18, 2006 2:05 am    Post subject: (unknown) Reply with quote

Quote:
My problem is the receivers hosted domain name is re-written by
the mail servers domain name,
ex. orginal to: jim@hosted-domain1.com and when placed in the
mail file is
jim@newserve.machine-domain.com.

How do I stop this ?

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = machine-domain.com
myhostname = newserve.machine-domain.com
mynetworks = 192.168.0.0/24, 192.168.5.0/24, 127.0.0.0/8
myorigin = $mydomain

Here is the email I am sending:

nc machine.domain.ip.addr 25 <<MYEOF
helo its-johnny
mail from: jim@mcintyresecurity.com
rcpt to: jim.mcintyre@hosted-domain1.com
data
body stuff
.
quit
EOF
MYEOF

===============================================================
Here is the maillog:

Jul 17 18:45:04 newserve postfix/pipe[20630]: D64BFB29BF: to=<jmcintyr>,
orig_to=<jim.mcintyre@hosted-domain1.com>, relay=spamfilter, delay=5,
status=sent (dummy)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: D64BFB29BF: removed
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6:
from=<jim@mcintyresecurity.com>, size=828, nrcpt=1 (queue active)
Jul 17 18:45:04 newserve postfix/local[20638]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
Jul 17 18:45:04 newserve postfix/local[20638]: 077F1B29C6:
to=<jmcintyr@newserve.machine-domain.com>, orig_to=<jmcintyr>,
relay=local, delay=0, status=sent (delivered to mailbox)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6: removed


and you also showed me:

Quote:
From jim@mcintyresecurity.com Mon Jul 17 16:33:31 2006
Return-Path: <jim@mcintyresecurity.com
X-Original-To: jmcintyr
Delivered-To: jmcintyr@newserve.machine-domain.com
Received: by newserve.machine-domain.com (Postfix, from userid
96)
id 1AC7BB29C6; Mon, 17 Jul 2006 16:33:31 -0400 (EDT)
Received: from sendip
by newserve.machine-domain.com (Postfix) with SMTP id
EFC12B29BF
for <jim.mcintyre@hosted-domain1.com>; Mon, 17 Jul 2006
16:33:29
-0400 (EDT)

Message-Id:
20060717203329.EFC12B29BF@newserve.machine-domain.com
Date: Mon, 17 Jul 2006 16:33:29 -0400 (EDT)
From: jim@mcintyresecurity.com
To: undisclosed-recipients: ;
X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on
newserve.machine-domain.com
X-Spam-Level: **
X-Spam-Status: No, score=2.1 required=5.0
tests=ALL_TRUSTED,MISSING_SUBJECT,
NO_REAL_NAME,RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL,UNDISC_RECIPS
autolearn=no version=3.0.6


What I see is expected behavior. I think the problem is you need to add a
To: header in your mail data, to elimininate this:

Quote:
To: undisclosed-recipients: ;

Then you would get:
To: jim.mcintyre@hosted-domain1.com

Gary V

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
Back to top
James G. McIntyre
*nix forums beginner


Joined: 17 Jul 2006
Posts: 5

PostPosted: Tue Jul 18, 2006 1:34 pm    Post subject: Re: Reply with quote

Quote:
My problem is the receivers hosted domain name is re-written by
the mail servers domain name,
ex. orginal to: jim@hosted-domain1.com and when placed in the
mail file is
jim@newserve.machine-domain.com.

How do I stop this ?

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = machine-domain.com
myhostname = newserve.machine-domain.com
mynetworks = 192.168.0.0/24, 192.168.5.0/24, 127.0.0.0/8
myorigin = $mydomain

Here is the email I am sending:

nc machine.domain.ip.addr 25 <<MYEOF
helo its-johnny
mail from: jim@mcintyresecurity.com
rcpt to: jim.mcintyre@hosted-domain1.com
data
body stuff
.
quit
EOF
MYEOF

==============================================================>>>Here is the maillog:

Jul 17 18:45:04 newserve postfix/pipe[20630]: D64BFB29BF: to=<jmcintyr>,
orig_to=<jim.mcintyre@hosted-domain1.com>, relay=spamfilter, delay=5,
status=sent (dummy)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: D64BFB29BF: removed
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6:
from=<jim@mcintyresecurity.com>, size=828, nrcpt=1 (queue active)
Jul 17 18:45:04 newserve postfix/local[20638]: warning: dict_nis_init:
NIS
domain name not set - NIS lookups disabled
Jul 17 18:45:04 newserve postfix/local[20638]: 077F1B29C6:
to=<jmcintyr@newserve.machine-domain.com>, orig_to=<jmcintyr>,
relay=local, delay=0, status=sent (delivered to mailbox)
Jul 17 18:45:04 newserve postfix/qmgr[20625]: 077F1B29C6: removed


and you also showed me:

From jim@mcintyresecurity.com Mon Jul 17 16:33:31 2006
Return-Path: <jim@mcintyresecurity.com
X-Original-To: jmcintyr
Delivered-To: jmcintyr@newserve.machine-domain.com
Received: by newserve.machine-domain.com (Postfix, from userid
96)
id 1AC7BB29C6; Mon, 17 Jul 2006 16:33:31 -0400 (EDT)
Received: from sendip
by newserve.machine-domain.com (Postfix) with SMTP id
EFC12B29BF
for <jim.mcintyre@hosted-domain1.com>; Mon, 17 Jul 2006
16:33:29
-0400 (EDT)

Message-Id:
20060717203329.EFC12B29BF@newserve.machine-domain.com
Date: Mon, 17 Jul 2006 16:33:29 -0400 (EDT)
From: jim@mcintyresecurity.com
To: undisclosed-recipients: ;
X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on
newserve.machine-domain.com
X-Spam-Level: **
X-Spam-Status: No, score=2.1 required=5.0
tests=ALL_TRUSTED,MISSING_SUBJECT,
NO_REAL_NAME,RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL,UNDISC_RECIPS
autolearn=no version=3.0.6


What I see is expected behavior. I think the problem is you need to add a
To: header in your mail data, to elimininate this:

To: undisclosed-recipients: ;

Gary:

You are correct the missing To: resolved the "undisclosed-recipients"
problem. I corrected my test script. thanks...

Below is header info for the email I used for testing, again the TO: is
now correct. The "Delivered-to" is still the machine-domain vs the hosted
domain name. Nothing personal, but I am beginning to believe this is not
possible with postfix. Again thanks for all your assistance...jim mc...

Return-Path: <jmcintyr@mcintyresecurity.com>
X-Original-To: jmcintyr
Delivered-To: jmcintyr@newserve.machine-domain.com
Received: by newserve.machine-domain.com (Postfix, from userid 96) id
6B485B29C6; Tue, 18 Jul 2006 09:12:40 -0400 (EDT)
Received: from senderip-info ( ) by newserve.machine-domain.com (Postfix)
with ESMTP id 05CCEB29BF for <jim.mcintyre@hosted-domain1.com>; Tue, 18
Jul 2006 09:12:35 -0400 (EDT)
Subject: test of subj line
From: james mcintyre <jmcintyr@mcintyresecurity.com>
To: jim.mcintyre@hosted-domain1.com
Content-Type: text/plain
Date: Tue, 18 Jul 2006 09:20:11 -0400
Message-Id: <1153228811.12792.2.camel@sender-ip>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4)
Content-Transfer-Encoding: 7bit
X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on
newserve.machine-domain.com
X-Spam-Level:
X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,
RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=failed version=3.0.6
X-UIDL: 1ce"!3n6"!:!C!!h6S!!
X-Evolution-Source: pop://jmcintyr@machine-domain-ip-addr/


Quote:

Then you would get:
To: jim.mcintyre@hosted-domain1.com

Gary V

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



--
James G. McIntyre
Senior Consultant
SANS/GIAC - GCIA Certified Intrusion Analyst
- GCFA Certified Firewall Analyst
- GAWN Auditing Wireless Networks
- GWAS Web Application Security
HP-UX Certified System Administrator

McIntyre & Associates, Inc.
Virginia Tech Corporate Research Center
2020 Kraft Drive, Suite 3005
Blacksburg, VA 24060
540-552-9090
www.mcintyresecurity.com
Back to top
D.J. Fan
*nix forums Guru Wannabe


Joined: 24 Jul 2005
Posts: 145

PostPosted: Tue Jul 18, 2006 2:59 pm    Post subject: Re: Reply with quote

Quote:
Gary:

You are correct the missing To: resolved the "undisclosed-recipients"
problem. I corrected my test script. thanks...

Below is header info for the email I used for testing, again the TO: is
now correct. The "Delivered-to" is still the machine-domain vs the hosted
domain name. Nothing personal, but I am beginning to believe this is not
possible with postfix. Again thanks for all your assistance...jim mc...


The alternative is simply placing all your domains in $mydestination and
forget about virtual_alias_maps and the virtual_alias_domains. There would
be no address rewriting (unless there are aliases defined).
However, mail addressed to:
user@example1.com
user@example2.com
user@example3.com
would go to the Unix user 'user'. You would use something like /etc/aliases
for aliases.
Even if an alias exists, in this case I noticed the X-Original-To: and
Delivered-To: continue to reflect the original envelope recipient.

http://www.postfix.org/VIRTUAL_README.html#local

Virtual aliases allow you to send the above to three different Unix
accounts. The point is, the mail ends up in the mailbox(es) you define, and
that after all is the goal. The net result is a couple of informational
headers and log entries are added, but what significance are they? So the
issue is you don't care for the way the X-Original-To: and Delivered-To:
headers are written when virtual aliases are used? I'm sorry, I'm not aware
of a way to change this.

Gary V

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 7:36 am | All times are GMT
navigation Forum index » Apps » Postfix
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Unknown in header problem -SOLVED- Light Speed Postfix 0 Thu Jul 03, 2008 10:40 am
No new posts Writing a function that changes an unknown-type numeric v... pozz C 8 Wed Jul 19, 2006 5:23 pm
No new posts delivery temporarily suspended: unknown mail transport error Ramprasad Postfix 2 Wed Jul 19, 2006 2:42 pm
No new posts 2.6-S1 Parsing Config File: Unknown authentication scheme... Covington, Chris Squid 1 Tue Jul 18, 2006 2:21 pm
No new posts How to use ParseTuple with unknown number of args? ondekoza@gmail.com python 2 Tue Jul 18, 2006 9:29 am

Debt Consolidation | Tour Management Software | Babb Fest | Salvage cars | Bankruptcy
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2658s ][ Queries: 16 (0.1105s) ][ GZIP on - Debug on ]