Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Relay access denied - Again
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jecepede
Apprentice
Apprentice


Joined: 19 Nov 2002
Posts: 194

PostPosted: Mon Jun 17, 2019 9:03 pm    Post subject: [SOLVED] Relay access denied - Again Reply with quote

Aloha !

And yet another 'Relay access denied'-question.

I have followed this document : https://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server : to create a virtual mailserver.
Most things went quite smooth. I have two test addresses and I can send from one to the other and vice versa however...
...when I try to send mail to an external hotmail account, I end up with the following error :

Code:

Jun 17 22:48:17 zaxxon postfix/smtpd[3887]: connect from unknown[10.0.1.129]
Jun 17 22:48:17 zaxxon postfix/smtpd[3887]: NOQUEUE: reject: RCPT from unknown[10.0.1.129]: 454 4.7.1 <external@hotmail.com>: Relay access denied; from=<jecepede@domain-one.nl> to=<external@hotmail.com> proto=ESMTP helo=<[10.0.1.129]>
Jun 17 22:48:18 zaxxon postfix/smtpd[3887]: disconnect from unknown[10.0.1.129] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4


Some extra info :

* My mail is send from Thunderbird which hangs in the same network as the mail server.
* When I use the same PC to an older mailserver in the same network (the one this one should be replacing) it works ok.
* Not sure if it matters : This new mailserver with the relay problem, runs in a VM....



Code:

zaxxon /etc/postfix # postconf -n
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
local_transport = local
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
meta_directory = /etc/postfix
mydestination = localhost.$mydomain, localhost
mydomain = domain-one.nl
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relayhost = [smtp.upcmail.nl]
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
shlib_directory = /usr/lib64/postfix/${mail_version}
smtp_tls_note_starttls_offer = no
smtp_use_tls = no
smtpd_tls_auth_only = no
smtpd_use_tls = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = domain-one.nl, domain-two.nl, domain-three.nl
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_minimum_uid = 1000
virtual_transport = virtual
virtual_uid_maps = static:5000



I have been at this for several weeks now so hopefully someone can help me see the light . . .



Cheeeeeeeeeeeers,


Jecepede
_________________
With all this technology they can't even make a computer that bounces....
http://garfield.wabbit-wion.nl


Last edited by jecepede on Tue Jun 18, 2019 4:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1797
Location: Oranienburg/Germany

PostPosted: Tue Jun 18, 2019 7:28 am    Post subject: Reply with quote

Hi,

does the old server run postfix as well? If yes, check whether it contains "mynetworks" and "smtpd_recipient_restrictions" in the main.cf

i have the following lines setup:

Code:

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.23.0/24 192.168.0.0/24
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination


This allows me to relay from my local LANs but not from the outside.

greets bb
_________________
1st: i5-4570, 16GB, 1.75TB
2nd: i5-4570, 16GB, 620GB
3rd: i5-4570, 16GB, 10,5TB
4th: Asus N61VN, 8GB, 240GB
5th: C2D T7200, 2GB, 16GB USB + NFS
Back to top
View user's profile Send private message
jecepede
Apprentice
Apprentice


Joined: 19 Nov 2002
Posts: 194

PostPosted: Tue Jun 18, 2019 4:18 pm    Post subject: Yahooooo ! Reply with quote

Aloha !


You Sir, bbgermany, are brilliant !!! #NotWorthy

How could I have completely missed this. I added the lines and yeah it works like a charm.
Have to check if I indeed can't sent aimail from outside my own network but I think that should not be any problem.

To answer the question :
Quote:
does the old server run postfix as well

Yes it does but.... it has none of these lines and yet the old one functiones just fine ?



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



By the way; I did change one line :
Code:
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.23.0/24 192.168.0.0/24

into :
Code:
mynetworks = 127.0.0.0/8 10.0.1.0/24

I do not use IPv6 (just yet) and my internal network is not a 192-IP



Cheeeeeeeeeeeers,


Jecepede
_________________
With all this technology they can't even make a computer that bounces....
http://garfield.wabbit-wion.nl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum