Currently Being ModeratedAug 10, 2012 1:29 PM (in response to Jim Miller2)
I haven't tried this specifically, but I believe the controlling cf file is in /Library/Server/Mail/Config/postfix directory.
What I don't know is if this file is safe to edit, or if manual changes are "sticky" after updates.
Currently Being ModeratedAug 10, 2012 4:41 PM (in response to Jim Miller2)
Hi - try this.
There should be a file in your /Library/Server/Mail/Config/Postfix directory called "virtual_users"
Add an entry
"jimsdomain.com" is your email domain and
"jim" is the Mac Account short name that you would like to receive any misaddressed mail to.
$ sudo postmap /Library/Server/Mail/Config/postfix/virtual_users
$ sudo postfix reload (or stop start mail via sudo serveradmin or via server.app)
Hope that helps!
Currently Being ModeratedAug 11, 2012 9:41 AM (in response to redshift82r)
Hmm -- that's a new place to try. FWIW, the appropriate file in that directory is "virtual" rather than "virtual_users", but it may be the right version of the file to try (i.e., not the one in /etc/postfix).
I have to say that starting the Server mail server royally screwed up mail delivery and receipt on my server. After several hours of dealing with rejected connections and the like, I shut it down and went back to my previous solution, MailServe from cutedgesystems.com. I'm in kind of a crunch on some other things right now, but I'll check into this when I get back into it. Thanks!
BTW, a followup question that should really be a separate issue -- If the "virtual" thing works, I assume that the "aliases" file in this directory would similarly be the right place to put aliases. Is this the only way to manage aliases with Server, or is there some hidden part of the app's UI to do this. (I don't think so, but...)
Currently Being ModeratedAug 11, 2012 5:34 PM (in response to Jim Miller2)
Actually - virtual_users is the file you want.
"virtual" is for a different purpose - virtual alias domains.
So you may need to create "virtual_users". Do a
$ cat main.cf | grep virtual and
$ cat main.cf | grep alias
To see where postfix wants to find things. You're right about the aliases file in this directory. Postfix seems to now want it here.
Here's a final tip. Set the response codes for unknown local user to 450 in main.cf while your mucking around. That way any mail not delivered will be sent again by the sending smtp server. This will keep the users happy!!
unknown_local_recipient_reject_code = 450
Currently Being ModeratedAug 14, 2012 7:27 AM (in response to redshift82r)
Reporting back --
* /Library/Server/Mail/Config/postfix does seem to be the right path -- when I launch the server app, main.cf gets a new modification date (even though the mail server is still disabled). So that's good news.
* Not much evidence of "virtual" stuff in main.cf -- grepping for "virtual" in main.cf returns only this:
#myhostname = virtual.domain.tld
# Do not specify the names of virtual domains - those domains are
# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
# the $virtual_mailbox_maps files.
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
# local(8), relocated(5) and virtual(5) for the effects this has on
# aliases, canonical, virtual, relocated and .forward file lookups.
virtual_alias_maps = $virtual_maps
For that matter, there's no evidence of ANY .db files being accessed by main.cf, even though the postfix folder contains virtual_domains.db, system_user_maps.db, and rbl_whitelist.db. Meanwhile, the current contents of the "virtual" file is the man page for "virtual - Postfix virtual alias table format", which sure makes it sound like this is where user aliases should go. You've been really helpful, but I confess I'm more puzzled than ever... Thanks again!
Currently Being ModeratedAug 14, 2012 4:39 PM (in response to Jim Miller2)
My main.cf has the following line in it.
virtual_alias_maps = $virtual_maps hash:/Library/Server/Mail/Config/postfix/virtual_users
Try adding that and then add the virtual_users file and do the postmap command as above.
Currently Being ModeratedAug 23, 2012 12:46 AM (in response to Jim Miller2)
I simply set an Alias under User -> Select a User -> Advanced Options in Server.app of "@domain.com" and it now receives all email for @domain.com.
Currently Being ModeratedSep 3, 2012 4:38 AM (in response to rbut)
rbut got the solutiuon, but just to make it a bit more clear:
1. Create a user in Server.app that you want to be the catch all account and enable email for it.
2. Open Workgroup Manager for 10.8 (http://support.apple.com/kb/DL1567)
3. Select the same user and doubleclick the row under the shortname (you can add aliases to the same account here too)
4. add "@<yourdomain>", save.
5. Verify by sending a test email to a non-existing email for the domain. (You may have to restart mailservice?)
Currently Being ModeratedSep 3, 2012 4:07 PM (in response to A Bigger Bite)
Interesting; thanks! I'm going to take a day and try to get Server really working, and will give it a shot.
Currently Being ModeratedOct 14, 2012 5:16 AM (in response to Jim Miller2)
I now do want to catch all email as it has become my lives work to report spam.
So I figured out an easier way to catch all email using simply the serveradmin command-line tool (this only takes email that would otherwise bounce):
sudo serveradmin settings mail:imap:lmtp_luser_relay_enabled = yes
sudo serveradmin settings mail:imap:lmtp_luser_relay = catchallusername
sudo postfix reload
Currently Being ModeratedMay 29, 2013 9:13 AM (in response to Mark23)
I tried it, but had no luck. I tried with the mac short user name and with firstname.lastname@example.org.
It did not work. Now I will try with rbut's solution. Thanks guys for your efforts!!!