Reject the other user

2011-04-06 Thread Tolga

Hi,

I'm planning to stuff a few domains, and I am currently adding 
users/domains virtually (in a mysql table). What I want to do is, when I 
have a user bob and have two domains like example.com and example.net, 
accept e-mail for b...@example.com and reject for b...@example.net. How is 
this possible? Below is my postconf -n output:


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = ozses.net
myhostname = vps.ozses.net
mynetworks = 127.0.0.0/8 [:::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 (Ubuntu)
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_gid_maps = static:1001
virtual_mailbox_base = /srv/vmail
virtual_mailbox_domains = bilgisayarciniz.org kunduz.org
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:1001

Regards,
Tolga


Re: Reject the other user

2011-04-06 Thread /dev/rob0
On Thu, Apr 07, 2011 at 12:53:45AM +0300, Tolga wrote:
 I'm planning to stuff a few domains, and I am currently adding
 users/domains virtually (in a mysql table). What I want to do is,
 when I have a user bob and have two domains like example.com and
 example.net, accept e-mail for b...@example.com and reject for
 b...@example.net. How is this possible? Below is my postconf -n
 output:
 
snip
 virtual_mailbox_domains = bilgisayarciniz.org kunduz.org
 virtual_mailbox_maps = hash:/etc/postfix/vmailbox

If your virtual_mailbox_maps (which, BTW, is *not* in a 
mysql_table(5) lookup) lists for bob@bilgisayarciniz..., but doesn't 
list bob@kunduz..., mail for bob@bilgisayarciniz... is accepted, and 
mail for bob@kunduz... will be rejected as User unknown in virtual 
mailbox table.

References:
http://www.postfix.org/VIRTUAL_README.html
http://www.postfix.org/ADDRESS_CLASS_README.html#virtual_mailbox_class
http://www.postfix.org/MYSQL_README.html
-- 
Offlist mail to this address is discarded unless
/dev/rob0 or not-spam is in Subject: header


Re: Reject the other user

2011-04-06 Thread aly . khimji
Do a quick google on postfix virtual domains and virtual users + mysql.

Tons of great how to's and guides. Its quite simple once you see how it can be 
done in a guide or two and understand the concept. Check on howtoforge.com they 
have excellent guides for virtual users/domains using mysql + courier or 
dovecot.

Aly

Sent from my BlackBerry device on the Rogers Wireless Network

-Original Message-
From: Tolga to...@ozses.net
Sender: owner-postfix-us...@postfix.org
Date: Thu, 07 Apr 2011 00:53:45 
To: postfix-users@postfix.org
Subject: Reject the other user

Hi,

I'm planning to stuff a few domains, and I am currently adding 
users/domains virtually (in a mysql table). What I want to do is, when I 
have a user bob and have two domains like example.com and example.net, 
accept e-mail for b...@example.com and reject for b...@example.net. How is 
this possible? Below is my postconf -n output:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = ozses.net
myhostname = vps.ozses.net
mynetworks = 127.0.0.0/8 [:::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 (Ubuntu)
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_gid_maps = static:1001
virtual_mailbox_base = /srv/vmail
virtual_mailbox_domains = bilgisayarciniz.org kunduz.org
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:1001

Regards,
Tolga