Redirecting email to a Script
David C.M. Weber
david.weber at BACKBONESECURITY.COM
Thu May 12 18:56:36 IST 2005
Brief overview:
Mailscanner system in front of an exchange server. I'm trying
to get email to activate a script via an alias when an email comes in.
Right now I've got /etc/aliases set up w/:
somebody: "| /post_leads"
Then I did a newaliases.
I have a symbolic link in /etc/smrsh pointing to the real script.
Here's a ls -lah
[root at computername smrsh]# ls -lah
total 12K
drwxr-xr-x 3 root root 4.0K May 12 13:36 .
drwxr-xr-x 57 root root 4.0K May 12 13:42 ..
lrwxrwxrwx 1 root root 35 May 12 13:36 post_leads ->
/nobody_scripts/post_leads
The nobody_scripts is a temp directory w/ bad permissions (777), but I
just want to get it working. ls -lah:
[root at computername nobody_scripts]# ls -lah
total 12K
drwxrwxrwx 2 root root 4.0K May 12 13:36 .
drwxr-xr-x 22 root root 4.0K May 12 13:36 ..
-rwxrwxrwx 1 root root 0 May 12 13:28 out.txt
-rwxrwxrwx 1 root root 32 May 12 13:29 post_leads
And finally, here's the script:
#/bin/bash
echo $1 >> out.txt
More information about the MailScanner
mailing list