So here we go:
Background Information
1. Sun Java Messaging Server 7.0 running on 192.168.0.60
2. MailArchiva Server running on 192.168.0.133
3. Archive all emails for domain abc.com.sg
Step-by-Step
1. Go to Listeners tab.
- a. Change "Exchange/SMTP Port" to 25
- b. Add IP Address 192.168.0.60 to "Restrict Incoming Connections" (more secured)
- c. Click Save
2. Restart MailArchiva server
3. Create a host entry in /etc/hosts on the Sun Messaging Server.
## Internet host table#127.0.0.1 localhost# ::1 localhost192.168.0.60 mail.openmail.sg openmail loghost192.168.0.133 mailarchiva.sg mailarchiva
4. In the config directory in Sun Messaging Server, create a filter/sieve file "capture.sieve".
require ["envelope"];if anyof (envelope :matches "from" "*@abc.com.sg",envelope :matches "to" "*@abc.com.sg"){capture :message "archive@mailarchiva.sg";}
5. In the config directory in Sun Messaging Server, edit the imta.cnf file.
- Append sourcefilter file:IMTA_TABLE:capture.sieve to the appropriate channel. e.g. tcp_local, tcp_auth, tcp_intranet
6. Rebuild the configuration file and restart the dispatcher.
7. In the messaging log mail.log_current, you should see something like the following:
04-Nov-2009 0:33:31.11 tcp_auth tcp_local EEA 51 maggie@abc.com.sg rfc822;esther@google.sg esther@google.sg *Maggie@abc.com.sg04-Nov-2009 0:33:31.13 tcp_auth reprocess EEA 51 maggie@abc.com.sg rfc822;esther@google.sg archive@mailarchiva.sg *Maggie@abc.com.sg
Done. Simple!
No comments:
Post a Comment