Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

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

Forward e-mails

How can we forward messages on OSX Lion Server for a user now that this feature has been removed from WGM?


Thanks.

Ben

Posted on Aug 26, 2011 5:41 AM

Reply
3 replies

Aug 30, 2011 4:06 AM in response to Beno 44

Hi Ben,


I'm missing the easier WGM way of adding forwarding! I don't know why they've through out some of the features they have from the admin GUI - Snow Leopard Admins Tools have been the best so far and this is a backwards step!


// whinge over


To anawer your question:


You'll nee to us the command line and depending on whether this is the server's domain or a virtually hosted domain you'll want either edit the aliases file or virtual file:


For local aliases


# sudo pico /etc/aliases


add your aliases, eg:


mail: shortusernameofrecipent


Exit the file saving changes and then run the command


# sudo newaliases


For virtually hosted emails/domains, assuming you've added the domain in the mail server setting in the admin app (under Advanced, etc).


# sudo nano /etc/postfix/virtual


Scroll down to the end of the file (control-v) then add your email/aliases:


For local delivery:


mail@example.com shortusernameofrecipent


Or


mail@example.comuser@isp-domain.com


Exit the file saving changes and then run the command


sudo postfix reload sudo postmap /etc/postfix/virtual

Nov 4, 2011 2:47 AM in response to peak

I tried your solution but it doesn't work for me on 10.7.2


I have only one domain configured via server.app, server-admin.app


My accounts have several email addresses with different domains entered into the INFO section in the OD attributes. With this, email for serveal different user/domain combinations is always delivered to the single user inbox.


I took a look into /etc/postfix/main.cf to see, what is used for virtual_alias_maps. In my case this lists: /etc/postfix/virtual_users and this file is empty.


So, I added the redirection into this file in the form off:


user@mydomain.comuser1@mydomain.com, user2@mydomain.com


And run: sudo postfix reload sudo postmap /etc/postfix/virtual_users


The mail is still delivered to user@mydomain.com and not forwarded. This is the postfix log I can see:


04.11.11 10:43:07,492 postfix/qmgr: 7617A77DC0B: from=<xyz@gmail.com>, size=3325, nrcpt=1 (queue active)

04.11.11 10:43:07,503 postfix/smtp: E726B77DC07: to=<user@s1.mydomain.com>, orig_to=<user@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.76, delays=0.68/0.01/0/0.06, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 7617A77DC0B)

04.11.11 10:43:07,503 postfix/qmgr: E726B77DC07: removed


04.11.11 10:43:07,544 postfix/pipe: 7617A77DC0B: to=<user@s1.mydomain.com>, relay=dovecot, delay=0.06, delays=0.01/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)


04.11.11 10:43:07,545 postfix/qmgr: 7617A77DC0B: removed

04.11.11 10:43:37,561 postfix/smtpd: disconnect from s1.mydomain.com[9.1.1.2]


The single line above is where the stuff is delivered to dovecot I think. But there is no redirection triggered.


Has anybody an idea how to fix this?

Nov 4, 2011 5:35 AM in response to LordLobby

Hello LordLobby,


If you've only got one domain running on your server then you can put your aliases in the aliases file, as per my opening comment. They are considered local aliases if it's for the server domain. Virtual aliases are what you use when you have your mail server virtual hosting other domains.


So, if your server has the domain example.com and you want to have the email address multiple@example.com deliver to user1 and user2 then:


nano /etc/postfix/aliases


go down to where it says:


# Put your local aliases here.


the add the line


multiple: user1, user2


OR as another example


multiple: user1, user2@anotherdomain.com


exit and save the file, then run command:


sudo newaliases


One thing I'm un-sure of from your message, you say "My accounts have several email addresses with different domains entered into the INFO section in the OD attributes. With this, email for serveal different user/domain combinations is always delivered to the single user inbox."


There might have been some changes to how apple are using the OD data in Lion which I'm not aware of but looking at your comment it makes me think you've got your mail server recieving mail for more than one domain. If this is the case then you need to make sure those domains are in your Virtual Hosts list in Server Admin > Mail > Advanced > Hosting.


On my server I have the server domain (eg myserver.com) with hostname (eg mail.myserver.com), which of course are in the DNS and then, in the Locally Hosted Virtual Domains I have two other domains (e.g mydomain.co.uk and mydomain.org.uk), which are not in the DNS as DNS is proved elsewhere; and of course Enable virtual hosting is selected.


All users for these virtual domains either have their full email address added as an additional alias (short name) in the Basic tab of the Workgroup manager or are added to the Virtual file.


In Snow Leopard you had to add the email address of a virtual to the short name otherwise the holiday notification didn't work!

Forward e-mails

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