LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-13-2007, 03:37 PM   #1
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Rep: Reputation: 16
Postfix Loop Problem


I am having a problem with postfix, I get this error everytime I attempt to send an email.

Quote:
A configuration error in the e-mail system caused the message to bounce between two servers or to be forwarded between two recipients. Contact your administrator.
< cbv-gateway #5.4.6 X-Postfix; mail for CBVillage.org loops back to myself
>

Posted below is my postconf -n

Quote:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
mailbox_size_limit = 0
myhostname = cbv-gateway.cbvillage.org
mynetworks = 172.23.1.0/24, 127.0.0.0/8, 192.168.0.0/24, 10.32.1.0/30
myorigin = /etc/mailname
recipient_delimiter = +
relay_domains = cbvillage.org, cbv-gateway.cbvillage.org, localhost.cbvillage.org, localhost, cbvillage.local
relay_recipient_maps = hash:/etc/postfix/exchange_recipients
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes

Now you might see that I don't have a mydestination line in main.cf. The way I have it setup is relay_recipient_maps to an .db file which a perl script creates after it queries the exchange server and writes all the email addresses from the exchange server to a file called exchange_recipients. Instead of mydestinations I have relay_domains. Is this breaking postfix?

Thanks in advance

Last edited by lsteacke; 08-13-2007 at 03:56 PM.
 
Old 08-13-2007, 04:10 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
relaying is for mail passing *through* the machine, whilst mydestination defines what is for the server itself. so the mail in question just keeps passing itself round in circles, relaying to itself. only set up relay domains for mail that is *not* for you, but is trusted etc...
 
Old 08-13-2007, 04:24 PM   #3
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Original Poster
Rep: Reputation: 16
So should I setup mydestinations as well? Should mydestinations be the exchange server?
 
Old 08-14-2007, 02:38 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
to be honest I'm not clear on that architecture you're trying to put together there... if it is meant to be passing that email on, then this postfix box needs to have a better MX record for that domain than itself. presumably if you look up the mx record on the box for this cbvillage.org domain then the best possible next hop as far as postfix is concerned is presumably to be itself. if this has gone off-net and just on a private LAN, then unless you specifically push those domains onwards to the exchange box then you would address your internal DNS to have better MX records relating to exchange over the box itself.
 
Old 08-14-2007, 10:12 AM   #5
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
To add to what acid_kewpie has said, you also need to explicitly turn off $mydestination:
Code:
mydestination =
. With your present settings, mydestination is still defined. Run "postconf mydestination" and you'll see that at least your hostname is listed.
 
Old 08-14-2007, 10:36 AM   #6
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Original Poster
Rep: Reputation: 16
I apologize for being vague about the configuration. My box is indeed just a forwarding box, or at least it should be. Its running postfix/spamassassin and squid, and I would like to have it just forward the mail to the exchange server. Now I know postfix uses dns to do this, so I've been doing some investigating with the MX records and dns. I think this is the problem.

Thanks for the help guys.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 10:09 PM
Postfix-spamassassin mail loop problem Pcghost Linux - Software 7 09-25-2016 12:38 PM
Postfix mail forwarding loop lacerto Linux - Networking 1 06-01-2005 06:07 PM
Postfix Mail Loop dlublink Linux - Networking 0 12-30-2004 04:15 PM
Postfix ---------- Loop backs to myself joseph Linux - General 0 08-20-2003 04:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration