Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Mar 13, 2009 12:14 pm 
Offline
Junior Member
User avatar

Joined: Thu Mar 05, 2009 11:24 am
Posts: 22
Website: http://vpsBible.com
Location: valencia & london
I've got Postfix working with Courier and MySQL, but now want to set up catch-all mail accounts. But how? I am particularly confused about using MySQL for virtual_alias_maps. I guess I have to somehow cross-reference existing tables, and maybe create a catchall table for each domain. (I have next to no experience playing with this.)

My main.cf reads ...

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/certs/mailcert.pem
smtpd_tls_key_file = $smtpd_tls_cert_file

myhostname = mail.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =
relayhost =
mynetworks = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-forwards.cf, mysql:/etc/postfix/mysql-email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

...

Would I be right in thinking I need to change the above to:

myhostname = localhost
virtual_alias_domains = mydomain.com mydomain2.com another.tld

And .. well, here's where I am most confused what to do...

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-forwards.cf, mysql:/etc/postfix/mysql-email.cf # What do I do here??

...

Were I not using MySQL, I guess I would set up /etc/postfix/virtual map file and add something like:

@mydomain.com newbie@mydomain.com
@another.tld newbie@mydomain.com

... but as I have created mySQL tables for domains, users, email and forward, I am guessing I need to do something different,

...and thought I would ask before messing everything up.

Any pointers greatly appreciated.


Top
   
 Post subject:
PostPosted: Fri Mar 13, 2009 1:44 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
In the past, I have done catch-all addresses in virtual_mailbox_maps by creating an entry for @domain.com with the mailbox location. For example if I want the catch-all to go to user1@domain.com
Code:
user1@domain.com domain.com/user1/.maildir/
@domain.com domain.com/user1/.maildir/

I've never used mysql though, so not sure if it will work for you.


Top
   
 Post subject:
PostPosted: Fri Mar 13, 2009 7:32 pm 
Offline
Junior Member
User avatar

Joined: Thu Mar 05, 2009 11:24 am
Posts: 22
Website: http://vpsBible.com
Location: valencia & london
tx Stever, appreciate that, will try.


Top
   
 Post subject:
PostPosted: Wed Mar 18, 2009 6:52 am 
Offline
Junior Member
User avatar

Joined: Thu Mar 05, 2009 11:24 am
Posts: 22
Website: http://vpsBible.com
Location: valencia & london
hmmn, have gone for Google apps for now!

_________________
"Setup Unmanaged VPS 4 Linux Noobs!"

The ultimate VPS guide: forum, stackscripts, benchmarking, PHP/FastCGI guides, Nginx, WordPress, Drupal, multisites, VPS admin etc!

All you need to know is how to read.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group