Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Virtual Domains without WGM accounts

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
virtual mailboxdomains = hash:/etc/postfix/virtual_domains
virtual mailboxbase = /var/mail/vhosts
virtual mailboxmaps = hash:/etc/postfix/vmailbox
virtual minimumuid = 100
virtual uidmaps = static:5000
virtual gidmaps = static:5000
virtual aliasmaps = hash:/etc/postfix/virtual
content_filter = smtp-amavis:[127.0.0.1]:10024
owner requestspecial = 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
debug peerlevel = 2
default destination_concurrencylimit = 20
enable serveroptions = yes
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
local destination_concurrencylimit = 2
local recipientmaps =
luser_relay = postmaster
mail_owner = _postfix
mailbox sizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps rbldomains =
message sizelimit = 1047527424
mydestination = $myhostname,localhost.$mydomain,localhost
mydomain = thehinckleys.com
mydomain_fallback = localhost
myhostname = TheServer.thehinckleys.com
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
owner requestspecial = 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
smtpd clientrestrictions = permit_mynetworks reject rblclient cbl.abuseat.org reject rblclient dnsbl.njabl.org permit
smtpd pw_server_securityoptions = gssapi,cram-md5
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = yes
smtpd use_pwserver = yes
unknown local_recipient_rejectcode = 550
virtual aliasmaps = hash:/etc/postfix/virtual
virtual gidmaps = static:5000
virtual mailboxbase = /var/mail/vhosts
virtual mailboxdomains = hash:/etc/postfix/virtual_domains
virtual mailboxmaps = hash:/etc/postfix/vmailbox
virtual minimumuid = 100
virtual_transport = lmtp:unix:/var/imap/socket/lmtp
virtual uidmaps = static:5000

Intel Mac Mini, Mac OS X (10.5.1), 2.0Ghz 2GB RAM 160GB HDD

Posted on Dec 7, 2007 2:08 AM

Reply
9 replies

Dec 10, 2007 4:20 AM in response to pterobyte

Fear not, I do not expect a personal support assistant, the plea was to have been light-hearted (thus the Shakespearean English). I just noticed you are amazingly generous with your support and hoped to capture your attention.

I have much to learn on the integration between Server Admin / postfix / cyrus. I just headed out of town but will post logs next week when I return. In the meantime I'll read up more on what the mailbox_transport line does.

Thanks!

Jan 16, 2008 8:55 PM in response to pterobyte

Wow, over a month since I've had time to tackle this.
Ok, if I'm planning to check these mail accounts via POP or IMAP I need Cyrus as the transport, right? Or would Cyrus be able to pull from the local maildrops?

If it can't, am I pretty much stuck with local accounts (per your manual) to make this work, or do I also have to set up the new accounts somehow in cyrus?

Thank you

Here is the log from one send attempt
Jan 16 17:11:52 MyServer postfix/cleanup[7760]: warning: regexp map /etc/postfix/header_checks, line 430: ignoring unrecognized request
Jan 16 17:11:52 MyServer postfix/pickup[7633]: 82216BC81E: uid=501 from=<me>
Jan 16 17:11:52 MyServer postfix/cleanup[7760]: 82216BC81E: message-id=<20080117011152.82216BC81E@MyServer.testdomain.com>
Jan 16 17:11:52 MyServer postfix/qmgr[158]: 82216BC81E: from=<user1@MyServer.testdomain.com>, size=355, nrcpt=1 (queue active)
Jan 16 17:11:52 MyServer postfix/lmtp[7762]: 82216BC81E: to=<user2@testdomain2.com>, relay=MyServer.testdomain.com[/var/imap/socket/lmtp], delay=0.53, delays=0.16/0.03/0.27/0.06, dsn=5.1.1, status=bounced (host MyServer.testdomain.com[/var/imap/socket/lmtp] said: 550-Mailbox unknown. Either there is no mailbox associated with this 550-name or you do not have authorization to see it. 550 5.1.1 User unknown (in reply to RCPT TO command))
Jan 16 17:11:53 MyServer postfix/cleanup[7760]: F1A87BC822: message-id=<20080117011152.F1A87BC822@MyServer.testdomain.com>
Jan 16 17:11:53 MyServer postfix/qmgr[158]: F1A87BC822: from=, size=2604, nrcpt=1 (queue active)
Jan 16 17:11:53 MyServer postfix/bounce[7766]: 82216BC81E: sender non-delivery notification: F1A87BC822
Jan 16 17:11:53 MyServer postfix/qmgr[158]: 82216BC81E: removed
Jan 16 17:11:53 MyServer postfix/pipe[7768]: F1A87BC822: to=<user1@MyServer.testdomain.com>, relay=cyrus, delay=0.31, delays=0.05/0.06/0/0.2, dsn=5.6.0, status=bounced (data format error. Command output: scotthinckley: Mailbox does not exist )
Jan 16 17:11:53 TheServer postfix/qmgr[158]: F1A87BC822: removed

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.

Feb 8, 2008 10:59 AM in response to pterobyte

Ok, doing the way I would prefer is more complicated than I want to deal with.
SO... I installed a fresh copy of Tiger Server and grabbed your tutorial.
Great Tutorial!

Only 2 questions left now - when using your tutorial method for virtual domains:
1) For accounts that I want auto-forwarded to an external email do I use the "Forward" option in the "Mail" tab of WGM, or do I use the /etc/postfix/virtual file, or both?
2) How do I set up a "catch-all" account for one of my domains (I.E. any mail not destined for a known user goes to the catch-all account). Do I create the account in WGM and put an "@mydomain.com" in the secondary name, do I put it in the /etc/postfix/virtual file, or both?

Thanks,
Scott

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 poor sap_receving_all_spam_to_unknownusers
to /etc/postfix/virtual

Feb 8, 2008 11:22 AM in response to pterobyte

LOL

I made a decision that, at the time seemed smart, many years ago with one of my domains.
Every vendor I gave an email address to got a unique address "vendor@mydomain.com" so that I could track who gave away or sold my address and to make filtering rules easier.
Unfortunately with the s**tstorm of spam today that turns out to be a bad decision in retrospect as there are many hundreds of those in use and there is no way I can remember them all or want to create accounts for them.
So, for that one domain, I'm stuck with a catch-all that sees 3k-10k spam emails/day (let's hear it for good bayesian filters).

Virtual Domains without WGM accounts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.