On Wed, 2 May 2007 14:56:16 -0400
"Richard Solid" <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> I need to configure my RT server to receive the emails but from
another mail
> server.

<SNIPED>

We just use fetchmail on the RT server.  Then I run things from
fetchmail through procmail so that I can filter out spam and such.  The
formail command allows me to keep the Queues seperate, but still only
have one RT user on the RT server. (all \ mean long wrapped line.  take
out if you copy/paste and move all to one line)


[EMAIL PROTECTED]:~$ cat .fetchmailrc 
set logfile /home/rtuser/logs/fetchmail.log
#------------------------------------------------
poll smtp.example.com protocol pop3 and port 995

# Queue 1
   username [EMAIL PROTECTED] password xxxxxx
   mda '/usr/bin/formail -f \
   -A "X-Original-Account: [EMAIL PROTECTED]" | \
   /usr/bin/procmail -d rtuser'

   username [EMAIL PROTECTED] password xxxxxx
   mda '/usr/bin/formail -f \ 
   -A "X-Original-Account: [EMAIL PROTECTED]" | \
   /usr/bin/procmail -d rtuser'

# Queue 2
   username [EMAIL PROTECTED] password yyyyyyy
   mda '/usr/bin/formail -f \
   -A "X-Original-Account: [EMAIL PROTECTED]" |  \
   /usr/bin/procmail -d rtuser'

   username [EMAIL PROTECTED] password yyyyyyyy
   mda '/usr/bin/formail -f \ 
   -A "X-Original-Account: [EMAIL PROTECTED]" | \
   /usr/bin/procmail -d rtuser'


[EMAIL PROTECTED]:~$ cat .procmailrc 
# Standard Procmail variable declared here
#----------------------------------------------------------------------
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
:0fw
* < 256000
| /usr/bin/spamc -d 192.168.74.3 -p 783

# If the message was actually skipped, we want to know
:0Ef
| formail -A "X-Spam-Skipped:  Yes =Message not tested by SpamAssassin="
#-------------------------------------------------------
# Get Spam out of the way
:0:
* ^X-Spam-Status: Yes
$DEFAULT
#-----------------------------------------------------------
# I have a few other procmail recipes here
#-----------------------------------------------------------

# Helpdesk emails
:0
* ^X-Original-Account:[EMAIL PROTECTED]
| /usr/bin/rt-mailgate --url http://your.url.here \ 
    --queue helpdesk --action correspond

:0
* ^X-Original-Account:[EMAIL PROTECTED]
| /usr/bin/rt-mailgate --url http://your.url.here \
    --queue helpdesk --action comment
#-----------------------------------------------------------
# Recuitment emails
:0
* ^X-Original-Account:[EMAIL PROTECTED]
| /usr/bin/rt-mailgate --url http://your.url.here \
    --queue Recruitment --action correspond

:0
* ^X-Original-Account:[EMAIL PROTECTED]
| /usr/bin/rt-mailgate --url http://your.url.here \
    --queue Recruitment --action comment

#---------------------------------------------------
# This drops any Unsorted mail into the INBOX
:0:
$DEFAULT



-- 
http://gentgeen.homelinux.org

#############################################################
 Associate yourself with men of good quality if you esteem    
 your own reputation; for 'tis better to be alone then in bad 
 company.        - George Washington, Rules of Civility
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to