LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix relay access denied multiple domains (https://www.linuxquestions.org/questions/linux-server-73/postfix-relay-access-denied-multiple-domains-616142/)

metalenkist 01-24-2008 08:01 PM

Postfix relay access denied multiple domains
 
Hey there, I've got a tiny little problem :D

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


norbert74 01-25-2008 12:51 AM

Hi
please post the complete mail header of the error mail you got back when you send via hotmail.

esaym 01-25-2008 05:01 AM

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

metalenkist 01-25-2008 05:38 AM

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]


billymayday 01-25-2008 05:39 AM

You don't want virtual domains in mydestination. Read the virtual howto on postfix.org as a starter

metalenkist 01-25-2008 07:05 AM

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 :D

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)


metalenkist 01-25-2008 07:23 AM

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


rupertwh 01-25-2008 07:54 AM

Quote:

Originally Posted by metalenkist (Post 3034858)
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 (Post 3034858)
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.

metalenkist 01-25-2008 08:17 AM

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>

rupertwh 01-25-2008 08:57 AM

Quote:

Originally Posted by metalenkist (Post 3034921)
That name is a bit odd:

Probably a mistake in your /etc/postfix/virtual? (And don't forget to run postmap after changing it)

metalenkist 01-25-2008 09:02 AM

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 :)

rupertwh 01-25-2008 09:18 AM

Quote:

Originally Posted by metalenkist (Post 3034973)
mail from fashion-makers arrives but mail to the leonweemen.nl domain still fails

You'll have to add leonweemen.nl to mydestination.

metalenkist 01-25-2008 09:32 AM

WOOOOOOOOOOOOOOOOOOOOHOOOOOOOOOOOOOOOOOOOOOOO
It's fixed :D:D:D:D:D:D ty ty ty ty :D:D:D:D

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


esaym 01-27-2008 07:35 AM

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

billymayday 01-27-2008 05:20 PM

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!


All times are GMT -5. The time now is 06:53 PM.