Skip navigation
This discussion is archived

Virtual Domains without WGM accounts

1886 Views 9 Replies Latest reply: Feb 8, 2008 11:22 AM by HinckleyScott RSS
HinckleyScott Level 1 Level 1 (0 points)
Currently Being Moderated
Dec 7, 2007 2:08 AM
I am trying to use the "Postfix virtual MAILBOX example: separate domains, non-UNIX accounts" method of configuration from http://www.postfix.org/VIRTUAL_README.html. I am only concentrating on the SMTP side right now, the IMAP side will follow. I am apparently dong something wring because the accounts I have created are coming up as " 550-Mailbox unknown. Either there is no mailbox associated with this 550-name or you do not have authorization to see it."
I have tried with and without first creating the mailbox with a "touch" command.
Adding a user through WGM and giving it mail access works, but is not what I want to do (and it does not seem to place the mailbox for the user in the /var/mail/vhosts heiarchy I created, even though I first added the user to the vmailbox file)

lines from /etc/postfix/main.cf
virtualmailboxdomains = hash:/etc/postfix/virtual_domains
virtualmailboxbase = /var/mail/vhosts
virtualmailboxmaps = hash:/etc/postfix/vmailbox
virtualminimumuid = 100
virtualuidmaps = static:5000
virtualgidmaps = static:5000
virtualaliasmaps = hash:/etc/postfix/virtual
content_filter = smtp-amavis:[127.0.0.1]:10024
ownerrequestspecial = no
recipient_delimiter = +
alias_maps = hash:/etc/aliases,hash:/var/mailman/data/aliases
relayhost =
mydestination = $myhostname,localhost.$mydomain,localhost

/etc/postfix/virtual_domains
testdomain.com allow
testdomain2.com allow

/etc/postfix/virtual
HeMoved@testdomain.com HisNewAddress@hotmail.com

/etc/postfix/vmailbox
user1@testdomain.com testdomain.com/user1
user2@testdomain.com testdomain.com/user2
@testdomain.com testdomain.com/postmaster
user1@testdomain2.com testdomain2.com/user1
user2@testdomain2.com testdomain2.com/user2
@testdomain2.com testdomain2.com/postmaster

Directories created with group and owner set to vmail (which was created as sid/gid 5000)
/var/mail/vhosts
/var/mail/vhosts/testdomain.com
/var/mail/vhosts/testdomain.com/cur
/var/mail/vhosts/testdomain.com/new
/var/mail/vhosts/testdomain.com/tmp
/var/mail/vhosts/testdomain2.com
/var/mail/vhosts/testdomain2.com/cur
/var/mail/vhosts/testdomain2.com/new
/var/mail/vhosts/testdomain2.com/tmp

Output of postconf -n
alias_maps = hash:/etc/aliases,hash:/var/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debugpeerlevel = 2
defaultdestination_concurrencylimit = 20
enableserveroptions = yes
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
localdestination_concurrencylimit = 2
localrecipientmaps =
luser_relay = postmaster
mail_owner = _postfix
mailboxsizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mapsrbldomains =
messagesizelimit = 1047527424
mydestination = $myhostname,localhost.$mydomain,localhost
mydomain = thehinckleys.com
mydomain_fallback = localhost
myhostname = TheServer.thehinckleys.com
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
ownerrequestspecial = no
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpd_banner = $myhostname ESMTP
smtpdclientrestrictions = permit_mynetworks rejectrblclient cbl.abuseat.org rejectrblclient dnsbl.njabl.org permit
smtpdpw_server_securityoptions = gssapi,cram-md5
smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpdsasl_authenable = yes
smtpduse_pwserver = yes
unknownlocal_recipient_rejectcode = 550
virtualaliasmaps = hash:/etc/postfix/virtual
virtualgidmaps = static:5000
virtualmailboxbase = /var/mail/vhosts
virtualmailboxdomains = hash:/etc/postfix/virtual_domains
virtualmailboxmaps = hash:/etc/postfix/vmailbox
virtualminimumuid = 100
virtual_transport = lmtp:unix:/var/imap/socket/lmtp
virtualuidmaps = static:5000
Intel Mac Mini, Mac OS X (10.5.1), 2.0Ghz 2GB RAM 160GB HDD
  • pterobyte Level 6 Level 6 (10,910 points)
    Currently Being Moderated
    Dec 10, 2007 2:05 AM (in response to HinckleyScott)
    I am glad to help, but am not a personal support assistant Let alone over the weekend.

    Since you don't show any log entries it's hard to tell. I'd say postfix is still trying to deliver to cyrus instead of the local maildrops you created because of "mailbox_transport = cyrus"
    Mac OS X (10.5)
  • pterobyte Level 6 Level 6 (10,910 points)
    Currently Being Moderated
    Dec 10, 2007 4:33 AM (in response to HinckleyScott)
    Scott,

    I assume you want to go through this hassle so that you can manage mail accounts separate from WGM, correct?

    If so, you may want to consider installing a Postfix version with MySQL support.

    Alex
    Mac OS X (10.5)
  • pterobyte Level 6 Level 6 (10,910 points)
    Currently Being Moderated
    Jan 17, 2008 4:28 AM (in response to HinckleyScott)
    If you set up accounts in WGM there is no need to do anything special in Cyrus.

    Accessing mail via POP/IMAP has nothing to do with where your accounts are stored (WGM, textfile, SQL, etc.)

    Unless you have a good reason for not wanting to create local accounts, I'd say use WGM. If you can't (maybe because you are hosting hundreds of mail only accounts), consider building a Postfix version that allows for MySQL connectivity.
    Mac OS X (10.5)
  • pterobyte Level 6 Level 6 (10,910 points)
    Currently Being Moderated
    Feb 8, 2008 11:11 AM (in response to HinckleyScott)
    1. /etc/postfix/virtual

    2. I would avoid catch all addresses. Mail to unknown users is 99% of the time spam. The few legit mails with misspelled addresses should bounce back to the sender so they know.
    That said, if you must:
    For local domains use "luser_relay" in /etc/postfix/main.cf

    For virtual mail domains, add:
    @mydomain.com poorsap_receving_all_spam_to_unknownusers
    to /etc/postfix/virtual
    Mac OS X (10.5)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.