View previous topic :: View next topic |
Author |
Message |
Valen Apprentice
Joined: 18 Aug 2002 Posts: 197 Location: Toronto, Ontario, Canada
|
Posted: Fri Oct 22, 2004 6:42 am Post subject: Postfix relay problem |
|
|
This is another "mail for X loops back to myself" problems.
My setup is this: NAT with postfix running on all machines. I want my server to accept all mail for 'cobe.dyndns.org' (which it does) and forward it to the appropriate local computer (which it does not). Addresses which are local are delivered fine, but if I alias someone as 'user@other.machine' it bounces with the "mail for other.machine loops back to myself".
Here's 'postconf -n':
Code: |
alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 2
html_directory = no
local_destination_concurrency_limit = 2
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = cobe.dyndns.org
myhostname = hal.cobe.dyndns.org
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.3/readme
relay_domains = enigma.$mydomain, kosh.$mydomain, marvin.$mydomain
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
|
My understanding was that settting 'relay_domains' would tell postfix to send the message to the appropriate computer, why does it think otherwise, and how do I set it to do what I want?
Thanks |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri Oct 22, 2004 7:51 am Post subject: |
|
|
Quote: | My understanding was that settting 'relay_domains' would tell postfix to send the message to the appropriate computer |
Well, no, that's not what that means.
Relay_domains defines which domains Postfix will accept mail for, regardless of what happens to it after that.
Meaning you still have to define transports to route it further.
Otherwise - as you have noticed - all mail will be routed back to the machine since it thinks it is the only MTA for those domains.
You also very much need to include $mydomain in relay_domains.
Read http://www.postfix.org/BASIC_CONFIGURATION_README.html#relay_to
and http://www.postfix.org/STANDARD_CONFIGURATION_README.html#some_local
for the nitty-gritty. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Valen Apprentice
Joined: 18 Aug 2002 Posts: 197 Location: Toronto, Ontario, Canada
|
Posted: Fri Oct 22, 2004 4:19 pm Post subject: |
|
|
Yes, that worked (I was looking through the example before, but could never figure out which one was appropriate). I've set up transport_maps (and I fixed my relay_domains, thanks for catching that) so all the mail goes to the right places.
I have one more question. My tranport file currently looks like:
Code: |
marvin.cobe.dyndns.org smtp:10.0.0.4
artoo.cobe.dyndns.org smtp:10.0.0.3
enigma.cobe.dyndns.org smtp:10.0.0.2
cobe.dyndns.org :
.cobe.dyndns.org :
|
If I try to add something like 'smtp:[marvin]' or 'smtp:marvin' it says 'Host or domain name not found. Name service error for name=gandalf type=A: Host not found'. And it doesn't have any DNS record so that is fine. I have been using /etc/hosts until now, is there a way to have it accept values from the hosts file? |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sun Oct 24, 2004 7:25 pm Post subject: |
|
|
That depends on what is in your /etc/nsswitch.conf file.
By default, the system checks the config files before using dns.
But an MTA generally needs a working DNS to function correctly; if this is not what you desire you can usually cofigure the MTA to not do DNS lookups at all.
Although this probably violates the RFC somewhere. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|