Page 1 of 1

Unable to sent email from remote server by using Relay

Posted: Thu Sep 10, 2020 1:21 pm
by fosiul
Hi,
I have couple of Web server, from there we want to sent email via our zimbra server,

So from zimbra Admin console, i have added those IP address under "MTA Trusted neworks"

but when i am sending email, in zimbra I get bellow log

What do i need to allow zimbra server to accept mail from other server as Relay ?

please let me know

Sep 10 15:09:36 mail postfix/smtpd[30762]: NOQUEUE: reject: RCPT from unknown[xxxx]: 554 5.7.1 <mymail@gmail.com>: Relay access denied; from=<root@domain-link.co.uk> to=<mymail@gmail.com> proto=ESMTP helo=<domain-link>

Sep 10 15:09:36 mail postfix/smtpd[30762]: NOQUEUE: filter: RCPT from unknown[xxxx]: <>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10024; from=<> to=<root@domain-link.co.uk> proto=ESMTP helo=<domain-link>

Sep 10 15:09:36 mail postfix/smtpd[30762]: NOQUEUE: filter: RCPT from unknown[xxxx]: <>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10026; from=<> to=<root@domain-link.co.uk> proto=ESMTP helo=<domain-link>

Re: Unable to sent email from remote server by using Relay

Posted: Thu Sep 10, 2020 6:50 pm
by derbärtigefrytz
I have to confess, I am far away from beeing a zimbra expert.
However I would say, there has to be a problem with the program, that sends the mail
Is it configured correct? Has it a sender address?
Your zimbra server obviously does not see a sender address.
Did you check this from the sending servers console by sending via telnet?

Your communication should look as follows:

telnet yourzimbraserver 25
>220 yourzimbraserver ESMTP Postfix
HELO yourdomain
>250 yourzimbraserver
mail from:<user@yourdomain>
>250 2.1.0 Ok
rcpt to:<externalmailaddress>
>250 2.1.5 Ok
data
>354 End data with <CR><LF>.<CR><LF>
hello
.
>250 2.0.0 Ok: queued as F27C2342238

Re: Unable to sent email from remote server by using Relay

Posted: Thu Sep 10, 2020 7:40 pm
by fosiul
Hi Thanks

for testing i am using this

cat /etc/hosts | mail -s "test" mydomain@gmail.com
yes it does not have sender address , hence its taking root@domain-link.com but, zimbra should not complain about this as if i sent email directly from the server ( without relaying to zimbra) google will accpet this email ( although it will go to junk)

I know in past it was working but i installed new zimbra but with this its not working..
derbärtigefrytz wrote:I have to confess, I am far away from beeing a zimbra expert.
However I would say, there has to be a problem with the program, that sends the mail
Is it configured correct? Has it a sender address?
Your zimbra server obviously does not see a sender address.
Did you check this from the sending servers console by sending via telnet?

Your communication should look as follows:

telnet yourzimbraserver 25
>220 yourzimbraserver ESMTP Postfix
HELO yourdomain
>250 yourzimbraserver
mail from:<user@yourdomain>
>250 2.1.0 Ok
rcpt to:<externalmailaddress>
>250 2.1.5 Ok
data
>354 End data with <CR><LF>.<CR><LF>
hello
.
>250 2.0.0 Ok: queued as F27C2342238

Re: Unable to sent email from remote server by using Relay

Posted: Thu Sep 10, 2020 7:44 pm
by fosiul
also according to this post sender address can be blank

https://wiki.zimbra.com/wiki/Sender_add ... mtp-amavis


derbärtigefrytz wrote:I have to confess, I am far away from beeing a zimbra expert.
However I would say, there has to be a problem with the program, that sends the mail
Is it configured correct? Has it a sender address?
Your zimbra server obviously does not see a sender address.
Did you check this from the sending servers console by sending via telnet?

Your communication should look as follows:

telnet yourzimbraserver 25
>220 yourzimbraserver ESMTP Postfix
HELO yourdomain
>250 yourzimbraserver
mail from:<user@yourdomain>
>250 2.1.0 Ok
rcpt to:<externalmailaddress>
>250 2.1.5 Ok
data
>354 End data with <CR><LF>.<CR><LF>
hello
.
>250 2.0.0 Ok: queued as F27C2342238

Re: Unable to sent email from remote server by using Relay

Posted: Fri Sep 11, 2020 7:15 am
by fosiul
i think the main problem is this

Sep 11 09:04:55 mail postfix/smtpd[8377]: NOQUEUE: reject: RCPT from unknown[xxxxxx]: 554 5.7.1 <my@gmail.com>: Relay access denied; from=<root@domain-link.co.uk> to=<my@gmail.com> proto=ESMTP helo=<domain-link>

"Relay Access Denied"

but i have added the ips in MTA Trusted Network list, so why its still denying ?

thanks for helping

Re: Unable to sent email from remote server by using Relay

Posted: Fri Sep 11, 2020 8:01 am
by phoenix
What you need to do is create a user account for the 'server' that's sending the email and then authenticate on port 587 and submit the email as a regular Zimbra user, you really don't want to allow unauthenticated email to be sent through your server - think about it. ;)

Re: Unable to sent email from remote server by using Relay

Posted: Fri Sep 11, 2020 9:26 am
by derbärtigefrytz
Hello Sirs
phoenix wrote:What you need to do is create a user account for the 'server' that's sending the email and then authenticate on port 587 and submit the email as a regular Zimbra user, you really don't want to allow unauthenticated email to be sent through your server - think about it. ;)
My intention was, to tell fosiul, that his problem in first hand is not related to MTA Trusted networks. The mail is accepted on the beginning, which is RFC conform.
Then Amavisd is triggered.

fosiul could see this by testing with telnet.
in direct communication with zimbra, he would see, that his local user root@domain-link.co.uk is allowed to send e-mail, because he is a user in the local network.
He can use any mail from:... he likes. Zimbra accepts it in first hand even with an empty mail from:<>.There is no error given to user root.
However in a second step Amavisd filters it, if it (I beleive) has a combination of empty mail from:<> and external mailto. All other mail will be delivered.
In a standard installation of zimbra, he will be able to send i.e. with empty "from" to internal. He will also be able to send to external recipient with a non existing "from".
His MTA Trusted networks works.

I agree with you in that it would be a goog idea to always send with authenticated users.
In this special case with empty "from" and external recipient, an authenticated user is necessary.
Regards

Re: Unable to sent email from remote server by using Relay

Posted: Sun Nov 22, 2020 11:36 pm
by wealth
i need buy on zimbra smtp port 587


and know how to build or hack it myself bro