Author Topic: Zentyal 5 454 4.7.1 relay access denied on virtual domains  (Read 3128 times)

Rodney

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Zentyal 5 454 4.7.1 relay access denied on virtual domains
« on: January 31, 2017, 06:24:24 pm »
Hello all.
I have installed Zentyal 5 and added 3 virtual domains. All mail to the main domain addresses delivers to dovecot fine but any other virtual domain address gets a 454 4.7.1 relay access denied in the log. I can sent from the other virtual domains fine. Any thoughts?

bounee

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #1 on: February 08, 2017, 10:25:50 pm »
I have the same problem. So far, I could not find a solution. Does anyone have an idea?  :-\

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #2 on: February 10, 2017, 10:03:37 am »
which version of zentyal-mail are you using?

You can check with apt-cache policy zentyal-mail

thanks!
Zentyal Server Lead Developer

mitko992

  • Zen Apprentice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #3 on: February 10, 2017, 11:07:21 am »
My version is 5.0.3. :)

Rodney

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #4 on: February 10, 2017, 05:58:09 pm »
I am also using 5.0.3.
Where is the apt-cache policy zentyal-mail?

branislav.kopun

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #5 on: February 14, 2017, 01:29:22 pm »
you must put it in ssh session (not thru web)

user@zentyal:~$ apt-cache policy zentyal-mail
zentyal-mail:
  Installed: 5.0.4
  Candidate: 5.0.4
  Version table:
 *** 5.0.4 500
        500 http://archive.zentyal.org/zentyal 5.0/main amd64 Packages
        500 http://archive.zentyal.org/zentyal 5.0/main i386 Packages
        100 /var/lib/dpkg/status

branislav.kopun

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #6 on: February 15, 2017, 09:57:23 am »
WORKAROUND - for me was solution to mofify mas template
edit /usr/share/zentyal/stubs/mail/main.cf.mas and add your domain to parameter mydestination

original my destination look like
Code: [Select]
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain,$mydomain
after change (for domain acme.com)
Code: [Select]
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain,$mydomain,acme.com
And you need to restart Mail service thru zentyal web dashboard

I think that problem is in parsing $mydomain parameter but I don't know where is it ...

nontrivial

  • Zen Warrior
  • ***
  • Posts: 173
  • Karma: +14/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #7 on: February 17, 2017, 09:29:35 pm »
I am using zentyal mail version 5.0.4 and I am having the same problem. Unfortunately the workaround isn't working for me. Any ideas?

p.surmont

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #8 on: February 18, 2017, 10:20:31 pm »
The problem still exist with 5.0.7 version. After upgrading, i had to edit main.cf.mas and add my domains manually again. Of course the work around is working but it s not very practical.

Best regards

Neustradamus

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-3
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #9 on: February 20, 2017, 01:22:12 pm »
Same problem with last Zentyal (updated)

timroijers

  • Zen Apprentice
  • *
  • Posts: 34
  • Karma: +4/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #10 on: February 23, 2017, 03:33:46 pm »
email sent to an alias email address seems to work just fine.

So for now i assigned the user an email address johndoe@doe.com and provided this user with an alias email address  john@doe.com (the address i actually want).



« Last Edit: February 23, 2017, 03:47:20 pm by timroijers »

Syntax

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #11 on: February 23, 2017, 08:48:09 pm »
email sent to an alias email address seems to work just fine.

The topic is about virtual domains, not email alias'

And yes, same problem here.  I added a second virtual mail domain and get "Relay access denied (in reply to RCPT TO command)"

I have 2 test users one has email addresses from both v-domains and the other for only the 2nd one:
User1@vdomain1.tld --> delivery success
User1@vdomain2.tld --> relay error (unless sent from within mailbox from User1@vdomain1.tld to User1@vdomain2.tld)
User2@vdomain2.tld --> relay error

EDIT: the above is from an outside email.  Zentyal 5.07
« Last Edit: February 23, 2017, 08:49:58 pm by Syntax »

timroijers

  • Zen Apprentice
  • *
  • Posts: 34
  • Karma: +4/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #12 on: February 23, 2017, 08:57:49 pm »
Quote
The topic is about virtual domains, not email alias'

I know... i can read. having the same problem with the virtual domains.
I was providing a workaround, but good luck on your search.

Syntax

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #13 on: February 24, 2017, 12:06:02 am »

original my destination look like
Code: [Select]
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain,$mydomain
after change (for domain acme.com)
Code: [Select]
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain,$mydomain,acme.com

Going off of what branislav.kopun wrote I started poking around in the stubs.  His workaround still works (just added a comma and typed in the name of my virtual domain on the end), but I wanted to figure out what variable was missing. 

Haven't found anything yet, several spots refer to objectClass=CourierVirtualDomain (and CourierMailAlias etc...) when Dovecot is installed instead of Courier, but changing that didn't seem to have any effect.

I tried guessing at the variable name (assuming that was what was missing) and it's not $vdomain, $vdomains, $vdomainsCfFile, or $virtual_mailbox_domains (all of which were things I came across in the files and decided to try).  I thought that last one would work, because it looked to be formatted the same way as some of the other declarations in the main.cf.mas

Speaking of formatting, I compared the vdomains.cf.mas and the valiases.cf.mas files and found the "query_filter = " line backwards in vdomains compared to valiases and tried flipping it around, but no dice.



SHORT VERSION:
branislav.kopun's workaround of manually putting in the virtual domain still works.
I tried a bunch of stuff to find the problem (missing parameter?) that didn't solve it.

timroijers

  • Zen Apprentice
  • *
  • Posts: 34
  • Karma: +4/-0
    • View Profile
Re: Zentyal 5 454 4.7.1 relay access denied on virtual domains
« Reply #14 on: February 25, 2017, 07:42:41 pm »
Quote
SHORT VERSION:
branislav.kopun's workaround of manually putting in the virtual domain still works.

added my domain name in /usr/share/zentyal/stubs/mail/main.cf.mas, rebooted the server.
checked /etc/postfix/main.cf and can see my domain name is added to my destinations.
Still cannot send and/or receive any mails, so back to my Zentyal 4.0 for now.