LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-24-2008, 08:01 PM   #1
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Rep: Reputation: 15
Postfix relay access denied multiple domains


Hey there, I've got a tiny little problem

I've got multiple domains now but someway somehow I can't send to my new domains. Everything from and to leonweemen.nl goes well, no problems at all but when I try to mail to fashion-makers.nl ...it goes badly wrong.

On the local network here, no problems but when trying to mail from hotmail then I simply get Relay access denied:

Code:
info@fashion-makers.nl op 25-1-2008 2:56
  You do not have permission to send to this recipient. For assistance, contact your system administrator.
  <hpsmtp-eml18.kpnxchange.com #5.7.1 smtp;554 5.7.1 <info@fashion-makers.nl>: Relay access denied>
Help!! what's going on, I posted my config below. Can someone help me.
Already thnx for reading

Code:
inet_protocols = ipv4
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient

mynetworks = 80.60.146.97, 83.160.184.8, 192.168.0.3, fashion-makers.nl leonweemen.nl, zadkinesux.nl

mydomain = leonweemen.nl
myhostname = leonweemen.nl
program_directory = /usr/lib/postfix
masquerade_domains = 
mydestination = $myhostname, localhost.$mydomain
defer_transports = 
disable_dns_lookups = no
relayhost = mailrelay.direct-adsl.nl
relaydomains = $mydestination, fashion-makers.nl
mailbox_command = 
mailbox_transport = 
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination 
smtpd_client_restrictions = permit_mynetworks
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
 
Old 01-25-2008, 12:51 AM   #2
norbert74
Member
 
Registered: Apr 2006
Posts: 63

Rep: Reputation: 23
Hi
please post the complete mail header of the error mail you got back when you send via hotmail.
 
Old 01-25-2008, 05:01 AM   #3
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Rep: Reputation: 32
I think you also need to add the host names to mydestination. Usually mynetworks is just ip addresses, I don't know if domains are even valid there.



http://www.postfix.org/basic.html
 
Old 01-25-2008, 05:38 AM   #4
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Original Poster
Rep: Reputation: 15
This one is what a get when I send from the webmail of my ISP

Code:
Received:  from hpsmtp-eml18.kpnxchange.com ([10.94.77.192]) by CPEXBE-EML18.kpnsp.local with Microsoft SMTPSVC(6.0.3790.1830); Fri, 25 Jan 2008 12:32:49 +0100
MIME-Version: 1.0
Content-Type: multipart/report;
	report-type=delivery-status;
	boundary="----_=_NextPart_001_01C85F46.053FE895"
X-MimeOLE: Produced By Microsoft Exchange V6.5
X-DSNContext: 7ce717b1 - 1194 - 00000002 - 00000000
Return-Path: <>
X-OriginalArrivalTime: 25 Jan 2008 11:32:49.0813 (UTC) FILETIME=[03EAD450:01C85F46]
Content-class: urn:content-classes:dsn
Subject: Onbezorgbaar: test 12:32
Date: Fri, 25 Jan 2008 12:32:52 +0100
Message-ID: <J8Yon3f1W0005f45e@hpsmtp-eml18.kpnxchange.com>
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: test 12:32
Thread-Index: AchfRgHnZsmQ4ypWTsOesTzMnimhRgAAANYl
From: "Systeembeheerder" <postmaster@kpnxchange.com>
To: <weeme029@planet.nl>
This is what the mail log says

Code:
Jan 25 11:09:50 leonweemen postfix/smtpd[2251]: connect from hpsmtp-eml18.kpnxchange.com[213.75.38.118]
Jan 25 11:09:50 leonweemen postfix/smtpd[2251]: NOQUEUE: reject: RCPT from hpsmtp-eml18.kpnxchange.com[213.75.38.118]: 554 5.7.1 <info@fashion-makers.nl>: Relay access denied; from=<weeme029@planet.nl> to=<info@fashion-makers.nl> proto=ESMTP helo=<hpsmtp-eml18.kpnxchange.com>
Jan 25 11:09:51 leonweemen postfix/smtpd[2251]: disconnect from hpsmtp-eml18.kpnxchange.com[213.75.38.118]
 
Old 01-25-2008, 05:39 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You don't want virtual domains in mydestination. Read the virtual howto on postfix.org as a starter
 
Old 01-25-2008, 07:05 AM   #6
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Original Poster
Rep: Reputation: 15
OK I followed the postfix manual (http://www.postfix.org/VIRTUAL_README.html -> Postfix virtual ALIAS example: separate domains, UNIX system accounts
, I solved a part of my problem and getting a new one back

I altered my config:

Code:
inet_protocols = ipv4
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = fashion-makers.nl, zadkinesux.nl
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient

mynetworks = 80.60.146.97, 192.168.0.7

mydomain = leonweemen.nl
myhostname = leonweemen.nl
program_directory = /usr/lib/postfix
masquerade_domains = 
mydestination = $myhostname, localhost.$mydomain 
defer_transports = 
disable_dns_lookups = no
relayhost = mailrelay.direct-adsl.nl
relaydomains = $mydestination
mailbox_command = 
mailbox_transport = 
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination 
smtpd_client_restrictions = permit_mynetworks
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
This is what I get now:
Code:
Jan 25 12:32:22 leonweemen postfix/smtpd[6761]: connect from ip503c9261.speed.planet.nl[80.60.146.97]
Jan 25 12:32:22 leonweemen postfix/smtp[6678]: warning: host 80.60.146.97[80.60.146.97]:25 greeted me with my own hostname leonweemen.nl
Jan 25 12:32:22 leonweemen postfix/smtp[6678]: warning: host 80.60.146.97[80.60.146.97]:25 replied to HELO/EHLO with my own hostname leonweemen.nl
Jan 25 12:32:22 leonweemen postfix/smtp[6678]: BF02A1B502E: to=<fashion01@leonweemen.nl>, orig_to=<info@fashion-makers.nl>, relay=80.60.146.97[80.60.146.97]:25, delay=0.56, delays=0.43/0/0.12/0, dsn=5.4.6, status=bounced (mail for [80.60.146.97] loops back to myself)
 
Old 01-25-2008, 07:23 AM   #7
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Original Poster
Rep: Reputation: 15
Whoops I found that the mail server doens't accept mail at all :S
Code:
Jan 25 12:57:17 leonweemen postfix/smtpd[7955]: connect from hpsmtp-eml11.kpnxchange.com[213.75.38.111]
Jan 25 12:57:17 leonweemen postfix/smtpd[7955]: 2BC3E1B502E: client=hpsmtp-eml11.kpnxchange.com[213.75.38.111]
Jan 25 12:57:17 leonweemen postfix/cleanup[7959]: 2BC3E1B502E: message-id=<21A2522F22CB324A95B0CAE11A92AF87011D9C99@CPEXBE-EML18.kpnsp.local>
Jan 25 12:57:17 leonweemen postfix/qmgr[6513]: 2BC3E1B502E: from=<weeme029@planet.nl>, size=2105, nrcpt=1 (queue active)
Jan 25 12:57:17 leonweemen postfix/smtpd[7955]: disconnect from hpsmtp-eml11.kpnxchange.com[213.75.38.111]
Jan 25 12:57:17 leonweemen postfix/smtpd[7955]: connect from ip503c9261.speed.planet.nl[80.60.146.97]
Jan 25 12:57:17 leonweemen postfix/smtp[7960]: warning: host 80.60.146.97[80.60.146.97]:25 greeted me with my own hostname leonweemen.nl
Jan 25 12:57:17 leonweemen postfix/smtp[7960]: warning: host 80.60.146.97[80.60.146.97]:25 replied to HELO/EHLO with my own hostname leonweemen.nl
Jan 25 12:57:17 leonweemen postfix/smtp[7960]: 2BC3E1B502E: to=<info@leonweemen.nl>, relay=80.60.146.97[80.60.146.97]:25, delay=0.16, delays=0.09/0/0.07/0, dsn=5.4.6, status=bounced (mail for [80.60.146.97] loops back to myself)
Jan 25 12:57:17 leonweemen postfix/smtpd[7955]: disconnect from ip503c9261.speed.planet.nl[80.60.146.97]
Jan 25 12:57:17 leonweemen postfix/cleanup[7959]: 654371B5086: message-id=<20080125115717.654371B5086@leonweemen.nl>
Jan 25 12:57:17 leonweemen postfix/qmgr[6513]: 654371B5086: from=<>, size=3867, nrcpt=1 (queue active)
Jan 25 12:57:17 leonweemen postfix/bounce[7961]: 2BC3E1B502E: sender non-delivery notification: 654371B5086
Jan 25 12:57:17 leonweemen postfix/qmgr[6513]: 2BC3E1B502E: removed
Jan 25 12:57:19 leonweemen postfix/smtp[7960]: 654371B5086: to=<weeme029@planet.nl>, relay=mailrelay.direct-adsl.nl[195.121.6.12]:25, delay=2.2, delays=0.05/0/2.1/0.11, dsn=2.0.0, status=sent (250 2.0.0 m0PDKGLq006262 Message accepted for delivery)
Jan 25 12:57:19 leonweemen postfix/qmgr[6513]: 654371B5086: removed
Jan 25 13:00:37 leonweemen postfix/anvil[7957]: statistics: max connection rate 1/60s for (smtp:213.75.38.116) at Jan 25 12:56:31
Jan 25 13:00:37 leonweemen postfix/anvil[7957]: statistics: max connection count 1 for (smtp:213.75.38.116) at Jan 25 12:56:31
Jan 25 13:00:37 leonweemen postfix/anvil[7957]: statistics: max cache size 2 at Jan 25 12:57:17

Last edited by metalenkist; 01-25-2008 at 07:25 AM.
 
Old 01-25-2008, 07:54 AM   #8
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
Quote:
Originally Posted by metalenkist View Post
Code:
myhostname = leonweemen.nl
Is that really your hostname? DNS says it's smtp.leonweemen.nl. That is why you get the "mail loops back to myself" error.

Quote:
Originally Posted by metalenkist View Post
Code:
relaydomains = $mydestination
There is no parameter relaydomains. You meant relay_domains. But you can just leave it out as you only specified the default, anyway.
 
Old 01-25-2008, 08:17 AM   #9
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Original Poster
Rep: Reputation: 15
I think we're getting close

Code:
Jan 25 13:52:29 leonweemen postfix/smtpd[11867]: connect from hpsmtp-eml15.kpnxchange.com[213.75.38.115]
Jan 25 13:52:29 leonweemen postfix/smtpd[11867]: CF0E61B502E: client=hpsmtp-eml15.kpnxchange.com[213.75.38.115]
Jan 25 13:52:29 leonweemen postfix/cleanup[11871]: CF0E61B502E: message-id=<21A2522F22CB324A95B0CAE11A92AF87011D9CA6@CPEXBE-EML18.kpnsp.local>
Jan 25 13:52:29 leonweemen postfix/qmgr[11865]: CF0E61B502E: from=<weeme029@planet.nl>, size=2110, nrcpt=1 (queue active)
Jan 25 13:52:29 leonweemen postfix/smtpd[11867]: disconnect from hpsmtp-eml15.kpnxchange.com[213.75.38.115]
Jan 25 13:52:30 leonweemen postfix/smtp[11872]: CF0E61B502E: to=<fashion01@leonweemen.leonweemen.nl>, orig_to=<info@fashion-makers.nl>, relay=mailrelay.direct-adsl.nl[195.121.6.12]:25, delay=0.38, delays=0.15/0.03/0.07/0.13, dsn=2.0.0, status=sent (250 2.0.0 m0PEFTBI017405 Message accepted for delivery)
Jan 25 13:52:30 leonweemen postfix/qmgr[11865]: CF0E61B502E: removed
Jan 25 13:52:30 leonweemen postfix/smtpd[11867]: connect from psmtp14.wxs.nl[195.121.247.46]
Jan 25 13:52:30 leonweemen postfix/smtpd[11867]: NOQUEUE: reject: RCPT from psmtp14.wxs.nl[195.121.247.46]: 554 5.7.1 <fashion01@leonweemen.leonweemen.nl>: Relay access denied; from=<weeme029@planet.nl> to=<fashion01@leonweemen.leonweemen.nl> proto=ESMTP helo=<psmtp14.wxs.nl>
Jan 25 13:52:30 leonweemen postfix/smtpd[11867]: disconnect from psmtp14.wxs.nl[195.121.247.46]
That name is a bit odd:
Quote:
to=<fashion01@leonweemen.leonweemen.nl>
 
Old 01-25-2008, 08:57 AM   #10
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
Quote:
Originally Posted by metalenkist View Post
That name is a bit odd:
Probably a mistake in your /etc/postfix/virtual? (And don't forget to run postmap after changing it)
 
Old 01-25-2008, 09:02 AM   #11
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Original Poster
Rep: Reputation: 15
O I saw I didn't change my hostname very well, now I changed it to

Code:
myhostname = smtp.leonweemen.nl
mail from fashion-makers arrives but mail to the leonweemen.nl domain still fails

Code:
Jan 25 14:33:33 leonweemen postfix/smtpd[13969]: connect from hpsmtp-eml16.kpnxchange.com[213.75.38.116]
Jan 25 14:33:33 leonweemen postfix/smtpd[13969]: NOQUEUE: reject: RCPT from hpsmtp-eml16.kpnxchange.com[213.75.38.116]: 554 5.7.1 <info@leonweemen.nl>: Relay access denied; from=<weeme029@planet.nl> to=<info@leonweemen.nl> proto=ESMTP helo=<hpsmtp-eml16.kpnxchange.com>
I'll check the virtual thing too
 
Old 01-25-2008, 09:18 AM   #12
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
Quote:
Originally Posted by metalenkist View Post
mail from fashion-makers arrives but mail to the leonweemen.nl domain still fails
You'll have to add leonweemen.nl to mydestination.
 
Old 01-25-2008, 09:32 AM   #13
metalenkist
Member
 
Registered: Aug 2005
Distribution: OpenSuse 11.1
Posts: 36

Original Poster
Rep: Reputation: 15
WOOOOOOOOOOOOOOOOOOOOHOOOOOOOOOOOOOOOOOOOOOOO
It's fixed ty ty ty ty

I'll post my final conf in case for people with the same problems.
I added my main domain (leonweemen.nl) to the relay_domains and now it works.

Thnx

Code:
inet_protocols = ipv4
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = fashion-makers.nl, zadkinesux.nl
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient

mynetworks = 80.60.146.97, 192.168.0.7

mydomain = leonweemen.nl
myhostname = smtp.leonweemen.nl
program_directory = /usr/lib/postfix
masquerade_domains = 
mydestination = $myhostname, localhost.$mydomain
defer_transports = 
disable_dns_lookups = no
relayhost = mailrelay.direct-adsl.nl
relay_domains = $mydestination, leonweemen.nl
mailbox_command = 
mailbox_transport = 
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination 
smtpd_client_restrictions = permit_mynetworks
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
 
Old 01-27-2008, 07:35 AM   #14
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Rep: Reputation: 32
It still doesn't look right. This is my conf. I have a couple of domains that use it but they are not virtual:

http://lindsay.ath.cx/stuff/postfix.txt
 
Old 01-27-2008, 05:20 PM   #15
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
esaym, what are you saying, since the OP says it works? If you're still referring to mydestination, read the virtual link the OP posted - specifically the comment

Quote:
NEVER list a virtual alias domain name as a mydestination domain!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: Relay access denied TheZodiac Linux - Server 4 10-24-2007 10:23 AM
HELP! POSTFIX Relay access denied cozyk1515 Linux - Software 3 07-21-2006 08:56 AM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
Postfix and Relay access denied jamiguel77 Linux - Software 3 03-12-2005 10:53 AM
postfix: Relay access denied SolidSnake Linux - Networking 4 02-20-2004 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration