Postfix Confusion with virtual

Brian Chabot brian at datasquire.net
Thu Aug 18 11:22:00 EDT 2005


I just installed postfix on a new server.  I got a host from DynDNS to 
test things, and seem to have run into a snag.

The host has an MX record pointing to the box:

$ host -t MX $HOSTNAMEFQDN
romantic.blogdns.com mail is handled by 10 $ARECORDFORHOSTNAME.

In /etc/postfix/main.cf I have (among other non-relevent stuff):

virtual_alias_domains = hirebrian.net, $HOSTNAMEFQDN
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_recipient_restrictions = permit_mynetworks,  check_client_access 
hash:/etc/postfix/pop-before-smtp,  reject_rbl_client 
sbl-xbl.spamhaus.org,  reject_rbl_client relays.ordb.org,  
reject_rbl_client list.dsbl.org,    reject_rbl_client bl.spamcop.net,   
reject_rbl_client spam.dnsrbl.net,  reject_rbl_client dun.dnsrbl.net,   
reject_rbl_client rbl.datasquire.net, reject

In /etc/postfix/virtuial I have:
@$HOSTNAMEFQDN   $USERNAME

I have run
postmap hash:/etc/postfix/virtual

and
/etc/init.d/postfix reload

The server accepts and routes email to the new host fine... IF it is 
sent initially from a relay host ($mynetworks or locally).

BUT... If I send to addresses on that hostname from an external server I 
get:

Aug 18 11:05:17 rigor3 postfix/smtpd[20044]: NOQUEUE: reject: RCPT from 
$OUTSIDEMAILSERVER[111.111.111.111]: 554 <$USER at HOSTNAMEFQDN>: Recipient 
address rejected: Access denied; from=<sender at domain.tld> 
to=<$USER@$HOSTNAMEFQDN> proto=ESMTP helo=<$OUTSIDEMAILSERVER>

WTF?  The docs said to change the virtual_alias_domains in main.cf and 
/etc/postfix/virtual then run postmap, all of which I did by the book.

A debug gave me the reason as:
Aug 18 09:56:07 rigor3 postfix/smtpd[26331]: generic_checks: name=reject 
status=2

Any idea what I'm missing here?

Thanks,

Brian



More information about the gnhlug-discuss mailing list