Mail loop sending external domain

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Mail loop sending external domain

durwin
I have receiving working well.   And if I send outgoing mail via telnet, it works.
But if I send from my Domino server, I get a mail loop.

I have Domino server running on a Windows machine (called mailserver).
It's configured to send to Linux machine running Postfix (Called postfix).
Postfix machine is suppose to deliver to internet.  But, email the postfix
machine receives from Mailserver is sent back to Mailserver.

Let me know what other files you may need.

Thank you,

Durwin


=== main.cf ===
compatibility_level = 2
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = postfix.mycompany.com
mydomain = mycompany.com
myorigin = $myhostname
inet_interfaces = all
inet_protocols = all
mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
local_recipient_maps = $alias_maps
unknown_local_recipient_reject_code = 550
mynetworks_style = subnet
mynetworks = 172.23.93.0/24
relay_domains = $mydomain
virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost = $mydomain
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/aliases
 
 
header_checks = regexp:/etc/postfix/header_checks
smtpd_banner = mail.mycompany.com ESMTP $mail_name ($mail_version)
smtp_helo_name = mail.mycompany.com
debug_peer_level = 1
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix/samples
readme_directory = /usr/share/doc/postfix/README_FILES
meta_directory = /etc/postfix
shlib_directory = /usr/lib64/postfix
smtpd_authorized_xclient_hosts = 172.23.93.0/24
smtpd_recipient_restrictions =
        permit_mynetworks
        reject_unauth_destination
smtpd_client_restrictions =
        reject_unknown_reverse_client_hostname
smtpd_relay_restrictions =
        permit_mynetworks
        reject_unauth_destination
smtpd_helo_required = yes
smtpd_helo_restrictions =
        permit_mynetworks
        check_helo_access hash:/etc/postfix/helo_access
        reject_invalid_helo_hostname
postscreen_access_list = permit_mynetworks,
        cidr:/etc/postfix/postscreen_access.cidr
postscreen_blacklist_action = drop
postscreen_dnsbl_threshold = 2
postscreen_dnsbl_sites = zen.spamhaus.org*2
        bl.spamcop.net*1
        b.barracudacentral.org*2

=== END main.cf ===




This email message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message.
Reply | Threaded
Open this post in threaded view
|

Re: Mail loop sending external domain

Viktor Dukhovni
On Fri, Jul 20, 2018 at 09:58:52AM -0600, [hidden email] wrote:

> Postfix machine is suppose to deliver to internet.  But, email the postfix
> machine receives from Mailserver is sent back to Mailserver.
>
> relayhost = $mydomain

The above setting is why that happens.

You might try:

        relay_transport = relay:$mydomain

if the intent is to use "$mydomain"'s MX host only for inbound mail
to "$relay_domains".  But you'll have to think that through.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Mail loop sending external domain

durwin
[hidden email] wrote on 07/20/2018 10:05:12 AM:

> From: Viktor Dukhovni <[hidden email]>

> To: [hidden email]
> Date: 07/20/2018 10:05 AM
> Subject: Re: Mail loop sending external domain
> Sent by: [hidden email]
>
> On Fri, Jul 20, 2018 at 09:58:52AM -0600, [hidden email] wrote:
>
> > Postfix machine is suppose to deliver to internet.  But, email the postfix
> > machine receives from Mailserver is sent back to Mailserver.
> >
> > relayhost = $mydomain
>
> The above setting is why that happens.
>
> You might try:
>
>    relay_transport = relay:$mydomain


Thank you.

I tried that but still get loop.

Entire network has private addresses.  I have internal DNS server running.
I route email through a firewall. If this helps.


>
> if the intent is to use "$mydomain"'s MX host only for inbound mail
> to "$relay_domains".  But you'll have to think that through.
>
> --
>    Viktor.



This email message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message.
Reply | Threaded
Open this post in threaded view
|

Re: Mail loop sending external domain

Matus UHLAR - fantomas
In reply to this post by durwin
On 20.07.18 09:58, [hidden email] wrote:
>I have receiving working well.   And if I send outgoing mail via telnet,
>it works.
>But if I send from my Domino server, I get a mail loop.

>I have Domino server running on a Windows machine (called mailserver).
>It's configured to send to Linux machine running Postfix (Called postfix).
>Postfix machine is suppose to deliver to internet.  But, email the postfix
>machine receives from Mailserver is sent back to Mailserver.

>mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
>local_recipient_maps = $alias_maps
>unknown_local_recipient_reject_code = 550
>mynetworks_style = subnet
>mynetworks = 172.23.93.0/24
>relay_domains = $mydomain


>relayhost = $mydomain

you have configured all outgoing mail to be relayed through $mydomain
servers. That creates loop.

Since postfix is supposed to deliver directly to the internet, you are not
supposed to configure relayhost.

The relay_domains should be instead directed to your domino server via
transport_maps (or maybe relay_transport but i prefer the former).

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The early bird may get the worm, but the second mouse gets the cheese.
Reply | Threaded
Open this post in threaded view
|

Re: Mail loop sending external domain

durwin
[hidden email] wrote on 07/20/2018 12:04:04 PM:

> From: Matus UHLAR - fantomas <[hidden email]>

> To: [hidden email]
> Date: 07/20/2018 12:04 PM
> Subject: Re: Mail loop sending external domain
> Sent by: [hidden email]
>
> On 20.07.18 09:58, [hidden email] wrote:
> >I have receiving working well.   And if I send outgoing mail via telnet,
> >it works.
> >But if I send from my Domino server, I get a mail loop.
>
> >I have Domino server running on a Windows machine (called mailserver).
> >It's configured to send to Linux machine running Postfix (Called postfix).
> >Postfix machine is suppose to deliver to internet.  But, email the postfix
> >machine receives from Mailserver is sent back to Mailserver.
>
> >mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
> >local_recipient_maps = $alias_maps
> >unknown_local_recipient_reject_code = 550
> >mynetworks_style = subnet
> >mynetworks = 172.23.93.0/24
> >relay_domains = $mydomain
>
>
> >relayhost = $mydomain
>
> you have configured all outgoing mail to be relayed through $mydomain
> servers. That creates loop.
>
> Since postfix is supposed to deliver directly to the internet, you are not
> supposed to configure relayhost.
>
> The relay_domains should be instead directed to your domino server via
> transport_maps (or maybe relay_transport but i prefer the former).


Thank you Matus.  That fixed it.  I removed relayhost.  I was already using
transport_map for another external domain, so I added Domino to it.
Did not occur it could be used for local relaying.

Durwin

>
> --
> Matus UHLAR - fantomas, [hidden email] ;
http://www.fantomas.sk/
> Warning: I wish NOT to receive e-mail advertising to this address.
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
> The early bird may get the worm, but the second mouse gets the cheese.



This email message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message.