HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Server Operation (
-   -   Postfix 2.5 Virtual AND Local Domains and Users (

rumak18 28th April 2010 16:40

Postfix 2.5 Virtual AND Local Domains and Users
i've already read a lot of texts about this topic, but i've never achieved to run my server as requested. I run postfix on SUSE Linux 11.
I've got several registered domains
with subdomains running on my postfix.
So far, i've always added a system account user for each e-mail address in my mail domain (Let's call it
Now we will get new customers and i want to use a completely new domain for these new customers called This time, i don't want to use local system accounts for each users. I've already have enough users in my /etc/passwd. So the best solution seems to use virtual mailbox domains. I've already tried some configuration but never succeeded.
Look at my

readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
inet_protocols = ipv4
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = mailserver.meinedomain
delay_warning_time = 1h
message_strip_characters = \0
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = $myhostname, $mydomain, localhost, localhost@$mydomain,, subdomain.mymaindomain
defer_transports =
mynetworks_style = subnet
mynetworks =
disable_dns_lookups = no
relayhost =
mailbox_command =
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 30720000
message_size_limit = 10240000
append_dot_mydomain = no
As you see, i already use the "virtual_alias_maps" for mapping real email addresses to forged addresses , because i have to separate them laterwards with a special POP3 Listener.
As far as i know, i need the following settings in my (Eventually i'm wrong) :

virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
But here again, the virtual_alias_maps would use my existing virtual file and this is not what i want, as i mentioned before. The final question is:
How can i add this second new domain using virtual domains and virtual users , but keeping the local domains/users and settings as they are.

All times are GMT +2. The time now is 03:29.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.