Server is relaying to the local domain instead of assigned server

email from blah@blah.org to blah2@blah.org to nethserver.good.local

domain on nethserver.good.local, blah.org set to relay to zentyal.good.local (neither host or ip have mattered when testing).

nethserver delivers to blah2@blah.org and relays to blah2@good.local but not to the assigned relay zentyal

log shows exactly that and log does not show attempt to relay to zentyal.

I’m testing here, zentyal acl filter has never worked consistently but nethserver’s does so far, I thought I’d see about beginning the transition with the blocking of zips, so anyway, blocking works but relaying isn’t going to the other server.

Any hints?

Could you show the relevant lines from /var/log/maillog?

1 Like

Apr 28 16:21:37 nethserver delivery/lmtp[2552]: 89DB92192A: to=blah2@nethserver.good.local, orig_to=blah2@blah.org, relay=nethserver.good.local[/var/run/dovecot/lmtp], delay=0.72, delays=0.16/0.03/0.02/0.51, dsn=2.0.0, status=sent (250 2.0.0 blah2@nethserver.good.local 85awLQAWQFX5CQAA7KHZ/g Saved)

domain is blah.org where message @blah.org are relayed to another server zentyal or ip, doesn’t matter.

postfix thinks that blah.org is local to nethserver.
I need to see the output of

db domains show

[root@nethserver ~]# db domains show
blah.org=domain
AlwaysBccStatus=disabled
Description=
DisclaimerStatus=disabled
RelayHost=zentyal
TransportType=Relay
UnknownRecipientsActionType=bounce
good.local=domain
AlwaysBccAddress=
AlwaysBccStatus=disabled
Description=
DisclaimerStatus=disabled
TransportType=LocalDelivery
UnknownRecipientsActionDeliverMailbox=
UnknownRecipientsActionType=bounce

I’ve used zentyal, zentyal.good.local and the ip for zentyal.

I think I was able to reproduce your problem. You shouldn’t define mail address for the zentyal server in the NethServer email address page.
My config:

loc.org=domain
    AlwaysBccStatus=disabled
    Description=
    DisclaimerStatus=disabled
    TransportType=LocalDelivery
    UnknownRecipientsActionType=bounce
    UnknownRecipientsActionType=bounce
zen.net=domain
    Description=
    DisclaimerStatus=disabled
    RelayHost=192.168.1.1
    TransportType=Relay

If I define an email addfress named there@zen.net, mail is delivered locally instaed of realyed to 192.168.1.1. If I delete there@zen.net mail is sent to 192.168.1.1.

2 Likes

I turned off the mail service for user blah2 and used the full fqdn for zentyal and that worked.

That means that user can’t have an email address for any domain on this server.

Hmmm… it looks like as long as the sending domain is different than the receiving domain then it relays the email, but when the sending domain and receiving domain are the same it delivers locally.

Sigh. ok, I turned mail service back on for blah2 and mail service has always been on for blah, blah3 was never created on nethserver.

Now it relays incoming mails for blah and blah3 to zentyal but delivers blah2 locally unless I turn mail service back off for blah2, then it relays blah2 to zental.

You could set a forward address in the user panel.