No outgoing mail when BIND9 is off

5 posts / 0 new
Last post
#1 Mon, 08/06/2007 - 18:15
webinger

No outgoing mail when BIND9 is off

Hello, I have debian 4.0 and the newest Version of Virtualmin pro and webmin installed on a minimal configuration Debian 4. Everything is working. Only with Postfix i have a problem with outgoing mails. Receiving is working well. I don't want to use Bind because my server-prodiver also has DNS servers.

The Problem is when is turn BIND off i get deferred (Host or domain name not found. Name service error for name=gmx.net type=MX: Host not found, try again)

When BIND server is on everything is workin fine. I Hope someone can help me [size=4] Mail Log:[/size]

BIND9 off: Aug 6 17:52:19 localhost postfix/smtp[23353]: 71EAF15980E5: to=<user@website.net>, relay=none, delay=1787, delays=1787/0.02/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=website.net type=MX: Host not found, try again) Aug 6 17:52:20 localhost postfix/smtp[23351]: 71EAF15980E5: to=<user@gmx.net>, relay=none, delay=1787, delays=1787/0.03/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmx.net type=MX: Host not found, try again) Aug 6 17:52:21 localhost postfix/smtp[23352]: 71EAF15980E5: to=<user@web.de>, relay=none, delay=1787, delays=1787/0.03/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=web.de type=MX: Host not found, try again)

BIND9 on: Aug 6 18:01:46 localhost postfix/smtp[23695]: 5CEBA159818F: to=<user@web.de>, relay=mx-ha01.web.de[217.72.xxx.xxx]:25, delay=0.16, delays=0.04/0.01/0.06/0.04, dsn=2.0.0, status=sent (250 OK id=1II51a-00051n-00) Aug 6 18:01:51 localhost postfix/smtp[23696]: 5CEBA159818F: to=<user@website.net>, relay=mail.website.net[83.246.xxx.xxx]:25, delay=4.9, delays=0.04/0.01/4.8/0.04, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as D62DFB3800F) Aug 6 18:01:51 localhost postfix/qmgr[22935]: 5CEBA159818F: removed

the nameservers in resolv.conf are the ones given by my provider. They are reachable from my server.

For example when i test: servername:/etc# host gmx.net gmx.net has address 213.165.65.50 gmx.net mail is handled by 10 mx0.gmx.net. gmx.net mail is handled by 10 mx0.gmx.de. outbreak-eve:/etc# they seem to work with bind9 = off.

Here is my postfix config. Maybe it helps you. Please tell me if you need something.

main.cf smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no

appending .domain is the MUA's job.

append_dot_mydomain = no

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

smtpd_sender_restrictions = reject_non_fqdn_sender smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtp_bind_adress = 88.198.1x.xxx

myhostname = mail.mydomain.com mydestination = $mydomain $myhostname localhost localhost.$mydomain

myorigin = $mydomain

alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases relayhost = mynetworks = 127.0.0.0/8 mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all virtual_alias_maps = hash:/etc/postfix/virtual home_mailbox = Maildir/ broken_sasl_auth_clients = yes mime_header_checks = pcre:/etc/postfix/body_check smtp_destination_recipient_limit = 30 fallback_relay = smtp_destination_concurrency_limit = 30 master.cf

smtp inet n - - - - smtpd -o smtpd_sasl_auth_enable=yes pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr

qmgr fifo n - - 300 1 oqmgr

tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap smtp unix - - - - - smtp loops relay unix - - - - - smtp -o fallback_relay= showq unix n - - - - showq error unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache

maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

Post edited by: Martin, at: 2007/08/07 14:56<br><br>Post edited by: Martin, at: 2007/08/07 15:13

Mon, 08/06/2007 - 22:40
Joe
Joe's picture

Not sure what to make of that.

Try restarting Postfix. It may only read resolv.conf on startup.

--

Check out the forum guidelines!

Tue, 08/07/2007 - 11:44 (Reply to #2)
webinger

Hi Joe thanks for your reply,
I have added some configs. Maybe they will help you. If you need something else let me know
regards martin

Tue, 08/07/2007 - 17:07 (Reply to #3)
webinger

ok i think the error was that i made a link from the files
etc/hosts
etc/resolv.com

to /var/spool/postfix/etc
<b>why does this not work?</b>
i thought that this would be more convenient to make a link
now i copied the both files and it works.

what do you think is better? running it chrooted or not?
what is the difference?

do you think i can uninstall bind9 now? or does any other program use its config files or something

regards Martin&lt;br&gt;&lt;br&gt;Post edited by: Martin, at: 2007/08/07 17:08

Wed, 08/08/2007 - 02:17 (Reply to #4)
Joe
Joe's picture

Symbolic links don't work from within chroots because the path in the link is meaningless within the chroot. If you chroot yourself into that directory and run &quot;ls -l&quot; you'll see what I mean.

The developer of Postfix does not recommend running it chrooted, but the Debian/Ubuntu packages ship it chrooted by default. I definitely trust Wietse to understand the implications more then random Debian packagers, so I always run it without the chroot. Given that Postfix drops privileges upon startup, the risk is roughly the same (assuming permissions on the rest of the system are sane).

--

Check out the forum guidelines!

Topic locked