> Hi. > > inet <-----> hosting.com <-----> mail.hosting.com > > smtpd.conf ... > > listen on ext > map "virtuals" { source plain "/etc/mail/virtuals.plain" } > accept from all for virtual virtuals relay > > virtuals.plain ... > > postmas...@hosted.com somewh...@gmail.com
[..] > If I send mail to the virtual domain I get "bounces" back to the > originating server - recipient rejected. > If I check the default log (/var/log/maillog) on the mail machine I > see the mail is getting that far and the same error is there - > recipient rejected. There's something odd about virtuals; though the code I'm running is no longer current (5.0-BETA, to be precise). Here's what makemap.8 says: Virtual domains are kept in maps. To create single virtual address, add ``u...@example.com user'' to the virtual map. To handle all mail destined to any user at example.com, add ``@example.com user'' to the virtual map. I tried this with a very minimal local setup. smtpd.conf: listen on lo0 map "aliases" { source plain "/etc/mail/aliases" } map "virtual" { source plain "/etc/mail/virtual" } accept for virtual "virtual" deliver to mbox accept for local alias aliases deliver to mbox virtual: somebody@virtual.domain duclare Trying to send to address gets me recipient rejected: $ echo test|mail somebody@virtual.domain send-mail: 530 5.0.0 Recipient rejected: somebody@virtual.domain I added some debug printfs, and they show that map_stdio_lookup is called with key="virtual.domain". There is no such key, and the mail is rejected. Out of curiosity, I added a matching line to virtual just to see what happens: virtual.domain duclare somebody@virtual.domain duclare With this setup, the mail command above works, and my local user receives the message. Smtpd makes these lookups: >>> map_stdio_lookup [key=virtual.domain] aliases_vdomain_exist: 'virtual.domain' exists >>> map_stdio_lookup [key=somebody@virtual.domain] aliases_virtual_exist: 'somebody@virtual.domain' exists >>> map_stdio_lookup [key=somebody@virtual.domain] aliases_virtual_get: 'somebody@virtual.domain' resolved to 1 nodes lka_resolve_node: node is local username: duclare I hope Gilles can tell whether this is a documentation bug or code bug. Or maybe I just missed something obvious (such as a sufficiently recent snapshot) :-).