LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-27-2008, 08:20 AM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
postfix virtual hosting problem - mail for domain.com loops back to myself


Hi there !

My configuration: FreeBSD using postfix (virtual hosting - virtual domains, non-user accounts) and smtp auth (rimap).

main.cf

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
mail_owner = postfix
myhostname = localhost
virtual_mailbox_domain = /usr/local/etc/postfix/vhost.txt
virtual_mailbox_base = /var/spool/vmail
virtual_mailbox_maps = hash:/usr/local/etc/postfix/vmaps.txt
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
virtual_alias_maps = hash:/usr/local/etc/postfix/valias.txt
unknown_local_recipient_reject_code = 550
mynetworks_style = host


debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = no
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =
 permit_mynetworks
 permit_sasl_authenticated
 reject_unauth_destination
/usr/local/etc/postfix/vhost.txt - contains one domain per line (including domain.com).

The authentication is done using saslauthd (rimap). I get no relay denied, so it seems it works.

The same machine is authoritative dns server for domain.com

zone file:
Code:
$TTL 3h;
@       SOA     ns1.domain.com.     admin.domain.com. (
            3  ;serial
            3h ;refresh after 3hours
            5m ;retry after 15minutes
            3w ;expire after 3 weeks
            1h ;min
            )
            NS      ns1.domain.com.
            MX      10      mail.domain.com.
domain.com. A       192.168.0.100
ns1.domain.com.     A       192.168.0.100
www             A       192.168.0.100
mail            A       192.168.0.100
When I want to send a message from user@domain.com to user@domain.com from another machine (just for testing) I get in the postfix logs:

Code:
Dec 27 16:53:53 softexp postfix/smtp[1349]: 8ABFCAC832: to=<user@domain.com>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
Dec 27 16:53:53 softexp postfix/qmgr[1335]: 8ABFCAC832: removed
Dec 27 16:53:53 softexp postfix/smtpd[1344]: disconnect from unknown[192.168.0.219]
Where is the error? What should I do to fix the problem?

Thank you
 
Old 12-27-2008, 08:53 AM   #2
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
this is a good link for everyone having the same problem: http://www.topology.org/linux/postfix_virtual2.html
Anyway I think it is a dns misconfiguration but I can't figure exactly what is wrong.
Any help ??

Thank you
 
Old 12-27-2008, 09:27 AM   #3
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
Ok, I am really stupid. Hours of searching to find out the virtual_mailbox_domain is not the same with virtual_mailbox_domains

It works.
 
Old 12-27-2008, 09:29 AM   #4
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
Conclusion: never post on forums or use for your own debug main.cf but the output of postconf -n
 
Old 12-28-2008, 08:50 PM   #5
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
Ok, I am really stupid. Hours of searching to find out the virtual_mailbox_domain is not the same with virtual_mailbox_domains
Nice catch. To avoid such mistakes, I copy and paste variable names.
 
  


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
SENDMAIL config error: mail loops back to me (MX problem?) /jhannus Slackware 6 06-21-2011 05:44 AM
config error: mail loops back to me (MX problem?) linuxboy69 Linux - Networking 11 05-04-2011 02:52 PM
Postfix mail loops back to myself iceman42 Linux - Server 3 08-03-2010 05:59 AM
postfix virtual hosting problem ddaas Linux - Server 1 12-24-2008 09:49 AM
sendmail mail loops back but with a weird mail.barnhallrfc.com MX host masionas Linux - Server 2 12-09-2008 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:56 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