Linode Forum
https://forum.linode.com/

postfix: virtual alias maps (trying to act as a mail relay)
https://forum.linode.com/viewtopic.php?f=11&t=8386
Page 1 of 1

Author:  Kunda [ Fri Feb 03, 2012 11:42 pm ]
Post subject:  postfix: virtual alias maps (trying to act as a mail relay)

Debian Squeeze

So I'm trying to follow the instructions found on http://www.postfix.org/VIRTUAL_README.html#forwarding

I have a FQDN and a few apache vhosts . I'd like to act as a mail relay using virtual alias maps. I've set postfix up as a Satellite System.

I can send mail to my FQDN name which I have set as a catch-all mailbox that immediately fwds to my personal gmail.
When I try to send an email to one of my vhosts, it is rejected.

Line 323 of the successful FQDN email (verbose postfix mail.log output http://p.linode.com/6243)
and
Line 324 of the failed vhost (verbose postfix mail.log output http://p.linode.com/6233)
are where these 2 files start to differ (you can ignore everything up to that point). From that moment on I'm trying to troubleshoot why my vhost email gets rejected.


Here is my main.cf ( http://p.linode.com/6234 )
Here is my master.cf ( http://p.linode.com/6235 )

Code:
#postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = mail.mydomain.net, mydomain.net, localhost.net, localhost
myhostname = mail.mydomain.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = mail.mydomain.net
virtual_alias_maps = hash:/etc/postfix/virtual


I've set up my /etc/postfix/virtual and
postconf'd it
+ restarted postfix each time.

I have no clue why this isn't working.

Any help is appreciated!

Author:  Kunda [ Sat Feb 04, 2012 12:29 am ]
Post subject:  Solved.

It's all about the /etc/postfix/virtual file
it needs to have:
Code:
thedomain.net anything

above any emails from that domain. that is what tells postfix that these domains are accepted

I'll make a contribution to the linode library and link to it from this post.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/