Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My helpdesk system doesn't allow to filter by email. Some users send helpdesk tickets from their personal accounts by accident. I would like to make sure that only emails coming from domain.com will be forwarded. Every other mail account needs to be unaffected by this "filter".

My mailserver runs postfix on opensuse. Any idea how I could do that?

share|improve this question

1 Answer 1

I would use procmail.

Setup a .procmailrc for your helpdesk account.

# .procmailrc
# routes incoming mail to appropriate mailboxes
PATH=/usr/bin:/usr/local/bin
LOGFILE=/var/log/procmail.log
SHELL=/bin/sh

# Put mail from domain.com into default RT queue
:0:
* ^From: .+@domain\.com
| /usr/local/rt3/bin/rt-mailgate --queue default --action correspond --url http://localhost/

All you need to do is create a file called .forward in the helpdeskuser home dir that looks like this:

"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #helpdeskuser" 

http://www.procmail.org/

share|improve this answer
    
Thank you. I'll check it out. –  user58613 Jun 2 '11 at 18:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.