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